The Museum of HP Calculators

HP Forum Archive 20

[ Return to Index | Top of Index ]

Question about MROOT function
Message #1 Posted by Namir on 8 Nov 2011, 12:17 p.m.

Hi All RPL experts!

I am trying to see how an HP-50G can find the roots at least two simultaneous nonlinear equations. Does the function MROOT do the job. If so, how does one use it?

Namir

      
Re: Question about MROOT function
Message #2 Posted by Crawl on 8 Nov 2011, 1:42 p.m.,
in response to message #1 by Namir

Use MSLV.

The manual is here:

http://www.ele.uri.edu/faculty/vetter/Other-stuff/HP-calculators/HP-50g/HP_50g_advanced_users_reference_manual.pdf

            
Re: Question about MROOT function
Message #3 Posted by Bart (UK) on 8 Nov 2011, 2:17 p.m.,
in response to message #2 by Crawl

See here for the AUR with linked contents, index and bookmarks:
Bookmarked version of the HP-50G AUR PDF

                  
Re: Question about MROOT function
Message #4 Posted by Marcus von Cube, Germany on 8 Nov 2011, 2:31 p.m.,
in response to message #3 by Bart (UK)

Quote:
Multiple Roots Command: Uses the multiple-equation solver to solve for one or more variables using the equations in EQ. Given a variable name, MROOT returns the found value; with "ALL" MROOT stores a found value for each variable but returns nothing.

Does this answer your question, Namir?

                        
Re: Question about MROOT function
Message #5 Posted by Hal Bitton in Boise on 8 Nov 2011, 11:15 p.m.,
in response to message #4 by Marcus von Cube, Germany

Hi Namir,
After trying (unsuccessfully) to make this function work, I'd be very interested in finding out how it's done as well.

The (skimpy) AUR documentation makes no reference as to how the equations are to be stored in the EQ variable...(as a list, a vector, or what?). I tried both of the above to no avail. I got either "bad argument type", "bad argument value", or just my 2 equations regurgitated onto the stack, as results.

Can somebody post an example using this function?
Best regards, Hal

                              
Re: Question about MROOT function
Message #6 Posted by Namir on 9 Nov 2011, 12:01 a.m.,
in response to message #5 by Hal Bitton in Boise

My attempts to use MSLV have failed!!!

I must say that TI does a MUCH BETTER job with the TI NSpire CX CAS. The machine makes it soooo easy to define how many equations, declare the variable names, and then enter the equations. You can optionally assign initial guesses AND specify the range for the solutions. My guess is that this is the work of an ex-HP employee.

Namir

Edited: 9 Nov 2011, 7:22 a.m.

                                    
Re: Question about MROOT function
Message #7 Posted by Crawl on 9 Nov 2011, 7:26 a.m.,
in response to message #6 by Namir

What's the problem?

                                          
Re: Question about MROOT function
Message #8 Posted by Crawl on 9 Nov 2011, 7:52 a.m.,
in response to message #7 by Crawl

Anyway, I made an animated GIF of me using MSLV once:

First enter the equations, then the variables, then the initial guess. Those are all entered as row vectors.

                                                
Re: Question about MROOT function
Message #9 Posted by Eddie W. Shore on 9 Nov 2011, 9:21 a.m.,
in response to message #8 by Crawl

Quote:
Anyway, I made an animated GIF of me using MSLV once:

First enter the equations, then the variables, then the initial guess. Those are all entered as row vectors.


So the syntax is: 3: [vector of equations] 2: [vector of variables] 1: [vector of guesses]

                                                
Re: Question about MROOT function
Message #10 Posted by Namir on 9 Nov 2011, 10:29 a.m.,
in response to message #8 by Crawl

Very nice!! I will try again!! I know the HP-50G is a very capable machine. It should be easy to solve the multiple roots for two or three nonlinear equations.

Namir

PS: It worked. I realized my mistaked. Here is the example:

x*y-4=0
x^2+y^3-31=0

I entered the following:

['X*Y-6','X^2+Y^3-31']
['X','Y']
[5 5]

Originally I was leaving out the single quotes and getting syntax error messages from the machine. When I made the correct input and then executed MSLV, I watched the machine update the guesses for the roots (at the top of the LCD) as they converged to the solutions x=2 and y=3.

Thanks!!

Edited: 10 Nov 2011, 5:02 a.m. after one or more responses were posted

                                                      
Re: Question about MROOT function
Message #11 Posted by Crawl on 9 Nov 2011, 12:09 p.m.,
in response to message #10 by Namir

I don't have my HP50g here to test this with, but I don't think I do it with the "entering quotes" method. I'll probably go to Matrix Writer to enter the vectors, and from there Equation Writer to enter the equations (or if you prefer RPN, build up the equations on the stack, then copy and past them into Matrix Writer). I think the Matrix Writer defaults to Vectors (if it's 1xn or nx1), so if you enter them on a row, the syntax should work itself out for you.

Also, (2,3) doesn't solve x*y-4=0...

                                                            
Re: Question about MROOT function
Message #12 Posted by Namir on 10 Nov 2011, 5:03 a.m.,
in response to message #11 by Crawl

Ooops! That was a typo. I meant:

X*Y-6=0

I corrected that in my original message.

Namir

                              
Re: Question about MROOT function
Message #13 Posted by Eddie W. Shore on 9 Nov 2011, 9:18 a.m.,
in response to message #5 by Hal Bitton in Boise

Quote:
Hi Namir,
After trying (unsuccessfully) to make this function work, I'd be very interested in finding out how it's done as well.

The (skimpy) AUR documentation makes no reference as to how the equations are to be stored in the EQ variable...(as a list, a vector, or what?). I tried both of the above to no avail. I got either "bad argument type", "bad argument value", or just my 2 equations regurgitated onto the stack, as results.

Can somebody post an example using this function?
Best regards, Hal


Use STEQ to store the equation. It is in the catalog or it can be typed.

                  
Re: Question about MROOT function
Message #14 Posted by Namir on 9 Nov 2011, 12:02 a.m.,
in response to message #3 by Bart (UK)

Bart,

Thanks for the bookmarked version of the AUR manual. I know it is a lot of work to add the bookmarks.

Namir

Edited: 9 Nov 2011, 7:23 a.m.

      
Re: Question about MROOT function
Message #15 Posted by Hal Bitton in Boise on 9 Nov 2011, 11:12 a.m.,
in response to message #1 by Namir

Well, certainly MSLV has been de-cloaked and shown to work very well.
The function that remains shrouded in mystery, however, (at least in my mind) is MROOT.
What's the difference between MSLV and MROOT? I have a feeling they do the same
thing, but accept inputs differently. Has anybody gotten MROOT to work?
HB

            
Re: Question about MROOT function
Message #16 Posted by Software49g on 9 Nov 2011, 2:16 p.m.,
in response to message #15 by Hal Bitton in Boise

Hello,

> Has anybody gotten MROOT to work?

MROOT is used in HP's EQNLIB and in mine through GUIMES.

It is explained in the original documentation of HP's EQNLIB and in my documentation to GUIMES.

HTH,
Andreas
http://www.software49g.gmxhome.de


[ Return to Index | Top of Index ]

Go back to the main exhibit hall