Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Solver/Reduce problem' topicStudent Support Forum > General > "Solver/Reduce problem"

Next Comment >Help | Reply To Topic
Author Comment/Response
Wei Dai
08/29/12 1:46pm

Hi,
So i want to use either the solver or reduce methods to find all the solutions for an equation. I used a for loop to loop through the x values so that the method will return one y value. and I want to save the x and the y values to a list or matrix.
I so far have this:

list1 = {{xval, yval}};
For[x = .5, x <= 50, x = x + .5,
sol = Solve[x^2 + y*x == 16, Reals];
Append[list1, {x, {{y} /. First[sol] /.
Table[{C[1] -> m}, {m, 5}]}}];]
Print[list1]

But it just prints "{{xval, yval}}" without appending.

URL: ,

Subject (listing for 'Solver/Reduce problem')
Author Date Posted
Solver/Reduce problem Wei Dai 08/29/12 1:46pm
Re: Solver/Reduce problem Michael 09/06/12 9:49pm
Next Comment >Help | Reply To Topic