# Understanding definition of explicit Euler method

I'm quite new to ODE and the IVP (initial value problem), so I've some doubts related to these topics.

I'm reading a draft provided by my professor which talks about the "polygon" or explicit Euler method.

The goal to use this method is to find an approximation of the solution to the IVP.

In the draft, it starts by explaining the following things:

Then, starting from $y_0$, we construct an approximation $y_\tau$ of $y$ as follows: first, we choose $n + 1$ points $t_0,\ldots ,t_n$ with the following properties:

1. $$\tau = \frac{t_n - t_0}{n}$$

2. $$t_i = t_0 + i\cdot \tau$$ for $i = 0,1,\ldots,n$

Now we recursively define the values of our approximation $y_\tau$ by exploiting the ODE

$$\frac{d y(t)}{ dt} = \lambda y(t)$$ $t \in (t_0, t_{\rm end}]$

$$y_\tau(t_{i + 1}) = y_\tau(t_i) + \tau \cdot \lambda\cdot y_\tau(t_{i})$$

Can someone explain to me:

1. What's the relation between the IVP and this definition to find $y_\tau$?

2. What's "tau" ($\tau$) here doing?

3. Why do we choose the 2 points above as we did?

One-line answers may not be satisfiable, since I'm new to these topics, but I appreciate any help!

• – Moo
Commented Jun 5, 2016 at 22:07
• The question looks fine now imo. Commented Jun 6, 2016 at 17:13

To get an intuition for IVP, I approach it like this: Assume you want to find $y(t_{end})$ for some unknown function $y(t)$. What you have is $y(t_0$) and the slope of the graph given by the first order ODE: $$\frac{dy(t)}{dt} = \lambda y(t)$$

How would you try to find $y(t_{end})$ when looking at the graph of $y$ where the abscissa is $t$? As said before, what you know is $y(t_0)$ and the slope at every point, thus we also know the slope at $t_0$ given by $\frac{dy}{dt} (t_0)$.

The following steps can be more comprehensive if you try it with pen and paper and try to draw the graph of $y(t)$ where the abscissa is $t$. We can get a crude approximation of $y(t_{end})$ by constructing a line going through $y(t_0)$ with the slope at $t_0$ given by $\frac{dy}{dt}(t_0)$. We evaluate that line at $t_{end}$ and get the approximation for $y(t_{end})$.

More compactly we can formulate this walking on the line by directly by computing $y(t_0) + \Delta t \cdot m$ where $\Delta t := t_{end} - t_0$ is how far we go on the abscissa and $m$ is the line slope given by $\frac{dy}{dt} (t_0)$. This gives $y(t_{end}) \approx y(t_0) + \Delta t \frac{dy}{dt}(t_0)$.

But as you probably expect this doesn't give you a very good approximation. Something simple that you can do to improve the approximation is you divide your step (which is now $\Delta t$) into $n$ steps. To do this we need to compute the corresponding step size tau $\tau = \frac{\Delta t}{n} = \frac{t_{end}- t_0}{n}$ and evaluate the line slopes at the intermediate positions i.e. $\frac{dy}{dt}(t_i)$ where $t_{i+1} = t_{i} + \tau$ which is equal to $t_i = t_0 + i \cdot \tau$.

In our case, the intermediate $y$ values are then given by $$y(t_{i+1}) = y(t_{i}) + \tau \cdot \frac{dy}{dt}(t_{i})= y(t_{i}) + \tau \cdot \lambda y(t_{i})$$

If you already know Taylor series', you can look at this formula as a first order taylor approximation of $y(t_{i+1})$ at $y(t_{i})$.

The different evaluation points $t_i$ can be chosen arbitrarily (you want them to choose s.t. your result is a good approximation), but the step size must be adapted accordingly. If we look at the taylor approximation we have $$y(t_{i+1}) = y(t_i) + (t_{i+1} - t_i) \cdot \frac{dy}{dt}(t_i)$$

• $\frac{dy}{dt}$ does not belong to the definition of the explicit Euler method. Basically the Euler method takes the following parameters: $y(t_0), {t_0, \ldots, t_{end}}, \frac{dy}{dt}$ and returns ${y(t_i)}$ as a result. Another IVP would i.e. have a different $\frac{dy}{dt}$ but the Euler method is still applicable. Note that the problem is that we do not have $y(t)$, but yes during the computation $y(t_i)$ depends on $\frac{dy}{dt}$. In practice this is useful if we cannot integrate $\frac{dy}{dt}$ analytically,this happens surprisingly often, especially for partial differential equations. Commented Jun 6, 2016 at 12:38