Problem with square brackets in fSolve - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: HP Calculators (and very old HP Computers) ( /forum-3.html)+--- Forum: HP Prime ( /forum-5.html)+--- Thread: Problem with square brackets in fSolve ( /thread-20472.html) |

Problem with square brackets in fSolve - rawi - 09-08-2023 08:56 AM
I wanted to solve a system of 2 equations with X and Y as unknowns. Whenever I opened the square brackets a +/- sign was included that could not be removed. So it looked different to the examples in the manual. So I went to CAS menue (not in CAS mode) and Numerical Solve so there was CAS.fsolve() on the screen. Then I pressed Help. There were two examples. The second example was fsolve([x²+y-2,x+y²-2],[x,y],[0,0]) I pressed Example and highlighted the second example. When I copied it I got: CAS.fsolve([x²+y-2 x+y²-2 +/-],[x y +/-],[0 0 +/-]) Pressing Enter gives message: Error: Syntax Error It seems that the elements in the square brackets are interpreted as elements of a matrix. How can I use the fSove function for more than one equation? Thank you very much for your help! RE: Problem with square brackets in fSolve - Didier Lachieze - 09-08-2023 11:29 AM
(09-08-2023 08:56 AM)rawi Wrote: How can I use the fSolve function for more than one equation? The simplest way is to use fsolve in CAS mode. If you want to use it in HOME , then CAS.fsolve("[x²+y-2,x+y²-2],[x,y],[0,0]") or CAS("fsolve([x^2+y-2,x+y^2-2],[x,y],[0,0])") will work. RE: Problem with square brackets in fSolve - rawi - 09-08-2023 04:17 PM
Hi Didier, thank you very much for your fast and helpful answer. In CAS mode it works fine. I tried in home mode and there I got again the message "Error: Syntax Error". In CAS mode the +/- before the closing of the square bracket that is generated as soon a square bracket is opened disappear when pressing Enter. In home mode it does not disappear. And I think it strange that this is a problem to be solved in CAS mode as it is a strictly numeric problem. But I am glad that I now know how to do it. Thank you once more! |