Trident HelpOpen the calculator

Programming

Solve an equation with your own program

Write the equation as a program, then let SOLVE find where it equals zero.

Open in Trident

The solver needs a program that takes x and leaves f(x) on the stack. It then hunts for the x that makes the result zero, starting from your guesses.

Here f(x) = x² - 2. Its positive root is the square root of 2, 1.4142.

RPN Scientific 15

Start on the main screen: There is no menu to leave. Press the back arrow to clear a number you are typing, or CLx (g then back arrow) to clear the X register.

  1. Enter program mode and give the program label 0 (f, LBL, then the digit).

    gP/RR/SfLBLSST0
  2. Record: square x (g, x²), subtract 2, return (g, RTN). Leave program mode.

    gx²√x2−gRTNGSBgP/RR/S
  3. Put two guesses on the stack: 1, ENTER, 2.

    1ENTER2
  4. Press f, then ÷ (SOLVE), then the label 0.

    fSOLVE÷0

You should see1.4142

The root is in X. The row above holds the previous guess, and the next one up holds f(root), which should be nearly 0.

For more digits, set FIX 9 first by pressing f, 7, 9.

RPN Scientific 15 key reference

RPN Advanced 42 · Using the Solver menu with a named program

Start on the main screen: Press EXIT (once or twice) to close any menu and return to the plain stack view of Y and X.

  1. First store the program FX (see the named-programs guide). It has a menu variable X. These keys build it.

    ⇧PRGMR/S⇧PGM.FCN3Σ+⇧ALPHAENTER1/xΣ+XEQ1/xENTER⇧PGM.FCN3▼▼Σ+XEQ1/xENTERRCL⇧ALPHAENTERXEQ1/xENTER⇧x²√x2−⇧PGM.FCN31/x⇧PRGMR/SEXITEXIT
  2. Press shift, 7 (SOLVER). The menu lists your programs. Pick FX with the first menu key.

    ⇧SOLVER7Σ+
  3. The menu now shows the variable X. Type a guess, 1, and press the X key to store it.

    1Σ+
  4. Press the X key again without a number to solve.

    Σ+

You should seeX=1.4142

RPN Advanced 42 key reference

Tips

Related guides