Problem:
Consider the differential equation
dydt=y
with y(0)=1. The exact solution to this problem is given by y(t)=et. Knowing the exact solution and using Δt=0.1 with the Euler scheme, compute the local error for two iterative steps ((a) ϵ1, (b) ϵ2) and compute the global error ((c) E1, (d) E2) at each of the three steps.
Solution:
The local error computation is exactly the same as the last problem.
ϵ1=e0.1−(1+0.1)≈0.0052
ϵ2=e0.2−(e0.1+0.1e0.1)≈0.0057
For the 1st step, the global error is actually the same as the local error.
E1=ϵ1=0.0052
For the 2nd step, we need to actually iterate twice.
y1=1+0.1
y2=y1+0.1y1=1.21
Therefore E2=e0.2−1.21≈0.011
Notice an important observation here - ϵ2≠E2−E1. The error introduced in the last step also lead to wrong slope estimation, the local error of the second step assumed the correct slope will be there!
Consider the differential equation
dydt=y
with y(0)=1. The exact solution to this problem is given by y(t)=et. Knowing the exact solution and using Δt=0.1 with the Euler scheme, compute the local error for two iterative steps ((a) ϵ1, (b) ϵ2) and compute the global error ((c) E1, (d) E2) at each of the three steps.
Solution:
The local error computation is exactly the same as the last problem.
ϵ1=e0.1−(1+0.1)≈0.0052
ϵ2=e0.2−(e0.1+0.1e0.1)≈0.0057
For the 1st step, the global error is actually the same as the local error.
E1=ϵ1=0.0052
For the 2nd step, we need to actually iterate twice.
y1=1+0.1
y2=y1+0.1y1=1.21
Therefore E2=e0.2−1.21≈0.011
Notice an important observation here - ϵ2≠E2−E1. The error introduced in the last step also lead to wrong slope estimation, the local error of the second step assumed the correct slope will be there!
No comments:
Post a Comment