# [R] Solving equations

Mon Sep 8 06:55:30 CEST 2014

```No. I was not looking for an answer to that question. I wasn't clear :-) I
already code using Octave and R to solve ML algorithms.

I am trying to understand  how R packages can help us to solve such
equations using LU decomposition etc. The question was about using R with
these math algorithms.

Mohan

On Mon, Sep 8, 2014 at 12:31 AM, Rui Barradas <ruipbarradas at sapo.pt> wrote:

> Hello,
>
> Inline.
>
> Em 07-09-2014 09:54, Mohan Radhakrishnan escreveu:
>
>> Hi,
>>           I code R to parse data but not for solving equations. So this is
>> my first such problem. It is a programming puzzle.
>>
>> I have these two equations.
>>
>> 1)    4x - 3w = 0
>> 2)    8x - 7w =0
>>
>> I know the value of x and w for
>>
>> equation 1).  x = 3 and w = 4
>> equation 2).  x = 7 and w = 8
>>
>
> Why? Any of those equations defines a straight line, not a point. Those
> two points are just one of the infinitely many solutions.
>
> Your equations are equivalent to
> eq1) w = 4/3x
> eq2) w = 8/7x
>
> the equations of straight lines passing through the origin (no independent
> term).
>
>
>> I also know how to write more equations based on data available in the
>> puzzle.
>>
>> How do I solve a set of such equations ? I need to find out the values of
>> x
>> and w for each such equation.
>>
>
> There are packages to solve simultaneous equations but I've never used
> them.
>
> Hope this helps,
>
>
>>
>> I know that here the equations are simple because the puzzle can be
>> simplfied.
>>
>>
>> Thanks,
>> Mohan
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help