| Author |
Comment/Response |
Casey Mann
|
09/29/00 7:05pm
Look at this:
f[k_] := (x /. Solve[6x^2 == k(3x^2 + 3x + 1), x][[2]])
This is just giving f the value of the second solution to the equation.
Now, type
IN: f[k]
OUT: ''some formatted output for the function f''
Make a new function
g[k_]:= ''copy the output of f[k] here''
Now compare:
IN: f[1] //N
OUT: 1.26376
IN: g[1] //N
OUT: -0.263763
See, what is happening is that g is giving the values of the 1st solution to the Solve output, instead of the 2nd as it should be!
I'm not looking for work-arounds for this, as I have already diagnosed the problem and the solution is obvious. I just wanted to point out that mathematica is doing something strange.
Casey Mann
URL: , |
|