3.1E: Euler’s Method (Exercises)
( \newcommand{\kernel}{\mathrm{null}\,}\)
Q3.1.1
You may want to save the results of these exercises, since we will revisit in the next two sections. In Exercises 3.1.1-3.1.5 use Euler’s method to find approximate values of the solution of the given initial value problem at the points xi=x0+ih, where x0 is the point where the initial condition is imposed and i=1, 2, 3. The purpose of these exercises is to familiarize you with the computational procedure of Euler’s method.
1. y′=2x2+3y2−2,y(2)=1;h=0.05
2. y′=y+√x2+y2,y(0)=1;h=0.1
3. y′+3y=x2−3xy+y2,y(0)=2;h=0.05
4. y′=1+x1−y2,y(2)=3;h=0.1
5. y′+x2y=sinxy,y(1)=π;h=0.2
Q3.1.2
6. Use Euler’s method with step sizes h=0.1, h=0.05, and h=0.025 to find approximate values of the solution of the initial value problem y′+3y=7e4x,y(0)=2
7. Use Euler’s method with step sizes h=0.1, h=0.05, and h=0.025 to find approximate values of the solution of the initial value problem y′+2xy=3x3+1,y(1)=1
8. Use Euler’s method with step sizes h=0.05, h=0.025, and h=0.0125 to find approximate values of the solution of the initial value problem y′=y2+xy−x2x2,y(1)=2
9. In Example [example:2.2.3} it was shown that y5+y=x2+x−4
10. You can see from Example 2.5.1 that x4y3+x2y5+2xy=4
11. Use Euler’s method with step sizes h=0.1, h=0.05, and h=0.025 to find approximate values of the solution of the initial value problem (3y2+4y)y′+2x+cosx=0,y(0)=1;(Exercise 2.2.13)
12. Use Euler’s method with step sizes h=0.1, h=0.05, and h=0.025 to find approximate values of the solution of the initial value problem y′+(y+1)(y−1)(y−2)x+1=0,y(1)=0(Exercise 2.2.14)
13. Use Euler’s method and the Euler semilinear method with step sizes h=0.1, h=0.05, and h=0.025 to find approximate values of the solution of the initial value problem y′+3y=7e−3x,y(0)=6
at x=0, 0.1, 0.2, 0.3, …, 1.0. Compare these approximate values with the values of the exact solution y=e−3x(7x+6), which can be obtained by the method of Section 2.1. Do you notice anything special about the results? Explain.
Q3.1.3
The linear initial value problems in Exercises 3.1.14–3.1.19 can’t be solved exactly in terms of known elementary functions. In each exercise, use Euler’s method and the Euler semilinear methods with the indicated step sizes to find approximate values of the solution of the given initial value problem at 11 equally spaced points (including the endpoints) in the interval.
14. y′−2y=11+x2,y(2)=2; h=0.1,0.05,0.025 on [2,3]
15. y′+2xy=x2,y(0)=3(Exercise 2.1.38); h=0.2,0.1,0.05 on [0,2]
16. y′+1xy=sinxx2,y(1)=2;(Exercise 2.1.39); h=0.2,0.1,0.05 on [1,3]
17. y′+y=e−xtanxx,y(1)=0;(Exercise 2.1.40); h=0.05,0.025,0.0125 on [1,1.5]
18. y′+2x1+x2y=ex(1+x2)2,y(0)=1;(Exercise 2.1.41); h=0.2,0.1,0.05 on [0,2]
19. xy′+(x+1)y=ex2,y(1)=2;(Exercise 2.1.42); h=0.05,0.025,0.0125 on [1,1.5]
Q3.1.4
In Exercises 3.1.20-3.1.22, use Euler’s method and the Euler semilinear method with the indicated step sizes to find approximate values of the solution of the given initial value problem at 11 equally spaced points (including the endpoints) in the interval.
20. y′+3y=xy2(y+1),y(0)=1; h=0.1,0.05,0.025 on [0,1]
21. y′−4y=xy2(y+1),y(0)=1; h=0.1,0.05,0.025 on [0,1]
22. y′+2y=x21+y2,y(2)=1; h=0.1,0.05,0.025 on [2,3]
Q3.1.5
23. Numerical Quadrature. The fundamental theorem of calculus says that if f is continuous on a closed interval [a,b] then it has an antiderivative F such that F′(x)=f(x) on [a,b] and ∫baf(x)dx=F(b)−F(a).
- Derive the quadrature formula ∫baf(x)dx≈hn−1∑i=0f(a+ih)where h=(b−a)/n) by applying Euler’s method to the initial value problemy′=f(x),y(a)=0.
- The quadrature formula (C) is sometimes called the left rectangle rule. Draw a figure that justifies this terminology.
- For several choices of a, b, and A, apply (C) to f(x)=A with n=10,20,40,80,160,320. Compare your results with the exact answers and explain what you find.
- For several choices of a, b, A, and B, apply (C) to f(x)=A+Bx with n=10, 20, 40, 80, 160, 320. Compare your results with the exact answers and explain what you find.