Question 2.6.2: Solve the IVP y= y −t , y(0) = 0.5 exactly, and use Euler’s ...

Solve the IVP \acute{y}= y − t , y(0) = 0.5 exactly, and use Euler’s method with the step sizes h = 0.2 and h = 0.1 to estimate the value of y(1). Hence analyze the effect that step size has on error in the method.

The Blue Check Mark means that this solution has been answered and checked by an expert. This guarantees that the final answer is accurate.
Learn more on how we answer questions.

We first observe that y´= y −t is a linear first-order DE. Applying our work from section 2.3, we can determine that the solution to this equation is y =1+t +Ce^{t} . The initial condition y(0)=0.5 then implies that C =−1/2, so that the solution to the IVP is

y(t ) = 1+t − \frac {e^{t}}{2}

If we apply Euler’s method with h = 0.2 and take 5 steps to determine y_{n} at each, and also evaluate y(y_{n} ) at each stage, the resulting output is shown in table 2.2.

Table 2.2 Euler’s method applied to the IVP y´=y −t, y(0)=0.5, using h=0.2

Error Solution Euler Est.
| yt_{n}−y_{n}| yt_{n} y_{n} t_{n}
0 0.5 0.5 0
0.0107014 0.5892986 0.6 0.2
0.0259123 0.6540877 0.68 0.4
0.0470594 0.6889406 0.736 0.6
0.0759705 0.6872295 0.7632 0.8
0.1149809 0.6408591 0.75584 1.0

Here, we observe the obvious pattern that the further we step away from the initial condition, the greater the error we encounter. This is a natural consequence of the use of linear approximations.

To get a further sense of how the error at a given step depends on step size, we now apply the same method with h = 0.1. Doing so produces the results in table 2.3. For ease of display and comparison to the case where h = 0.2, we only report the results from every other step.

Table 2.3
Euler’s method applied to the IVP y´= y −t, y(0) = 0.5, using h = 0.1

Error Solution Euler Est.
| yt_{n}−y_{n}| yt_{n} y_{n} t_{n}
0 0.5 0.5 0
0.0057014 0.5892986 0.595 0.2
0.0138623 0.6540877 0.66795 0.4
0.0252789 0.6889406 0.7142195 0.6
0.0409761 0.6872295 0.728205595 0.8
0.0622697 0.6408591 0.70312877 1

By comparing the approximations in the preceding two tables at the common values of t = 0.2,0.4,0.8,1 we can see that cutting the step size in half appears to have reduced the error by a factor of approximately 2.

Related Answered Questions

In this equation, p(t ) = 2, and therefore P(t ) =...
We begin by observing that this equation is neithe...
We note that the given equation is nonlinear due t...
First, we may write e^{t+2y} = e^{t} e^{2y}...
Following our approach in example 2.3.1, we can se...