HP Forums
Help: how to get the hp-50g to work on expressions. - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Help: how to get the hp-50g to work on expressions. (/thread-154479.html)



Help: how to get the hp-50g to work on expressions. - Luca - 08-16-2009

I am having great troubles with my HP-50g. It seems that there is a big clash between the way I am used to working with math, and the way the 50g is able to help me. Let me tell you what I need to do, and in what ways the 50g fails me. I am hoping that my frustration is simply due to inexperience (and bad documentation)... so any help would be very much appreciated.

A typical flow for me is this. I define a few expressions, for instance (not in HP notation, does not matter),

Quote:
p1 = q / (m * (m + q^2))

p2 = q (m + 1) / m

I then compute p1 * p2, and store it in another variable, say, p.
At this point, p contains a function of m and q, which are two variable that are meaningful in the problem I am studying.
I then want to simplify this expression: nothing is easier: I go into the equation editor, hit simplify, then re-store the result in p. So far, so good.

Then I hit the first bump. I would like to evaluate p, and I would like to do it in a way that resembles the equation mode of the good ol' 32SII: I would like the calculator to prompt me for values for m and q, showing me any previous value held by the variables, and then evaluate the expression p based on the new values. I don't see any quick way of doing this. The only way seems to be to create variables m and q, store values in them, then retrieve p, and hit EVAL. Is it really necessary to go through this? Is there a better way?

Once I play with p (and m and q) for a little while, I change something in the problem I am analyzing (maybe I make a change in the algorithm I am analyzing, whatever), and I get a new p2, for instance,

Quote:
p2 = (m+1) (m-1) (m-q) / (m^2 + q)

Great, I recompute p1 * p2, and store the result in p. So far so good.

But now I hit the second, and bigger, bump. When I try to simplify p, the calculator simplifies it all the way down to a real number! Just the presence of variables m and q in the directory caused the simplify algorithm to behave not only as simplify, but also as numerical substitute and evaluation!

This is absurd. If I have an equation on the stack, and call a command on that, the result should depend only on that -- not also on side factors like what other variables I have defined in that moment!!

This is also incredibly inconvenient. I want to have a simpler form of p first, so I can stare at it (and, e.g., infer by eye its asymptotic behavior, or whatnot). Only when I choose, I want to substitute the values of m and q into p and get a number!

Am I missing something?

Can I make the HP-50g work with my flow of playing with math?
Many thanks!

Luca


Re: Help: how to get the hp-50g to work on expressions. - dbatiz - 08-17-2009

There are many ways to accomplish your goal. I believe the 50G's strength is also its weakness, it's very flexible. Some of the gurus here who can drive the equation solver will probably have other more elegant ways of addressing your concerns, but here is my first effort:

Make sure "m" and "q" are not already defined. (PURGE them)

I put your two expressions in the stack, and stored each as "p1" and "p2"

Now simply by pressing the VAR key, they appear above the soft keys. F1 F2 Multiply EVAL produces the combined expression you were after.

Leave your combined equation on the stack, or hit enter a couple of times to make however many copies you need.

Now here's where you can do all kinds of magic, this works for me:
Get the following line on the stack:
{q 2 m 3}

Be mindful of the spaces. Literally Bracket, no space, q, space, 2, space, m, space, 3, Bracket.

Now Right Shift Tool (it looks like a vertical line). This prompts the calculator to substitute the variables in the brackets into the equation above in the stack. Then press EVAL, you should (depending on your settings) get 16/63.

If you need to do this repeatedly, feel free to replicate the equation in the stack as needed, and consider storing the bracketed variables in a new variable (I used "v").

Once you get inside the head of the 50G, you'll be right at home!

Very respectfully,

David


Re: Help: how to get the hp-50g to work on expressions. - Luca - 08-17-2009

David, thanks, this helps a lot.
The substitution tool, rather than defining variables, may be exactly what I needed. However, see also my other post on a bug in SIMPLIFY.

Luca