0% found this document useful (0 votes)
13 views6 pages

Solution Set - 1

Uploaded by

khushbookulria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views6 pages

Solution Set - 1

Uploaded by

khushbookulria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

^ͲϭϮEƵŵĞƌŝĐĂůŶĂůLJƐŝƐ;EWͿͲ^ŽůƵƟŽŶ^Ğƚ  ƌ͘ŚĂŶƉĂů^ŝŶŐŚ;ŽŶǀĞŶĞƌͿ͗ϵϴϭϭϰϰϳϵϳϳ

^͘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)

Assuming ሺܽଵ ǡ ܾଵ ሻ ൌ ሺെʹǡ െͳሻǡ

----(2.5)
= Ͳϭ͘ϰϯϯϮ ----(2.5)

Assuming ሺܽଶ ǡ ܾଶ ሻ ൌ ሺെʹǡ െͳǤͶ͵͵ʹሻ


We have ‫݌‬ଶ ൌ െͳǤͶͻ͹͹
ଵ ௔
1. (c) Verify that ‫ ݔ‬ൌ ξܽ is a fixed point of the function ݃ሺ‫ݔ‬ሻ ൌ ቀ‫ ݔ‬൅ ቁ. Use the fixed-point iteration scheme to
ଶ ௫
determine the order of convergence and the asymptotic error constant of the sequence ‫݌‬௡ ൌ ݃ሺ‫݌‬௡ିଵ ሻ towards
‫ ݔ‬ൌ ξܽ.
Solution:

---- (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.5) ---- (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

Since ݂ ᇱ ሺ‫ݔ‬ሻ ് Ͳ on ሺͳǤͳͲǡͳǤͳͷሻ, we can consider the stopping ---- (2.5)


condition given by ȁ‫݌‬௡ െ ‫݌‬௡ିଵ ȁ ൏ ߳.
Here, we have ȁ‫݌‬ହ െ ‫݌‬ସ ȁ ൏ ͲǤͲͲͲͲͲͲ͵ʹͶ͹ ൏ ͳͲି଺ ǡ –Š—•–Ї”‡“—‹”‡†”‘‘–‹•‰‹˜‡„›’ହ ൌ
ͳǤͳͲͻ͹ͳʹ͵Ͳ͵ͺ. ---- (2.5)

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:

*Convergence may not be considered

---- (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)

----for table (4.0)

---- (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)

The approximate value of the derivative of ݂at ‫ݔ‬଴ ൌ ͳ is given as

---- (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 ‫׬‬ଵ ݀‫ݔ‬.

Solution: We have where


such that
Consider the points

---- (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)

Here, we have ‫ݐ‬଴ ൌ ͳǡ ‫ݐ‬ଵ ൌ ͳǤͷǡ ‫ݐ‬ଶ ൌ ʹǡand thus

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

We have ‫ݓ‬଴ ൌ ͳǡ and thus for ‫ݓ‬ଵ For ‫ݓ‬ଶ

---- (2.5)

---- (2.5) ---- (2.5)

ϲ


You might also like