Tutorialsheet 4
Tutorialsheet 4
Tutorial Sheet-4
(2) Use Trapezoidal rule to compute the given integral using three intervals. Compare it
with exact value
Z 2
1
dx.
1 x
R2
(6) Evaluate 0 ex dx using the Simpson’s rule with h = 1 and 1/2. Find a bound on the
error in each case. Compare with the exact solution.
(8) Evalute the double integral using the Trapezoidal Rule with h = k = 0.25.
Z 1 Z 2
2xy
2 2
dy dx.
0 1 (1 + x )(1 + y )
(11) Use Euler’s method to approximate the solutions for each of the following initial value
problems.
(a). y 0 = cos 2t + sin 3t, 0 ≤ t ≤ 1, y(0) = 1, with h = 0.25
0 2
(b). y = −5y + 5t + 2t, 0 ≤ t ≤ 1, y(0) = 31 , with h = 0.1.
(12) Use the Modified Euler method(Runge-Kutta method of two order) to approximate the
solution to the following initial-value problem, and compare the result to the actual
values.
(a). y 0 = 1+ y/t, 1 ≤ t ≤ 2, y(1) = 2, with h = 0.25; actual solution y(t) = t ln t +2t
1
(b).y 0 = 1 + (t − y)2 , 2 ≤ t ≤ 3, y(2) = 1, h = 0.5; actual solution y(t) = t + .
1−t
(13) Solve the initial value problem
u0 = −2tu2 , y(0) = 1
with h = 0.2 on the interval [0, 0.4]. Use the forth order classical Runge-Kutta method.
Compare with the exact solution.
(14) Use the classical Runge-Kutta method of forth order to find the numerical solution at
x = 0.8 for
dy √
= x + y, y(0.4) = 0.41.
dx
Assume the step length h = 0.2.
(15) Approximate the solutions to the following initial-value problems. Compare the results
to the actual values.
(a). y 0 = 1 + y/t + (y/t)2 , 1 ≤ t ≤ 3, y(1) = 0; actual solution y(t) = t tan(ln t).
(b). y 0 = y/t − (y/t)2 , 1 ≤ t ≤ 4, y(1) = 1; actual solution y(t) = t/(1 + ln t).
(c).y 0 = −(y + 1)(y + 3), 0 ≤ t ≤ 3, y(0) = −2, h = 0.5; actual solution y(t) =
−3 + 2(1 + e−2t )−1 .
(16) Use the linear Finite-Difference method to approximate the solution to the following
boundary-value problems .
(a). y 00 = −3y 0 + 2y + 2x + 3, 0 ≤ x ≤ 1, y(0) = 2, y(1) = 1; use h = 0.1.
(b). y 00 = −(x+1)y 0 +2y+(1−x2 )e−x , 0 ≤ x ≤ 1, y(0) = −1, y(1) = 0; use h = 0.1.