Euler's Method for Differential Equations

Before this, knowSlope Fields

Interactive · 2 questions

Often in the study of differential equations, a closed form solution is difficult if not impossible to find. In these cases, it is useful to be able to approximate the nature of these solutions. Euler's Method is one such method for doing this.

Euler's Method applies to differential equations of the form dydx=f(x,y)\frac{dy}{dx}=f(x, y) given an initial point (x0,y0)(x_0, y_0). Then the value of y(x)y(x) can be approximated in nn "steps" as follows:

Let D=x−x0nD=\frac{x-x_0}{n}. For 0≤i≤n−10\le i\le n-1, let: xi=xi−1+Dx_i=x_{i-1}+D yi=yi−1+Df(xi−1,yi−1)y_i=y_{i-1}+Df(x_{i-1}, y_{i-1})

Then xn=xx_n=x and yny_n will be an approximation of y(x)y(x).

Notice that at each step, yiy_i is calculated using a tangent line approximation. In other words, between each xi−1x_{i-1}, xix_i, we assume that line tangent to y(x)y(x) at xi−1x_{i-1} behaves similar to the graph itself. Generally speaking, as nn increases, this assumption becomes more valid since the gaps between successive xix_i decrease.

Example: Let y(x)y(x) be a function of xx which satisfies y′=1x+yy'=\frac{1}{x+y} and y(3)=1y(3)=1. Approximate y(5)y(5) with 22 and with 44 steps.

Let's do 22 steps first.

What's the value of DD here?

Choose one answer

Read · 1 min

Euler's method applies to first-order ordinary differential equations of the form y′=F(x,y)y'=F(x, y), given an initial point (x0,y0)(x_0, y_0). Specifically, the value of y(x)y(x) can be approximated in nn "steps" as follows: Let D=x−x0nD=\frac{x-x_0}{n}. For 0≤i≤n−10\le i\le n-1, let: xi=xi−1+Dx_i=x_{i-1}+D and yi=yi−1+D×F(xi−1,yi−1)y_i=y_{i-1}+D\times F(x_{i-1}, y_{i-1}). Then xn=xx_n=x and yny_n will be an approximation of y(x)y(x). Notice that at each step, yiy_i is calculated using a tangent line approximation: we are approximately (with step size DD) "tracing along a solution curve in the slope field". Generally speaking, the approximation improves as nn increases and the step size DD decreases.

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems