You are on page 1of 2

Dr B R AMBEDKAR NIT JALANDHAR

NUMERICAL METHODS IN MECHANICAL ENGINEERING(MEPC-308)

Assignment-I

(1) Approximate the following integrals using the Trapezoidal rule.


R1 R1 R 1.5 R π/4
(a). 0.5 x4 dx (b). 0 x2 e− xdx (c). 1 x2 ln(x)dx (d). 0 x sin xdx
R π/4 R 0.25 R e+1
(e). 0 e3 x sin 2xdx (f). −0.25 (cos x)2 dx (g). e x ln1 x dx
(2) Find a bound for the error in above question using the error formula, and compare this
to the actual error.
(3) Repeat the exercise (1) using Simpson’s one-third rule.
R2
(4) Compare the Trapezoidal rule and Simpson’s rule approximations to 0 f (x)dx when
f (x) is √
(a). x2 (b). (x + 1)−1 (c). sin x (d). ex (e). 1 + x2
R2
(5) The Trapezoidal rule applied to 0 f (x)dx gives the value 4, and Simpson’s rule gives
the value 2. What is the value of f (1)?
(6) Find the degree of precision of the quadrature formula
Z 1 √ √
3 3
f (x)dx = f (− ) + f( )
−1 3 3
.
R1
(7) The quadrature formula −1 f (x)dx = c0 f (−1) + c1 f (0) + c2 f (1) is exact for all the
polynomials of degree less than or equal to 2. Determine c0 , c1 and c2 .
(8) Determine the coefficients in the quadrature formula
Z 2h
1 √
x− 2 f (x)dx = 2h[w0 f (0) + w1 f (h) + w2 f (2h)]
0
such that the formula is exact for all polynomials of degree as high as possible. What
is the degree of precision?
R2
(9) Approximate 0 x2 ln(x2 + 1)dx using h = 0.25. Use
(a). Composite Trapezoidal rule (b). Composite Simpson’s rule.
(10) Use Simpson’s double integral with n = m = 4 to approximate the following double
integrals
R 0.5 Rand compare the results to Rthe exact answers.
0.5 y−x R 2.5 1.4
(a). 0 0 e dydx (b). 2.1 1.2 xy 2 dydx.
(11) Use Taylor’s method of order two to approximate the solutions for each of the following
initial value problems
(a). y 0 = te3t − 2y, 0 ≤ t ≤ 1, y(0) = 0, with h = 0.5
(b). y 0 = cos 2t + sin 3t, 0 ≤ t ≤ 1, y(0) = 1, with h = 0.25
0 2
(c). y = −5y + 5t + 2t, 0 ≤ t ≤ 1, y(0) = 31 , with h = 0.1
(d). y 0 = 2−2ty
t2 +1
, 0 ≤ t ≤ 1, y(0) = 1, with h = 0.1
(12) Use Euler’s method to approximate the solutions for each of the following initial value
problems
(a). y 0 = te3t − 2y, 0 ≤ t ≤ 1, y(0) = 0, with h = 0.5
(b). y 0 = cos 2t + sin 3t, 0 ≤ t ≤ 1, y(0) = 1, with h = 0.25
0 2
(c). y = −5y + 5t + 2t, 0 ≤ t ≤ 1, y(0) = 31 , with h = 0.1
(d). y 0 = 2−2ty
t2 +1
, 0 ≤ t ≤ 1, y(0) = 1, with h = 0.1

(13) Use modified Euler’s method to approximate the solutions for each of the following
initial value problems and compare the results 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
0
(b). y = −5y + 5t + 2t,2
0 ≤ t ≤ 1, y(0) = 31 , with h = 0.1, actual solution
1
y(t) = t2 + 3 e( − 5t).

(14) Repeat the exercise (13) using Heun’s method.


(15) Use Runge-Kutta method of order four to approximate the solutions for each of the
following initial value problems and compare the results to the actual values.
(a). y 0 = cos 2t + sin 3t, 0 ≤ t ≤ 1, y(0) = 1, with h = 0.25; actual solution
y(t) = 12 sin 2t − 13 cos 3t + 43 .
(b). y 0 = y/t − (y/t)2 , 1 ≤ t ≤ 2, y(1) = 1, with h = 0.1; actual solution
y(t) = t/(1 + ln t).
(16) Given the values of the function f (x) = ln x at x0 = 2.0, x1 = 2.2 and x2 = 2.6, find the
approximate value of f (2.0) using the method based on quadratic interpolation. Obtain
an error bound.
(17) Perform one iteration of the Bairstow method to extract a quadratic factor x2 + px + q
from the polynomial x4 + x3 + 2x2 + x + 1. Find the deflated polynomial. Use the initial
approximation (α0 , β0 ) = (0.45, 0.45).

You might also like