Re: NSolve fails where Solve succeeds!
- To: mathgroup at smc.vnet.net
- Subject: [mg43625] Re: NSolve fails where Solve succeeds!
- From: "Dana DeLouis" <delouis at bellsouth.net>
- Date: Fri, 26 Sep 2003 04:45:38 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
It appears to me that in Mathematica 5, it is setting each element of the list equal to the right hand side. Solve[{{2*a - 3, 4*b - 1}, {3*c - 3, 5*d - 1}} == 0] {{a -> 3/2, b -> 1/4, c -> 1, d -> 1/5}} It likes your example. All value are equal to zero. Solve[{{a,b},{c,d}}==0] However, given the above, I don't see why the following fails. Here, it does not return all variable as equal to 1. Solve[{{a,b},{c,d}}==1] It says it is "Not a well-formed equation." Hmm? It doesn't like Nsolve like you mentioned. NSolve[{{2*a - 3, 4*b - 1},{3*c - 3, 5*d - 1}} == 0] RowBox[{\(Solve::"elist"\), ":", "\<\"List encountered during <snip> It appears to like Reduce in some situations, similar to Solve: It liked this: Reduce[{{2*a - 3, 4*b - 1}, {3*c - 3, 5*d - 1}} == 0] d == 1/5 && c == 1 && b == 1/4 && a == 3/2 It like this: Reduce[{{a, b}, {c, d}} == 0] d == 0 && c == 0 && b == 0 && a == 0 It did not like this: Reduce[{{a, b}, {c, d}} == 1] "....is not a quantified system of equations and inequalities. " It appears to me that Solve and Reduce will work on each element only if the right hand side ==0. Suppose we have this list: equ = {{2*a - 3, 4*b - 1}, {3*c - 3, 5*d - 1}} Suppose we want to solve this list equal to 1. This will not work Solve[equ == 1] However, subtracting 1 from each side will solve for the equations: Solve[equ - 1 == 0] {{a -> 2, b -> 1/2, c -> 4/3, d -> 2/5}}