Skip to content
    Calculus

    Euler's Method Explained with a Step-by-Step Example

    How does a computer solve an equation it can't solve exactly? It takes tiny straight steps, checking the direction after each one, like walking through fog with a compass. That's Euler's method. This guide shows how it works, with a table you can follow by hand.

    Math Solver Academic Editorial Board5 min read

    Key takeaways

    • Euler's method: yₙ₊₁ = yₙ + h · f(xₙ, yₙ).
    • Use the slope at the start of each step, then move forward by h.
    • Smaller steps give better answers: halving h roughly halves the error.
    • For growth problems like dy/dx = ky with k > 0, Euler's estimate comes out too low.
    In this guide
    1. 01What is Euler's method?
    2. 02Why does Euler's method matter?
    3. 03The formula
    4. 04How to use Euler's method step by step
    5. 05Common mistakes to avoid
    6. 06Tips and tricks
    7. 07Where you'll use it in real life
    8. 08Quick summary
    9. 09Worked example
    10. 10Frequently asked questions

    What is Euler's method?

    A differential equation tells you the slope of the solution at every point, but not the solution itself. Euler's idea is simple. Start at a known point, look at the slope there, and walk a short straight step in that direction. At the new point, check the slope again and take another step. Repeat until you reach your target.

    It is like walking across a field in fog, checking your compass every few steps. Smaller steps keep you closer to the true path.

    Why does Euler's method matter?

    Most differential equations in real life, from weather to planetary orbits, have no neat formula for their solution. Computers solve them by stepping forward in small pieces. Euler's method is the simplest version, and every more advanced method builds on the same idea.

    It also teaches an important lesson: approximations have errors, and step size controls them. Look at dy/dx = 0.5y from y(0) = 100 up to x = 2. The exact answer is about 271.83.

    Step size hEuler estimateError
    0.5244.1427.69
    0.25256.5815.25
    0.1265.336.50
    Halve the step and you roughly halve the error. That's why Euler's method is called a first-order method.

    The formula

    yₙ₊₁ = yₙ + h · f(xₙ, yₙ)
    SymbolWhat it meansExample
    yₙYour current estimate100
    yₙ₊₁The next estimate125
    hStep size in x0.5
    f(xₙ, yₙ)The slope dy/dx at the current point. Here k·yₙ0.5 × 100 = 50
    kGrowth rate in dy/dx = k·y0.5

    This calculator uses the equation dy/dx = k·y, starting at x = 0 with y = y₀, and steps until it reaches your target x. For this equation each step is simply yₙ₊₁ = yₙ × (1 + k·h). It lists the first four steps, the final estimate, the exact answer y₀·e^(k·x) and the error.

    How to use Euler's method step by step

    1. 1Write down the start. Note (x₀, y₀) and the step size h.
    2. 2Find the slope. At the current point, slope = k·yₙ.
    3. 3Take a step. yₙ₊₁ = yₙ + h × slope and xₙ₊₁ = xₙ + h.
    4. 4Repeat. Keep going until x reaches the target. The number of steps is target ÷ h.

    Now choose your own k, start, target and step size below, and compare the estimate with the exact answer.

    Try it yourself

    Pre-filled with the example — change any value.

    🧮
    Calculus
    University

    Euler's Method (ODE Approximation)

    Approximate y(x_target) for dy/dx = ky using Euler's method with step size h.

    yₙ₊₁ = yₙ + h·f(xₙ, yₙ)

    f'(x) slope
    Tangent Line dy/dx
    0.120
    0.120
    0.120
    0.120

    💡 Example

    Reference
    Inputs:k=1, y0=1, xtarget=1, h=0.25
    Result:2.4414
    Open the full Euler's Method (ODE Approximation) calculator

    Common mistakes to avoid

    • Using a big step size. Large h gives a big error. Try halving it and see how the answer moves.
    • Forgetting to update x. Each step moves x forward by h.
    • Treating the answer as exact. It is an estimate. For growth it usually comes out too low, because the slope keeps rising during each step.
    • Miscounting steps. Going from 0 to 2 with h = 0.5 takes 4 steps, not 5.

    Tips and tricks

    • Make a table: columns for n, xₙ, yₙ and slope keep your working tidy.
    • Compare with the exact curve: the separable ODE calculator gives the true solution of dy/dx = ky.
    • Same idea for areas: the Riemann sum calculator also adds up small straight pieces.

    Where you'll use it in real life

    • Video games: physics engines step positions and speeds forward each frame.
    • Epidemics: simple models of how a disease spreads day by day.
    • Space: a first estimate of a spacecraft's or planet's path.
    • Finance: stepping a growing balance forward in time; see the exponential growth calculator.

    Quick summary

    Euler's method walks along the solution in small straight steps: new y = old y + h × slope at the old point. Smaller steps give smaller errors, at the cost of more work. Use the calculator above to watch the steps and compare the estimate with the exact answer.

    Worked example

    A savings balance of $100 grows continuously at a rate of 50% per year, so dy/dx = 0.5y. Estimate the balance after 2 years using Euler's method with steps of half a year, then compare with the exact answer. Use k = 0.5, y₀ = 100, target x = 2 and h = 0.5.

    1. 01ODE: dy/dx = 0.5y, y(0) = 100, target x = 2, h = 0.5
    2. 02Euler's method: yₙ₊₁ = yₙ + h·f(xₙ, yₙ) = yₙ + h·0.5yₙ = yₙ(1 + 0.25)
    3. 03Step 1: x=0.5, y=125
    4. 04Step 2: x=1, y=156.25
    5. 05Step 3: x=1.5, y=195.3125
    6. 06Step 4: x=2, y=244.1406
    7. 07Euler approximation: y(2) ≈ 244.1406
    8. 08Exact value: y₀·e^(1) = 271.8282
    9. 09Error: 27.6876

    These numbers are pre-filled in the calculator above.

    Frequently asked questions

    How do I make Euler's method more accurate?

    Use a smaller step size h. The error shrinks roughly in proportion to h, so 10 times smaller steps give about 10 times less error, but need 10 times more work.

    What is Euler's method for dy/dx = y with h = 0.25?

    Starting at y(0) = 1, each step multiplies by 1.25. After four steps, y(1) ≈ 1.25⁴ ≈ 2.4414, compared with the exact value e ≈ 2.7183.

    Why is Euler's method called a first-order method?

    Its total error is proportional to the step size h (to the first power). Better methods like the classic Runge-Kutta method have errors proportional to h⁴.

    Why does Euler's method underestimate growth?

    For dy/dx = ky with k > 0, the curve bends upward. Each straight step uses the slope at its start, which is the smallest slope in that step, so the estimate falls a little behind.

    #Calculus#University#Euler's Method (ODE Approximation)
    Updated

    Keep reading

    Sponsored ToolsAd

    More tools on Ytools →
    Calcu.click — 25+ Free Smart Calculators preview

    Calcu.click — 25+ Free Smart Calculators

    Brand new calculation platform with 0ms reactive math, 100% client-side privacy, and dedicated subdomains. Fast calculators for EMI, SIP, Mortgage, Income Tax, BMI, Age, Percentage, and more.

    25+ CalculatorsFinanceHealth0ms Real-TimeFree
    Keyboard Arena preview

    Keyboard Arena

    Master touch typing with real-time WPM speed tests, mechanical switch audio, A-Z finger biomechanics drills, 40+ structured lessons, and competitive arcade games.

    Typing TestWPMTouch Typing
    Flutter Log Explorer preview

    Flutter Log Explorer

    Real-time structured log viewer and search explorer for Flutter & Dart. Zero-config capture from Debug Adapter (DAP) & Dart VM Service with smart classification and filters.

    FlutterDartVS Code ExtensionOpen VSX