Re: NSolve fails where Solve succeeds!
- To: mathgroup at smc.vnet.net
- Subject: [mg43500] Re: [mg43446] NSolve fails where Solve succeeds!
- From: Michael Schreiber <michaelschreiber at mac.com>
- Date: Thu, 18 Sep 2003 05:39:12 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On Wednesday, Sep 17, 2003, at 13:59 Europe/Vienna, Pavel Pokorny wrote: > > Dear Mathematica friends > > Solve[{{a,b},{c,d}}==0] What is the correct solution? Is it a trivial problem: In[1002]:= Solve[a\[Equal]0&&b\[Equal]0&&c\[Equal]0&&d\[Equal]0] Out[1002]= {{a\[Rule]0,b\[Rule]0,c\[Rule]0,d\[Rule]0}} Or is it the short notation for a system of equations (Mathematica Book 3.4.4): In[1009]:= Reduce[{a x+b y,c x+d y}\[Equal]0] Out[1009]= \!\(y \[Equal] 0 && x \[Equal] 0 || x ¡Á 0 && c \[Equal] \(-\(\(d\ y\)\/ x\)\) && a \[Equal] \(-\(\(b\ y\)\/x\)\) || x \[Equal] 0 && y ¡Á 0 && d \[Equal] 0 && b \[Equal] 0\) > > gives the correct solution in Mathematica 5.0 while > > NSolve[{{a,b},{c,d}}==0] > > fails. It does not fail but returns: From In[990]:= \!\(\* RowBox[{\(Solve::"elist"\), \(\(:\)\(\ \)\), "\<\"List encountered during logical expansion of \\!\\({a, b}\\). \\!\\(\\*ButtonBox[\\\"More¡¦\\\", \ ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ ButtonData:>\\\"Solve::elist\\\"]\\)\"\>"}]\) Out[990]= NSolve[{{a,b},{c,d}}\[Equal]0] The error code ::elist is explained if you click -> ore -> Generated when the internalLogicalExpandfunction encounters a list rather a \ combination of equations and logical functions. > > Is it a bug or an intention? > > It would be nice to have Solve and NSolve giving > as close results as possible. > > -- > Pavel Pokorny > Math Dept, Prague Institute of Chemical Technology > http://www.vscht.cz/mat/Pavel.Pokorny > > F Schreiber Heimscholleg 26 Wien, A1130 Austria Europe ichael at Schreiber.at