Hello all, I have a program that I am trying to get right using HPUserEdit 4.0. The purpose of this equation is to be able to solve for any of the variables that I want. If someone has one out there that I can emulate from that would be great! Maybe if I could enter "X" into the variable I need to know or something like that and then have it solve for X... anyway I hope this question is understood, here it is:

«

"Henderson-Hasselback"

{

"pH"

"pKa"

"Cbase"

"Cacid"

}

{ 1 18 }

{ }

{ 0 0 1 1 }

INFORM

IF

THEN

OBJ DROP pH pKa Cbase Cacid

'pH=pKa+LOG(Cbase/Cacid)' STEQ 30 MENU

"Q" TAG

END

»

Considering the power of the HP49, I'm not so sure I would try use the old 48 Multiple Equation Solver for an equation this simple, nor would I bother to write a program for it, it really isn't necessary.

If this is something you'll use often, create a directory, name it say, Chem. Then store the equation as a named variable, say HH. You can then shove the equation onto the stack, solve symbolically for any of the equation variables, use SUBS to assign numeric values and you have your answer.

You can also store the equation and use the solve equation feature which was also in the old 48. This may be the simplest way to go about what you want.

The best way to handle this sort of thing is to use SolveSys, available for free download from www.hpcalc.org which does a marvelous job of solving linear and nonlinear systems of equations. It is fast, bug free, and when fired up, identifies all variables, which can have values assigned or unassigned, as the user wishes. The program comes with complete loading and using documention. As the program can create a lot of variables, depending on just how big or numerous your equations are, it's a good idea to create a directory to store just this one program in, that way the variables don't interfere with others in Home or other directories. Best of luck.

*Edited: 15 Oct 2005, 6:26 p.m. *

Ahah! Thanks alot for that info!