Skip to content

Explicite Euler method

To describe an evolutionary process, or the profile of a water line, for example, we often have to solve a first-order ordinary differential equation (EDO). This equation writes how a function varies, at a given point (an instant or a point in space), knowing the value of this mathematical function, the problem to be solved is written:

{dydt=f(y,t)y(t=t0)=y0

where dydt refers to the derivative with respect to t of the function y (which depends on the variable t); the variable y0 is called the boundary condition; it conditions the final solution of the equation.

As we often do not know an analytical solution to this problem, we will use approximate methods to estimate the solution. So we make a discretization of the variable t. We note the discretization step, and solve the problem at the points t0, t1=t0+Δt, t2=t0+2Δt, ..., tn=t0+nΔt where n is an integer.

The explicit Euler method is the most intuitive; it consists in considering that, from a point ti to a point ti+1, the function evolves linearly, with a trajectory that is the one that can be calculated at point ti.

The problem is solved as follows:

  • we know the function f, a point ti where we know yi
  • so we can calculate yi=f(y,t)
  • we then estimate the value of y at point ti+1=ti+Δt: yi+1yi+yiΔt
  • you can then iterate (solve step by step) to move to the next point. The problem is initialized from t0 where we know y0 (boundary condition).

We can feel that this scheme will only work well if Delta is not too big. Values of too high Δt can give completely false results, leading to erroneous physical interpretations. However, its interest is its simplicity, and it can be easily implemented on a table.

Example application: exponential process

Consider the following (simple) problem:

So we have here f(y,t)=ay. The analytical solution is easily solved, giving y(t)=y0exp(a(tt0)). The problem can be solved by the Euler method:

  • we choose Δt (for example, Δt=1)
  • calculate y1=y0ay0Δt
  • calculate y2=y1ay1Δt etc.

It can be seen that the resolution is not very precise; this is linked to the calculation step being too large given the method chosen and the equation to be solved.