Euler's numerical method (HL)

Studied in greater depth in AI HL than AA HL, Euler’s method is made easy here on TI 84, TI Nspire, Casio fx-9860GIII, Casio fx-CG50, HP Prime, and NumWorks.

Also at the end is a second order DE for Math AI HL.

Re-written on 2026-03-17. Updated 2026-05-13 with plotting a coupled DE

Contents

Theory

In interpretations of derivatives, it was mentioned that a smooth curve can be approximated by a series of jagged lines segments as each line segment becomes small.

This is exactly what we do in Euler’s method.

Given some differential equation

 dy dx=f(x,y)\frac{\d y}{\d x} = f(x, y)

and some initial point (x0,y0)(x_0, y_0), and a step size hh, then each successive value of xx, and yy is

xn+1=xn+hx_{n+1} = x_n + h
yn+1=yn+hf(xn,yn)y_{n+1} = y_n + hf(x_n, y_n)

Note that yn+1y_{n+1} depends on both yny_n and xnx_n, but xn+1x_{n+1} depends only on xnx_n.

f(xn,yn)f(x_n, y_n) is the estimate for the gradient of the line. hh is Δx\Delta x. So the equation for yy is saying

Δyn+1=Δxngradientn\Delta y_{n+1} = \Delta x_n \cdot \text{gradient}_n

hh is positive or negative depending on if moving to the right or left.

Note: IB may ask for xx or yy. You may also get

 dx dt=f(t,x)\frac{\d x}{\d t} = f(t, x)

and other variables. If that happens treat the xx as yy and the tt as xx.

GDC Procedure

Example: Given that

 dy dx=y21+x,    y(0)=1\frac{\d y}{\d x} = \frac{y^2}{1+x},\;\; y(0) = 1

use Euler’s method with a step size of h=0.1h= 0.1, estimate yy when x=0.5x = 0.5


Solution:

xn+1=xn+0.1GDC uses an+1yn+1=yn+0.1(yn21+xn)GDC uses bn+1\begin{align*} x_{n+1} &= x_n + 0.1 &\text{GDC uses } a_{n+1} \\ y_{n+1} &= y_n + 0.1\left(\frac{y_n^2}{1+x_n}\right) &\text{GDC uses } b_{n+1} \end{align*}

Commentary: Using question variables, write down the Euler’s method formula with the derivative substituted in. To avoid data entry errors, write down the correspondence between calculator variables (usually u_n, v_n or a_n, b_n). Also good idea to wrap the derivative in parentheses ( ).

xxyy
01
0.11.1
0.51.623

y1.62y \approx 1.62 when x=0.5x = 0.5 \qed

Tip: In the past, IB has asked for over 15 iterations of Euler’s method. I recommend to write down Euler’s method formula with substitutions, and a correct coordinate for each remaining mark, and always include the starting point, first and last iterations.

Warning: Check if question wants a point or just the yy-value. Answer the question as asked.


Here’s how to do it on each graphing calculator. To plot the solution, check out Second order and coupled DE (AI HL only).

Generally, we can either use calculation chaining or recursive sequences. Try both methods across multiple questions, and pick what you prefer.

chaining (yy then xx)

This method is by Dr. William J. Larson  for TI 84 Plus, then I expanded it for several other graphic display calculator (GDC) models as well.

Because the new Y depends on the old value of X, we update Y before X. We should also see the new values. We need to chain everything in a single calculation, so Enter or EXE can re-run the last calculation and update both variables.

  1. Initialize X, Y, H. Storing H (step size) is optional.

    0→X
    1→Y
    0.1→H
  2. TI uses : Casio uses HP uses ; to chain calculations.

    separate:
    Y+H(Y^2/(1+X))→Y
    X+H→X
    {X,Y}

    chained: Y+H(Y^2/(1+X))→Y:X+H→X:{X,Y}

  3. Press Enter or EXE button until we see the desired X. Note: No need to re-enter the expression.

Warning: If you mess up on step 2, you must redo step 1.

Example: Given that

 dy dx=y21+x,    y(0)=1\frac{\d y}{\d x} = \frac{y^2}{1+x},\;\; y(0) = 1

use Euler’s method with a step size of h=0.1h= 0.1, estimate yy when x=0.5x = 0.5

  1. Store sto→ the initial values in X and Y alpha 1. Optionally we can also store the step size in H.
  1. Chain the commands using : alpha to update Y, X, and show the new coordinates using {, 2nd (, } 2nd ) and comma .
    Enter the expression. Result {0.1, 1.1}. on TI 84 Plus CE
    entering the expression
  1. Press enter until we see {0.5 ... for x=0.5x = 0.5.
    Additional points {0.2, 1.21} and {0.3, 1.332}. on TI 84 Plus CE
    a few more points
    Additional points {0.4, 1.468} and {0.5, 1.623}. on TI 84 Plus CE
    our solution
purposesymbolbutton(s)
store sto→
calculation separator: alpha
curly braces{, } 2nd (, 2nd )
comma,
nice fractions alpha y= 1:n/d
get next point enter

The built in euler( is disabled during IB exams.

  1. Store ctrl var the initial values in x and y. Optionally we can also store the step size in h.

  2. Chain the commands using : from ?!▸ to update y, x, and show the new coordinates using {, } ctrl )

  3. Press enter until we see {0.5 ... for x=0.5x = 0.5.

    Entering the expressions on Euler's method on TI Nspire
    Entering above expressions on TI Nspire CX
    Euler's method result on TI Nspire
    Results for Euler's method on TI Nspire CX
purposesymbolbutton(s)
store ctrl var
calculation separator:from ?!▸
curly braces{, } ctrl )
comma,
nice fractionsfrom □{□
get next point enter

For this particular method, we need Line or Linear mode. This means more brackets when entering math. This shortcoming makes chaining on Casio not ideal.

Images are from Casio fx-9860GIII. Very similar results on fx-9750GIII and fx-CG50.

  1. In Run/Mat, set up Shift MENU, change to Line (Linear) mode F2 at the top.

    setup screen. Input/Output:Linear on Casio fx-9860GIII
    Change to Linear I/O temporarily
  2. Store the initial values in X and Y. Optionally we can also store the step size in H.

    0 to X. 1 to Y. 0.1 to H on Casio fx-9860GIII
    initialize X, Y, H on Casio fx-9860GIII
  3. Chain the commands using newline Shift EXE to update Y, X, and show the new coordinates using curly braces Shift ×, Shift ÷ and comma .

    main Euler's method chaining expression on Casio fx-9860GIII
    Euler's method main step on Casio fx-9860GIII
  4. Each result is shown in its own screen as a List. Copy it down.

    Ans. List with entries 0.1, 1.1 on Casio fx-9860GIII
    coordinates after 1 iteration
  5. Press EXE twice for the next point. Repeat. Continue until we see 0.5 on top for x=0.5x = 0.5.

    Ans. List with entries 0.5, 1.6225 on Casio fx-9860GIII
    final point in Euler's method

    This is how the main screen should look.

    Expression with Done written five times on Casio fx-9860GIII
    main screen at the end
  6. In set up Shift MENU, change back to Math I/O. when done with Euler’s method.

purposesymbolbutton(s)
store
calculation separator Shift EXE
curly braces{, } Shift ×, Shift ÷
comma,
get next point EXE
  1. In (home), store Shift EEX , the initial values in X and Y. Optionally we can also store the step size in H.

  2. Chain the commands using ; from ALPHA + to update Y, X, and show the new coordinates in one step using curly braces Shift 8 and comma

  3. Press Enter until we until we see {0.5 ... for x=0.5x = 0.5.

    Euler's method using calculation chaining on HP Prime
    Euler's method using calculation chaining on HP Prime
purposesymbolbutton(s)
storeShift EEX
calculation separator;ALPHA +
curly braces{, }Shift 8
comma,
get next pointEnter

recursive (xx then yy)

This method defines two sequences, where u(n+1) depends on u(n) and v(n+1) depends on both u(n) (ie xx) and v(n) (ie yy). We would create u then v (xx then yy).

  1. Activate recursive sequence mode/app. Use u(n+1) to define recursive sequences starting from n=1.

  2. Define

    u(1)=0
    u(n+1)=u(n)+0.1

    v(1)=1
    v(n+1)=v(n)+0.1v(n)^2/(1+u(n))
  3. Check table.

When the sequences are defined recursively, it does not matter whether we start at n = 0 or n = 1, and just use GDC default.

Example: Given that

 dy dx=y21+x,    y(0)=1\frac{\d y}{\d x} = \frac{y^2}{1+x},\;\; y(0) = 1

use Euler’s method with a step size of h=0.1h= 0.1, estimate yy when x=0.5x = 0.5

On non-CE calculators, follow the instructions below but write (n-1) each time instead of (n).

  1. In mode instead of FUNC or FUNCTION choose SEQ.

    mode use SEQ not FUNC, on TI 84 Plus CE
    use SEQ mode
  2. In y=, highlight SEQ(n+1). Set nMin to 1 (default). Define u(n+1), u(1), v(n+1) and v(1).

    Type: SEQ(n+1). nMin=1. Define u(n+1) and v(n+1). u(1)=0. v(1)=1. on TI 84 Plus CE
    define the two sequences; both are recursive.
  3. In 2nd graph, view the table. Settings can be changed in 2nd window.

    table of sequence values on TI 84 Plus CE
    table of values
  4. To view the graph, see #Euler: coupled DE and use uv in window

  5. Change back to FUNC or FUNCTION mode when done.

purposesymbolbutton(s)
sequence modeSEQ mode
recursive sequenceTYPE:seq(n+1)use arrow keys
set nnMin=1use arrow keys
sequencesu, v 2nd 7, 2nd 8
nice fractions alpha y= 1:n/d
set table 2nd window
view table graph
  1. In Lists & Spreadsheet app, enter 0 in A1 and 1 in B1. In A2, enter a1 + 0.1

    TI Nspire CX spreadsheet. 0 in A1. 1 in B1. a1 + 0.1 in A2
    initialize the two columns and set formula in A2
  2. While highlighting cell A2, go to menu 3:Data 3:Fill. Use down arrow to select the cells to paste the formula. enter to confirm.

    TI Nspire CX. Menu. 3:Data. 3:Fill
    highlight A2 while dragging
    TI Nspire CX. Cells in column A until A7 are in a dotted box.
    select cells to paste formula
  3. In B2, enter the expression

    =b1+0.1b121+a1=b1 + \frac{0.1b1^2}{1+a1}

    Drag B2 down and check the values.

    TI Nspire CX. Cell B2 is b1 + 0.1b1^2 over (1 + a1)
    define formula in B2
    TI Nspire CX. highlighting column B values until reaching the desired row
    dragging and checking values
purposesymbolbutton(s)
spreadsheetLists & Spreadsheet app
drag formulaFirst term index menu 3:Data 3:Fill
cella1 for cell A1

Images are from Casio fx-9860GIII. Very similar results on fx-9750GIII and fx-CG50.

  1. In MENU RECUR or Recursion app, in F3 (TYPE) choose F2:an+1=Aan+Bn+C

  2. Define the two sequences recursively using the F4 (n,an) tab.

    Define the two recursive sequences in an+1 and bn+1 on Casio fx-9860GIII
    define the two sequences in an+1 and bn+1
  3. In F5 (SET), change END to show enough terms, and set a0 and b0 to the initial values.

    Set Start=0, End=5, a0=0, b0=1 on Casio fx-9860GIII
    main screen at the end
  4. View table in F6 (TABL). Scroll for the desired value.

    Table of values of the two recursive sequences on Casio fx-9860GIII
    table of values
purposesymbolbutton(s)
recursion app MENU, under RECUR
recursive sequenceF2:an+1=Aan+Bbn+C F3 (TYPE)
set nStart, End F5 (SET)
sequencesan. bn F4 (Name)
set table F5 (SET)
view table F6 (TABL)
  1. In Apps , use Sequence app near the end.

  2. Choose U(N+k) for recursive sequences. Define U1(n+1) and U2(n+1). Use on-screen buttons as needed.

    Define U1(n+1) and U2(n+1) in Sequences app on HP Prime
    Define U1(n+1) and U2(n+1) in Sequences app
  3. In Num ⊞ to view the table. Settings can be changed in Shift Num ⊞ . Go back to Symb ✗ to change the sequences.

    Row 6 says N = 6. U1 = 0.5. U2 = 1.6223
    table of values
purposesymbolbutton(s)
sequence modeApps , Sequence app
recursive sequenceU(N+k)Symb ✗ , on screen
set nStart NSymb ✗ , on screen
sequencesUtouch screen, or ALPHA 4
set tableShift Num ⊞
view tableNum ⊞
  1. In (home), use Sequences app.

  2. Add a sequence: u_n Explicit expression. Set u_n = 0 + 0.1(n-1).

  3. Add a sequence: u_n+1 Recursive first order. Set v_n+1 and v1. The variables are from var, Sequences.

    Define un and vn in sequences mode on NumWorks
    define in Sequences app
  4. Use arrow keys to move to Table tab to view the table and change settings.

    View the sequences table on NumWorks
    viewing the table

Note you can also do recursive for both, it’s just that for purpose of taking screenshots I did explicit and recursive.

purposesymbolbutton(s)
sequences mode (home), Sequences app
recursive sequenceu_n+1 Recursive first orderAdd a sequence
set nFirst term indexhighlight three dots after sequence is defined
sequencesu, v var, sequences
set/view tableTable tab

Second order and coupled DE (AI HL only)

Pretty much the same thing, but we have two derivatives and require two to three variables. Only the recursive method will be explored, as the chaining method needs three to four variables.

Example: M25 P2 TZ2 HL 6 (d), modified

A financial analyst models the change in value of one share, x  dollars at time t  minutes, after a report is released. She uses the differential equation

 d2x dt2+4 dx dt+3x=xsint\frac{\d^2 x}{\d t^2} + 4\frac{\d x}{\d t} + 3x = x \sin t

This equation can be written as the coupled differential equations

 dx dt=y dy dt=3x4y+xsint\frac{\d x}{\d t} = y \\ \frac{\d y}{\d t} = -3x - 4y + x \sin t

Initially x=0x = 0 and  dx dt=1\displaystyle \frac{\d x}{\d t} = -1.

(d) Use Euler’s method with a tt-interval of 0.10.1 to predict the value of xx when t=1t = 1.

“Initially” means t=0t = 0. This questions happens to use the same h=0.1h = 0.1 as above, but that is just a coincidence.

tn+1=tn+0.1GDC uses an+1xn+1=xn+0.1(yn)GDC uses bn+1yn+1=yn+0.1(3xn4yn+xnsintn)GDC uses cn+1\begin{align*} t_{n+1} &= t_n + 0.1 &\text{GDC uses } a_{n+1} \\ x_{n+1} &= x_n + 0.1\left(y_n\right) &\text{GDC uses } b_{n+1} \\ y_{n+1} &= y_n + 0.1\left(-3x_n - 4y_n + x_n \sin t_n\right) &\text{GDC uses } c_{n+1} \end{align*}

Commentary: Question does not usually provide the coupled DE for you. Using question variables, write down the Euler’s method formula with the derivatives substituted in. To avoid data entry errors, write down the correspondence between calculator variables (usually u_n, v_n or a_n, b_n). Also good idea to wrap the derivatives in parentheses ( ).

Tip: Using recursive form above means you never have to worry about your minimum n, and can always use the GDC default, whether that is 0 or 1.

The values

ttxxyy
00-1
0.1-0.1-0.6
1.0-0.17180.1043

When t=1t = 1, xx is approx 0.172-0.172 \qed

Tip: ensure your GDC is in radians when seeing trig functions but not the °\degree (degree) symbol.

These instructions assume you are familiar with ones from recursive x then y above.

  1. In mode instead of FUNC or FUNCTION choose SEQ. In window, use SEQ(n+1), and type up the above recursive relations.

    In Seq mode, use seq(n+1). nMin = 1. u(n+1) = u(n) + 0.1. u(1) = 0. u(2) left blank. v(n+1)= v(n) + 0.1(w(n)). v(1) = 0. v(2) left blank. w(n+1)=w(n) + 0.1(-3v(n)-4w(n)+v(n)*sin(t(n))))
    In Seq mode, use seq(n+1). nMin = 1. u(n+1) = u(n) + 0.1. u(1) = 0. u(2) left blank. v(n+1)= v(n) + 0.1(w(n)). v(1) = 0. v(2) left blank. w(n+1)=w(n) + 0.1(-3v(n)-4w(n)+v(n)*sin(t(n))))
  2. Check 2nd graph

    Table showing n=11, u=1, v=-0.172, w=0.104
    Table of values

To graph the solution

  1. In window set appropriate n, X and Y values.

    Window.
nMax=11 
Plot Start=l 
PlotStep=1 
Xmin= -0.25 
Xmax=0 
Xscl=l 
Ymin= -1.2 
Ymax=0.15
    Table of values
  2. In 2nd window, change top line to vw. For a single (non-coupled DE), choose uv.

    choose vw and not Time, Web, uv, or uw.
    Select the two sequences to plot
  3. Graph graph.

    Curve start from (0, -1) goes up and left to around (-0.21, 0), then slings back to (-0.17, 0.10)
    DE solution y plotted against x
  1. In In Lists & Spreadsheet app, enter the boundary conditions in the first row. Set the time in a2 and use menu 3:Data 3:Fill down arrows to drag down the formula. enter to confirm. We also need to name the columns if you want to view a plot in step 3.

    row 1: 0. 0. -1. cell A2: = a1+0.1
  2. Enter the formulas into b2 and c2 and drag the formulas down as well.

    b2 = b1+0.1c1
    c2 = c1 + 0.1(-3b1 - 4c1 + b1 sin(a1))
    row 11. 1. -0.1718. 0.1043
  3. To graph the solution in xyxy-plane, add a Data & Statistics tab. Select the columns named earlier.

    Dots start from (0, -1) goes up and left to around (-0.21, 0), then slings back to (-0.17, 0.10)
    DE solution y plotted against x
  1. In MENU RECUR or Recursion app, in F3 (TYPE) choose F2:an+1=Aan+Bn+C. Define the above sequences using the F4 (n,an) tab.

    a(n+1) = an + 0.1. b(n+1) = bn + 0.1 cn. c(n+1) = cn + 0.1(-3bn - 4cn + bn sin an)
    a(n+1) = an + 0.1. b(n+1) = bn + 0.1 cn. c(n+1) = cn + 0.1(-3bn - 4cn + bn sin an)
  2. In F5 (SET), change END to show enough terms, and set a0, b0, c0 to the initial values.

    Table setting n+1. Start: 0. End: 10. a0: 0. b0: 0. c0: -1.
  3. View table in F6 (TABLE). Scroll for the desired value.

    n+1 =10. a(n+1)=1. b(n+1) = -0.171796. c(n+1) = 0.1043

Warning: GDC cuts the number at 0.171-0.171 and we need to highlight value to see it is 0.172-0.172

To graph the solution

  1. In Shift F3, change the X and Y zooms.

    View Window Xmin: 0.-25 
max: 0 
scale: 0.05 
dot: 6.6137 x 10^-0.4 
Ymin: -1.2 
max: 0.15
  2. Exit. In F3 (PHASE), select b-c for the second and third lists. For single DE, select a-b instead.

    screen prompts for a-b, b-c, or a-c
  3. Graph using F6.

    Dots start from (0, -1) goes up and left to around (-0.21, 0), then slings back to (-0.17, 0.10)
  1. In Apps , use Sequence app near the end.

  2. Choose U(N+k) for recursive sequences. Define U1(n+1) and U2(n+1). Use on-screen buttons as needed.

    Define U1(n+1), U2(n+1), U3(n+1) in Sequences app on HP Prime
    Define U1(n+1), U2(n+1), U3(n+1) in Sequences app on HP Prime
  3. In Num ⊞ to view the table. Settings can be changed in Shift Num ⊞ . Go back to Symb ✗ to change the sequences.

    Row 11 says N = 11. U1 = 1. U2 = -0.1718. U3 = 0.1043

To graph the solution

  1. In Apps , select Statistics 2Var. Make C1 into U2(X), and C2 into U3(X), with X maximum set to upper limit, which here is 11.

    Make Column Data. Expression:U2(X). Var:X. Start:1. Stop:11. Step:1. Col: C1
    Make Column Data. Expression:U3(X). Var:X. Start:1. Stop:11. Step:1. Col: C2
    U2 and U3 copied to C1 and C2
  2. In Symb ✗ , ensure S1 has C1 and C2 beside it.

    [checked] S1: C1 C2. Type1: Linear.
  3. Plot using Plot . In Menu, Zoom, choose B AUTOSCALE.

    Circles start from (0, -1) goes up and left to around (-0.21, 0), then slings back to (-0.17, 0.10)
  1. In (home), use Sequences app. Add threes sequence of type u_n Explicit expression. This allows u, v, w to be stored in var, Sequences.

    u_(n+1) = un + 0.1. u1 = 0. v(n+1) = vn + 0.1*(wn). v1 = 0
    v(n+1) = vn + 0.1*(wn). v1 = 0. w(n+1) = wn + 0.1(-3vn - 4wn + vn sin (un)). w1 = -1
  2. Use arrow keys to move to Table tab to view the table and change settings.

    when n = 11. un = 1. vn = -0.1718

To graph the solution

  1. In (home), use Regression app. Highlight X1 then press EXE. Select Fill with a formula. Modify the {k}_k≤10 template to add {v_k} to X1 and Y1. The variable k can be entered using x,n,t. We want to go up to n=11. Do the same to add {w_k} to Y1.

    X1 column options. Sort .. By increasing values. Fill with a formula (highlighted). Model. Show in graph and Stats. On. Clear column,
    X1 = {v_k}_k≤11
    Y1 = {w_k}_k≤11
  2. Use arrow keys and select Graph. By default, the zooms should be set for you.

    Dots start from (0, -1) goes up and left to around (-0.21, 0), then slings back to (-0.17, 0.10)