Solution Set - 1
Solution Set - 1
^͘EŽ͘ŽĨYƵĞƐƟŽŶWĂƉĞƌ͗ϰϭϰϬ Dƌ͘sŝƌĞŶĚƌĂ<ƵŵĂƌ͗ϵϴϳϯϳϯϵϯϵϭ
͘^Đ͘;,ͿDĂƚŚĞŵĂƟĐƐ͕^ĞŵͲ/s hW͗ϮϯϱϮϬϭϮϰϬϯ Dƌ͘DĂŶĚĞĞƉ<ƵŵĂƌ͗ϵϯϭϱϲϲϭϭϱϵ
ͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺͺ
1. (a) Determine a formula which relates the number of iterations ݊, required by the bisection method to
converge to within an absolute error tolerance ߝ, starting from the initial interval ሺܽǡ ܾሻ.
Solution: Let denote the location of the true root, and let denote the approximate location of the root
produced by the ݊th iteration of the bisection method. From the proof of the bisection method convergence
theorem, we know that
ܾെܽ ---- (2.5)
ȁ െ ȁ .
ʹ
The bisection method sequence will therefore converge to within an absolute tolerance of ߳ provided
ܾെܽ ---- (2.5)
൏ ߳Ǥ
ʹ
Solving this last expression for ݊ gives
ܾെܽ
݊ ଶ Ǥ
߳ ---- (2.5)
1. (b) Perform up to four iterations using the false position to approximate a root of ݂ሺݔሻ ൌ ݁ ௫ ݔଶ െ ݔെ Ͷ in
the interval ሺെʹǡ െͳሻ.
Solution: The false position method is given by
Similarly, we have the following iterations
----(2.5)
----(2.5)
= Ͳϭ͘ϰϯϯϮ ----(2.5)
---- (2.5)
---- (2.5)
---- (2.5)
2. (a) Calculate the fourth approximation of the root of the function ݂ሺݔሻ ൌ ݁ ି௫ െ ݔusing the Newton’s
method with ൌ Ͳ.
Solution:
---- (2.5)
2. (b) Use the Secant method to calculate the root of the function ݂ሺݔሻ ൌ ͳǤͲͷ െ ͳǤͲͶ ݔ ݈݊ ݔusing ൌ
ͳǤͳͲand ଵ ൌ ͳǤͳͷ with an absolute tolerance of ͳͲି as a stopping condition.
Solution: The Secant method is given by dŚĞŝƚĞƌĂƟŽŶƐ
---- (2.5) ĂƌĞŐŝǀĞŶďLJ
2. (c) Determine the order of convergence of the Newton’s method to find a root of a twice differentiable
function ݂ on the interval ሾܽǡ ܾሿ, provided ݂ ᇱሺሻ ് Ͳ.
ሺ ሻ
Solution: dŽĮŶĚƚŚĞƌŽŽƚŽĨ݂ሺݔሻ ൌ Ͳ͕ƚŚĞEĞǁƚŽŶ͛ƐŵĞƚŚŽĚŝƐŐŝǀĞŶďLJାଵ ൌ െ ᇲሺ ሻǤ
ሺ௫ሻ ---- (2.5)
dŚĞŝƚĞƌĂƟŽŶĨƵŶĐƟŽŶŝƐŐŝǀĞŶďLJ݃ሺ ݔሻ ൌ ݔെ ͘
ᇲሺೣሻ
ሺ௫ሻ ᇲᇲ ሺ௫ሻ
tĞŚĂǀĞ݃ᇱ ሺ ݔሻ ൌ ሾ ᇲ ሺ௫ሻሿమ
͕ĂŶĚ݃ᇱ ሺሻ ൌ ͲǤ ሺ ݂ ᇱ ሺሻ ് Ͳ݂ ሺሻ ൌ Ͳሻ
ᇲᇲ ሺ௫ሻ ሺ௫ሻ ᇲᇲ ሺ௫ሻ ଶሺ௫ሻǤሾ ᇲᇲ ሺ௫ሻሿ̰ଶ
ůƐŽ͕݃ᇱᇱ ሺ ݔሻ ൌ െ ---- (2.5)
ᇲ ሺ௫ሻ ሾ ᇲ ሺ௫ሻሿమ ሾ ᇲ ሺ௫ሻሿయ
ᇲᇲ ሺሻ
^ŽƚŚĂƚ͕ ݃ᇱᇱ ሺ ݔሻ ൌ ͕ǁŚŝĐŚŝƐŶŽƚnjĞƌŽŝŶŐĞŶĞƌĂů͕ƉƌŽǀŝĚĞĚ݂ǯሺሻ ് Ͳ͘dŚƵƐ͕ƵƐŝŶŐƚŚĞƚŚĞŽƌĞŵĮdžĞĚ
௫՜ ᇲ ሺሻ
ȁୣశభ ȁ ᇲᇲ ሺሻ
ƉŽŝŶƚŝƚĞƌĂƟŽŶ͕ǁĞŚĂǀĞ ൌ ͘,ĞŶĐĞƚŚĞŽƌĚĞƌŽĨƚŚĞĐŽŶǀĞƌŐĞŶĐĞŝƐϮ͕ǁŝƚŚĂƐLJŵƉƚŽƟĐĞƌƌŽƌ
՜ஶ ȁୣ ȁమ ଶ ᇲ ሺሻ
ᇲᇲ ሺሻ ---- (2.5)
ĐŽŶƐƚĂŶƚߣ ൌ Ǥ
ଶ ᇲ ሺሻ
ůƚĞƌŶĂƟǀĞ͗
---- (7.5)
Ϯ
3. (a) Solve the following system of equations by using the LU Decomposition method
ݔ Ͷ ݕ ͵ ݖൌ െͶǡ
ʹ ݔ ݕ ͻ ݖൌ െͳͲǡ
ͷ ݔ ͺ ݕെ ʹ ݖൌ ͻ.
Solution:
Solving, we have
---- (3.5)
which gives,
ݕଵ ൌ െͶǡ ݕଶ ൌ െʹǡ ݕଷ ൌ ͷ͵ Solving, we have
---(2.5) ݔൌ ͵ǡ ݕൌ െͳǡ ݖൌ െͳǤ
---- (2.5)
3. (b) Starting with initial vector ሺݔǡ ݕǡ ݖǡ ݐሻ ൌ ሺͲǡ Ͳǡ Ͳǡ Ͳሻǡ perform three iterations of Gauss-Seidel method
to solve the following system of equations
Ͷ ݔ ݕ ݖ ݐൌ െͷǡ
ݔ ͺ ݕ ʹ ݖ ͵ ݐൌ ʹ͵ǡ
ݔ ʹ ݕെ ͷ ݖൌ ͻǡ
െ ݔ ʹ ݖ Ͷ ݐൌ ͶǤ
Solution:
The Gauss-Siedel method gives us
Three iterations are given as *Answer may be slightly
ଵ different if equation order is
ݔାଵ ൌ ሺെͷ െ ݕ െ ݖ െ ݐ ሻ different for variables
ସ
ାଵ ଵ
ݕ ൌ ሺ23െ ݔାଵ െ ʹ ݖ െ ͵ ݐ ሻ
଼
െͳ ---- (2.5)
ݖାଵ ൌ ሺͻ െ ݔାଵ െ ʹ ݕାଵሻ
ͷ ---- (2.5)
ͳ
ݐାଵ ൌ ሺͶ ݔାଵ െ ʹ ݖାଵ ሻ ---- (2.5)
Ͷ
ʹ െͳ
3. (c) Compute ܶ andܶ௦ for the matrix ቂ ቃ. Will the Jacobi and Gauss Seidel method converge for
െͳ ͵
any choice of initial vector ݔሺሻ ? Justify your answer.
Solution:
---- (2.5)
---- (5) ϯ
ϰ͘ (a) Find the Lagrange interpolation polynomial for the data set ሺͲǡͳሻǡ ሺͳǡ͵ሻ and ሺ͵ǡͷͷሻǤ Also estimate
the value at ݔൌ ʹǤͷ.
^ŽůƵƟŽŶ͗
---- (2.5)
dŚƵƐ͕ǁĞŚĂǀĞ
---- (1.5)
YĂŶĚ
---- (1)
---- (2.5)
4. (b) The population of a town during the last six censuses are given below. Estimate the increase in the
population from 1846 to 1848 by using the Newton interpolation polynomial.
Year 1811 1821 1831 1841 1851 1861
Population
9 12 20 17 37 42
(in thousands)
Solution:
---- (2.5)
---- (1.0)
*may be nearby, depending on
decimals considered
4. (c) Obtain the piecewise linear interpolating polynomial for the function ݂ሺݔሻ defined by the given
data:
ݔ Ͳ ͳ ʹ ͵ Ͷ
݂ሺݔሻ ͳ ʹ ͷ ͳͲ ͳ
Hence estimate the value of ݂ሺͳǤͷሻ, ݂ሺʹǤͷሻ and ݂ሺ͵Ǥͷሻ.
Solution: The piecewise linear interpolation is given by
ݏ ሺݔሻǡ ݔ ݔ ݔଵ ---- (2.5)
ۓ
ݏሺݔሻǡ ݔଵ ݔ ݔଶ శభ ି
ݏሺݔሻ ൌ ଵ where ݏ ሺݔሻ ൌ ݂ ݉ሺݔȂݔ ሻ and ݉ ൌ , ݅ ൌ Ͳǡͳǡʹǡ͵Ǥ
ݏ۔ଶ ሺݔሻǡ ݔଶ ݔ ݔଷ ௫శభ ି௫
ݏەଷ ሺݔሻǡ ݔଷ ݔ ݔସ
---- (3.5)
ϰ
---- (1.5)
ሺ௫ ାሻିሺ௫ ሻ
5. (a) Prove that ݂ ᇱ ሺݔ ሻ ൎ బ బ
and determine the approximate value of the derivative of
݂ሺݔሻ ൌ ͳ ݔ ݔଷ at ݔ ൌ ͳ, taking ݄ ൌ ͳǡ ͲǤͳǡ ͲǤͲͳ and ͲǤͲͲͳǤ
Solution: Using Taylor’s theorem, expanding ݂ሺݔ ݄ሻ, we have
Solving this for ݂ ᇱ ሺݔ ሻ, we have
ሺ௫బ ାሻିሺ௫బ ሻ
Hence ݂ ᇱ ሺݔ ሻ ൎ . ---- (5.0)
---- (2.5)
5. (b) Verify that the second-order forward difference approximation for the first derivative provides
the exact value of the derivative, regardless of ݄ǡfor the functions݂ሺݔሻ ൌ ͳ, ݂ሺݔሻ ൌ ݔand ݂ሺݔሻ ൌ
ݔଶ , but not for the function ݂ሺݔሻ ൌ ݔଷ Ǥ
Solution: The second-order forward difference approximation for the first derivative is given by
---- (2.5)
We have
---- (5.0)
5. (c) Derive the formula for the Trapezoidal rule and hence evaluate the approximate value of the
ଶଵ
integral ଵ ݀ݔ.
௫
---- (2.5)
---- (5.0)
ϱ
6. (a) Determine the values for the coefficients ܣ , ܣଵ , and ܣଶ so that the quadrature formula ܫሺ݂ሻ ൌ
ଵ ିଵ ଵ
ିଵ ݂ሺݔሻ݀ ݔൌ ܣ ݂ ቀ ଷ ቁ ܣଵ ݂ ቀଷቁ ܣଶ ݂ሺͳሻ has degree of precision at least 2.
Solution:
---- (2.5)
---- (5.0)
ௗ௫
6. (b) Use the Euler Method, determine the approximate solution of the initial value problem ൌͳ
ௗ௧
௫
, ݔሺͳሻ ൌ ͳǡ ͳ ݐ ʹ, taking the step size as ݄ ൌ ͲǤͷǤ
௧
Solution: The Euler method is given by
---- (2.5)
which gives
---- (5.0)
6. (c) Use the Runge-Kutta Method fourth-order, determine the approximate solution of the initial
ௗ௫ ௫
value Problem ൌ , ݔሺͲሻ ൌ ͳǡ ͳ ݐ ʹ, taking the step size as ݄ ൌ ͲǤͷǤ
ௗ௧ ௧
Solution: The Runge-Kutta Method fourth-order is given by
---- (2.5)
ϲ