Vous êtes sur la page 1sur 2

UECM1693/UECM2623/UCCM2623

Tutorial N5 & N6: ODEs - IVP and BVP

1. Consider the initial value problem

y 0 = 2xy, y(1) = 1.
2 1
(a) Verify that y = ex is the exact solution of this problem.
(b) Use the Euler method to approximate y(1.1) and y(1.2) using the step-size
(i) h = 0.1
(ii) h = 0.05
(c) Use the Improved Euler method to approximate y(1.1) and y(1.2) using h = 0.1.
(d) Tabulate the absolute errors in your results by comparing solutions to y(1.1) and y(1.2)
using (a) with those using (b) and (c). Give comments.
(e) Estimate the truncation error in your approximation to y(1.1) in b(i) using the next three
terms in the corresponding Taylor series.
Answer: (b) (i) y1 = 1.2, y2 = 1.464 (ii) y2 = 1.2155, y4 = 1.5044
(c) y1 = 1.232, y2 = 1.5479
(d) Exact values are y(1.1) = 1.2337, y(1.2) = 1.5527
Absolute Error
xn Euler (0.1) Euler (0.05) Improved Euler
1.1 0.0337 0.0182 0.0017
1.2 0.0887 0.0483 0.0048
(e) 0.0337

2. Consider the initial value problem

y 0 = 6y + 2x + 1, y(0) = 1.

(a) Use the Taylor series method of order 2 to approximate y(0.2) in two steps.
(b) The exact value of y(0.2) is 3.7690 (to 4 decimal places). Calculate the absolute percentage
error between the exact value and your approximation in (a).
1 2 11
Note : The exact solution is y(x) = x + e6x .
3 9 9
Answer: (a) y2 = 3.5836 y(0.2) (b)4.9191%

3. If air resistance is proportional to the square of the instantaneous velocity, then the velocity v
of a mass m dropped from a height h is determined from

dv
m = mg kv 2 , k > 0.
dt
If v(0) = 0, k = 0.125, m = 5 slugs, and g = 32f t/s2 , use the fourth-order Runge-Kutta method
to find an approximation to the velocity of the falling mass at t = 2 seconds. Use h = 1.
Answer: v1 = 25.2570, v2 = 32.9390 v(2)

1
4. Use the Adams-Bashforth/Adams-Moulton Method to obtain the approximate value of y(0.8),
where y(x) is the the solution of

y 0 = 2x 3y + 1, y(0) = 1.

Use h = 0.2 and the values y(0.2) = 0.7328, y(0.4) = 0.6461, y(0.6) = 0.6585 which are computed
by using the fourth-order Runge-Kutta method.
Answer: y4 = 0.7232 y(0.8)

5. Consider the initial-value problem y 0 = 2y, y(0) = 1. The analytic solution is y(x) = e2x .
(a) Use the improved Euler method to obtain a six-decimal approximation to y(0.1) using one
step.
(b) Use the improved Euler method to obtain a six-decimal approximation y(0.1) using 2 steps.
(c) Verify that the global truncation error for the improved Euler method is O(h2 ) by comparing
the errors in parts (a) and (b).
Answer: (a) 1.220000 (b) 1.221025 (c) 0.001403, 0.000378

6. The vertical motion of a weight attached to a spring is described by the initial-value problem

y 00 4y 0 + 4y = 0, y(0) = 2, y 0 (0) = 1.

(a) Reformulate this second order differential equation as a system of two first-order equations.
(b) Use the Euler method to determine an estimate for y(0.2) using 2 steps.
(c) Find the exact solution of the problem.
(d) Calculate the absolute error between the exact value y(0.2) and your approximation.
Answer: (b) 1.6800 (c) y = 5xe2x 2e2x (d) y(0.2) = 1.4918, 0.1882

1
7. Use the finite difference method with the step-size h = to approximate the solution of the
3
given BVP.
y 00 = 4(y x), 0 x 1, y(0) = 0, y(1) = 2
646 1400
Answer: y0 = 0, y1 = 0.5343, y2 = , 1.1580, y3 = 2
1209 1209

Vous aimerez peut-être aussi