Last modified: September 30, 2023

This article is written in: πŸ‡ΊπŸ‡Έ

Euler's Method

Euler's Method is a numerical technique applied in the realm of initial value problems for ordinary differential equations (ODEs). The simplicity of this method makes it a popular choice in cases where the differential equation lacks a closed-form solution. The method might not always provide the most accurate result, but it offers a good trade-off between simplicity and accuracy.

Mathematical Formulation

Consider an initial value problem (IVP) represented as:

uβ€²=f(t,u), u(t0)=u0.

This IVP can be solved by Euler's method, where the method employs the following approximation:

un+1=un+hβˆ—f(tn,un),

where: - un+1 is the approximate value of u at t=tn+h, - un is the approximate value of u at t=tn, - h is the step size, - f(tn,un) is the derivative of u at t=tn.

Derivation

Let's start with the Taylor series:

u(t+h)=u(t)+huβ€²(t)+O(h2)

We may alternatively rewrite the above equation as follows:

u(t+h)=u(t)+hf(u(t),t)+O(h2).

Which is roughly equivalent to:

u(t+h)=u(t)+hf(u(t),t)

Algorithm Steps

  1. Start with initial conditions t0 and u0.
  2. Calculate un+1 using the formula: un+1=un+hβˆ—f(tn,un).
  3. Repeat the above step for a given number of steps or until the final value of t is reached.

Example

uβ€²(t)=u(t),

u(0)=1

u(0.1)=?

Let's choose the step value: h=0.05

We start at t=0:

u(0.05)β‰ˆu(0)+0.05uβ€²(0)

u(0.05)β‰ˆ1+0.05u(0)

u(0.05)β‰ˆ1+0.05β‹…1

u(0.05)β‰ˆ1.05

Now that we know u(0.05), we can calculate the second step:

u(0.1)β‰ˆu(0.05)+0.05uβ€²(0.05)

u(0.1)β‰ˆ1.05+0.05u(0.05)

u(0.1)β‰ˆ1.05+0.05β‹…1.05

u(0.1)β‰ˆ1.1025

Advantages

Limitations

Table of Contents

    Euler's Method
    1. Mathematical Formulation
    2. Derivation
    3. Algorithm Steps
    4. Example
    5. Advantages
    6. Limitations