d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Mathematica Help > Solve Linear Equation
Add Reply New Topic New Poll
Member
Posts: 5,299
Joined: Jul 4 2009
Gold: 2,632.57
Apr 21 2014 09:24am
I'm supposed write a function, solve, which solves any linear equation of the form ax + b == cx + d
There's a build in command to solve, but we have to print each step. So subtract b, subtract cx, divide by a/c.

Does anyone know how to go about this in Mathematica?

Actually, if someone could try to explain how to do it in any language, it would probably help xD
Member
Posts: 5,299
Joined: Jul 4 2009
Gold: 2,632.57
Apr 21 2014 10:15am
Quote (furbyjs @ Apr 21 2014 10:24am)
I'm supposed write a function, solve, which solves any linear equation of the form ax + b == cx + d
There's a build in command to solve, but we have to print each step. So subtract b, subtract cx, divide by a/c.

Does anyone know how to go about this in Mathematica?

Actually, if someone could try to explain how to do it in any language, it would probably help xD


I feel like it would be really easy to do if the input was a, b, c, d, but the only input is the entire equation.
I was thinking of somehow using the FullForm, and pulling each integer out and assigning them to variables and solving the easy way, but I don't know how to go about that either =/
Go Back To Homework Help Topic List
Add Reply New Topic New Poll