HP 42S manual Using the Solver, Select Solve Program

Page 23

7 Using the Solver

Unfortunately the HP-42S does not have an equation editor like the 33S one. To use the solver and numeric integration we must enter the equation in a program which must have a global name.

Let's suppose we want to solve the equation x25 x4=0 . We are going to enter it in a program. For example:

01 LBL “FX” (“FX” is the global name of the program)

02 MVAR “X” (You find this in Solver menu. I will explain this later) 03 RCL “X”

04X↑2

055

06RCL “X”

07x

08-

094

10+

11END

Well, as you can see we don't enter the equation f(x)=0 but just the function f(x). The MVAR function tells the calculator what variables must appear in the solver menu. We suppose all variables are in the memory so we use RCL function.

Now we leave the program mode and we go to the Solver menu. What should appear is

Select Solve Program

Then in our case we select FX and we give a start value, for example 8 and we press X to enter this value. Again we press X to calculate the correct value of x which give to us X=4.

But this equation does not have only one solution. X=1 is also a solution. To get it we can enter 2 for example for the start value.

If you want to solve numerically many equations of the form a x2bxc=0 you can write a program such as

01 LBL “FX”

02 MVAR “A”

03 MVAR “B”

04 MVAR “C”

05 MVAR “X”

06 RCL “X”

07 X↑2

08 RCL “A”

09x

10RCL “B”

11RCL “X”

12x

13+

14RCL “C'

Image 23
Contents An alternative HP-42S/Free42 Manual Version 2005 Index Introduction RPN Basic OperationsTurn ON/OFF Setting the display contrastTraining RPN using HP-42S FIX, SCI, ENG, ALL, RDX., RDX MenusPage Stack Modes MenuGetting used to some keys of the keyboard Page Abcde Fghi Jklm Nopq Rstuv Wxyz Memory More on the Clear menu Catalog menuAssign ABS to Custom menuAssign FCN ABS Probability Where N!=N.N-1.N-2...2.1Page Complex numbers in polar coordinates Complex NumbersComplex numbers in rectangular coordinates Basic programming Programming19STOP More than one program in the memory X?0 and X?Y sub-menus EnterSqrt Real program examplesLBL Prime Select Solve Program Using the SolverPage Ba f  xdx Numeric IntegrationSub-menu Cfit StatisticsEnter 6 Σ+ Second line ALLΣ, LINΣ, Σreg and ΣRG? Functions Matrices = B Enter Matrix NEWRCL a RCL B Matrix Cross Enter NEW Enter ComplexMatrix 1 Enter 3 NEW Enter 3 NEW Edit 1 Enter →→5 +/- Enter Exit STO BOther Bases Flags License