微积分I(标准路径) · free preview

§7.3 Euler's method

什么是欧拉方法?如何利用它来近似求解初值问题?

1. Introduction

Introduction

2. Euler's Method

Euler's Method

3. The error in Euler's method

The error in Euler's method

4. Summary

Summary

5. Consider the initial…

Consider the initial value problem

dydt=12(y+1), y(0)=0\frac{dy}{dt} = \frac12 (y + 1), \ y(0) = 0

.

Use the differential equation to find the slope of the tangent line to the solution y(t)y(t) at t=0t=0. Then use the given initial value to find the equation of the tangent line at t=0t=0.

6. Use Euler's method w…

Use Euler's method with Δt=0.2\Delta t = 0.2 to approximate the solution at ti=0.2,0.4,0.6,0.8t_i = 0.2, 0.4, 0.6, 0.8, and 1.01.0. Record your work in the following table, and sketch the points (ti,yi)(t_i, y_i) on the axes provided.

tit_i | yiy_i | dy/dtdy/dt | Δy\Delta y

0.00000.0000 | 0.00000.0000 | |

0.20000.2000 | | |

0.40000.4000 | | |

0.60000.6000 | | |

0.80000.8000 | | |

1.00001.0000 | | |

7. Find the exact solut…

Find the exact solution to the original initial value problem and use this function to find the error in your approximation at each one of the points tit_i.

8. How would your compu…

How would your computations differ if the initial value was y(0)=1y(0) = 1? What does this mean about different solutions to this differential equation?

9. Explain why the valu…

Explain why the value y5y_5 generated by Euler's method for this initial value problem produces the same value as a left Riemann sum for the definite integral ∫01(2t−1) dt\int_0^1 (2t-1)~dt.

10. Sketch the slope fie…

Sketch the slope field for this differential equation on the axes provided.

11. Identify any equilib…

Identify any equilibrium solutions and determine whether they are stable or unstable.

12. What is the long-ter…

What is the long-term behavior of the solution that satisfies the initial value y(0)=1y(0) = 1?

13. Using the initial va…

Using the initial value y(0)=1y(0) = 1, use Euler's method with Δt=0.2\Delta t = 0.2 to approximate the solution at ti=0.2,0.4,0.6,0.8t_i = 0.2, 0.4, 0.6, 0.8, and 1.01.0. Record your results in the table and sketch the corresponding points (ti,yi)(t_i, y_i) on the axes provided. Note the different horizontal scale on the axes here compared to the axes above.

tit_i | yiy_i | dy/dtdy/dt | Δy\Delta y

0.00.0 | 1.00001.0000 | |

0.20.2 | | |

0.40.4 | | |

0.60.6 | | |

0.80.8 | | |

1.01.0 | | |

14. What happens if we a…

What happens if we apply Euler's method to approximate the solution with y(0)=6y(0) = 6?

15. Newton's Law of Cool…

Newton's Law of Cooling says that the rate at which an object, such as a cup of coffee, cools is proportional to the difference in the object's temperature and room temperature. If T(t)T(t) is the object's temperature and TrT_r is room temperature, this law is expressed at

dTdt=−k(T−Tr)\frac{dT}{dt} = -k(T-T_r)

, where kk is a constant of proportionality. In this problem, temperature is measured in degrees Fahrenheit and time in minutes. - Two calculus students, Alice and Bob, enter a 70 ∘^\circ classroom at the same time. Each has a cup of coffee that is 100 ∘^\circ. The differential equation for Alice has a constant of proportionality k=0.5k=0.5, while the constant of proportionality for Bob is k=0.1k=0.1. What is the initial rate of change for Alice's coffee? What is the initial rate of change for Bob's coffee? - What feature of Alice's and Bob's cups of coffee could explain this difference? - As the heating unit turns on and off in the room, the temperature in the room is

Tr=70+10sin⁡tT_r=70+10\sin t

. Implement Euler's method with a step size of Δt=0.1\Delta t = 0.1 to approximate the temperature of Alice's coffee over the time interval 0≤t≤500\leq t\leq 50. This will most easily be performed using a spreadsheet such as Excel. Graph the temperature of her coffee and room temperature over this interval. - In the same way, implement Euler's method to approximate the temperature of Bob's coffee over the same time interval. Graph the temperature of his coffee and room temperature over the interval. - Explain the similarities and differences that you see in the behavior of Alice's and Bob's cups of coffee.

16. We have seen that th…

We have seen that the error in approximating the solution to an initial value problem is proportional to Δt\Delta t. That is, if EΔtE_{\Delta t} is the Euler's method approximation to the solution to an initial value problem at t‾\overline{t}, then

y(t‾)−EΔt≈KΔty(\overline{t})-E_{\Delta t} \approx K\Delta t

for some constant of proportionality KK.

In this problem, we will see how to use this fact to improve our estimates, using an idea called accelerated convergence. - We will create a new approximation by assuming the error is exactly proportional to Δt\Delta t, according to the formula

y(t‾)−EΔt=KΔty(\overline{t})-E_{\Delta t} =K\Delta t

. Using our earlier results from the initial value problem dy/dt=ydy/dt = y and y(0)=1y(0)=1 with Δt=0.2\Delta t = 0.2 and Δt=0.1\Delta t = 0.1, we have

y(1)−2.4883=(0.2Ky(1)−2.5937=(0.1K\begin{aligned} y(1) - 2.4883 =\mathstrut & 0.2K \\ y(1) - 2.5937 =\mathstrut & 0.1K \end{aligned}

. This is a system of two linear equations in the unknowns y(1)y(1) and KK. Solve this system to find a new approximation for y(1)y(1). (You may remember that the exact value is y(1)=e=2.71828…y(1) = e = 2.71828\ldots.) - Use the other data, E0.05=2.6533E_{0.05} = 2.6533 and E0.025=2.6851E_{0.025} = 2.6851 to do similar work as in (a) to obtain another approximation. Which gives the better approximation? Why do you think this is? - Let's now study the initial value problem

dydt=t−y, y(0)=0\frac{dy}{dt} = t-y, \ y(0) = 0

. Approximate y(0.3)y(0.3) by applying Euler's method to find approximations E0.1E_{0.1} and E0.05E_{0.05}. Now use the idea of accelerated convergence to obtain a better approximation. (For the sake of comparison, you want to note that the actual value is y(0.3)=0.0408y(0.3) = 0.0408.)

17. In this problem

In this problem, we'll modify Euler's method to obtain better approximations to solutions of initial value problems. This method is called the Improved Euler's method.

In Euler's method, we walk across an interval of width Δt\Delta t using the slope obtained from the differential equation at the left endpoint of the interval. Of course, the slope of the solution will most likely change over this interval. We can improve our approximation by trying to incorporate the change in the slope over the interval.

Let's again consider the initial value problem dy/dt=ydy/dt = y and y(0)=1y(0) = 1, which we will approximate using steps of width Δt=0.2\Delta t = 0.2. Our first interval is therefore 0≤t≤0.20\leq t \leq 0.2. At t=0t=0, the differential equation tells us that the slope is 1, and the approximation we obtain from Euler's method is that y(0.2)≈y1=1+1(0.2)=1.2y(0.2)\approx y_1= 1+ 1(0.2)= 1.2.

This gives us some idea for how the slope has changed over the interval 0≤t≤0.20\leq t\leq 0.2. We know the slope at t=0t=0 is 1, while the slope at t=0.2t=0.2 is 1.2, trusting in the Euler's method approximation. We will therefore refine our estimate of the initial slope to be the average of these two slopes; that is, we will estimate the slope to be (1+1.2)/2=1.1(1+1.2)/2 = 1.1. This gives the new approximation y(1)=y1=1+1.1(0.2)=1.22y(1) = y_1 = 1 + 1.1(0.2) = 1.22.

The first few steps look like what is found in Table 7.3.

tit_i | yiy_i | Slope at (ti+1,yi+1)(t_{i+1},y_{i+1}) | Average slope

0.00.0 | 1.00001.0000 | 1.20001.2000 | 1.10001.1000

0.20.2 | 1.22001.2200 | 1.46401.4640 | 1.34201.3420

0.40.4 | 1.48841.4884 | 1.78611.7861 | 1.63721.6372

⋮\vdots | ⋮\vdots | ⋮\vdots | ⋮\vdots

  • Continue with this method to obtain an approximation for y(1)=ey(1) = e. - Repeat this method with Δt=0.1\Delta t = 0.1 to obtain a better approximation for y(1)y(1). - We saw that the error in Euler's method is proportional to Δt\Delta t. Using your results from parts (a) and (b), what power of Δt\Delta t appears to be proportional to the error in the Improved Euler's Method?

Practice this interactively

Free account · instant grading · spaced review that schedules itself.

Start this course — free