Browse papers
A

Section A: Long Answer Questions

Attempt all / any as specified.

4 questions
1long12 marks

(a) Derive the iterative formula for the Newton-Raphson method for finding a root of a nonlinear equation f(x)=0f(x)=0, and state its order of convergence. Discuss two situations in which the method fails. [7]

(b) Using the Bisection method, find a root of the equation x34x9=0x^3 - 4x - 9 = 0 correct to three decimal places. Show the tabulation of iterations. [5]

(a) Newton-Raphson Method

Derivation. Let xnx_n be an approximation to a root of f(x)=0f(x)=0 and let hh be the correction so that f(xn+h)=0f(x_n+h)=0. Expanding by Taylor's series and retaining only first-order terms:

f(xn+h)f(xn)+hf(xn)=0    h=f(xn)f(xn).f(x_n+h) \approx f(x_n) + h\,f'(x_n) = 0 \;\Rightarrow\; h = -\frac{f(x_n)}{f'(x_n)}.

Hence the iterative formula is

xn+1=xnf(xn)f(xn),n=0,1,2,,    f(xn)0.\boxed{\,x_{n+1} = x_n - \dfrac{f(x_n)}{f'(x_n)}\,},\qquad n=0,1,2,\dots,\;\; f'(x_n)\neq 0.

Order of convergence. Writing the error εn+1=xn+1α\varepsilon_{n+1}=x_{n+1}-\alpha about the simple root α\alpha gives

εn+1f(α)2f(α)εn2.\varepsilon_{n+1}\approx \frac{f''(\alpha)}{2f'(\alpha)}\,\varepsilon_n^{2}.

Thus the method converges quadratically (order =2= 2) for a simple root.

Two situations in which the method fails:

  1. f(xn)0f'(x_n)\to 0 (near a turning point / stationary point): the correction f/ff/f' becomes very large and the iterate is thrown far away, so the method diverges.
  2. Poor initial guess / oscillation: if x0x_0 is not close enough to the root, or where the curve has a near-horizontal tangent or an inflection, the iterates may oscillate between two values or diverge. (It also fails / loses its quadratic rate at a multiple root, where f(α)=0f'(\alpha)=0.)

(b) Bisection Method for x34x9=0x^3-4x-9=0

Let f(x)=x34x9f(x)=x^3-4x-9. Since f(2)=9<0f(2)=-9<0 and f(3)=6>0f(3)=6>0, a root lies in (2,3)(2,3).

nabc=(a+b)/2f(c)sign
12.0003.0002.50003.375-3.375-
22.5003.0002.7500+0.797+0.797++
32.5002.7502.62501.412-1.412-
42.6252.7502.68750.339-0.339-
52.68752.7502.7188+0.221+0.221++
62.68752.71882.70310.061-0.061-
72.70312.71882.7109+0.079+0.079++
82.70312.71092.7070+0.009+0.009++
92.70312.70702.70510.026-0.026-
102.70512.70702.70610.009-0.009-
112.70612.70702.70650.0003-0.0003-

Continuing until the interval <103<10^{-3}, the iterates settle at

x2.706\boxed{x \approx 2.706}

correct to three decimal places.

roots-of-nonlinear-equationsbisection-methodnewton-raphson
2long12 marks

(a) Derive Newton's divided difference interpolation formula and show that the divided differences are symmetric with respect to their arguments. [6]

(b) The following table gives the values of a function f(x)f(x):

x56911
f(x)12131416

Using Lagrange's interpolation formula, estimate the value of f(x)f(x) at x=10x = 10. [6]

(a) Newton's Divided Difference Formula

For data (x0,f0),(x1,f1),,(xn,fn)(x_0,f_0),(x_1,f_1),\dots,(x_n,f_n) the divided differences are defined recursively by

f[xi]=fi,f[xi,xi+1]=f[xi+1]f[xi]xi+1xi,f[x_i]=f_i,\qquad f[x_i,x_{i+1}]=\frac{f[x_{i+1}]-f[x_i]}{x_{i+1}-x_i}, f[xi,,xi+k]=f[xi+1,,xi+k]f[xi,,xi+k1]xi+kxi.f[x_i,\dots,x_{i+k}]=\frac{f[x_{i+1},\dots,x_{i+k}]-f[x_i,\dots,x_{i+k-1}]}{x_{i+k}-x_i}.

Interpolating polynomial. Assume

P(x)=a0+a1(xx0)+a2(xx0)(xx1)++an(xx0)(xxn1).P(x)=a_0+a_1(x-x_0)+a_2(x-x_0)(x-x_1)+\cdots+a_n(x-x_0)\cdots(x-x_{n-1}).

Putting x=x0x=x_0 gives a0=f[x0]a_0=f[x_0]; putting x=x1x=x_1 gives a1=f[x0,x1]a_1=f[x_0,x_1]; in general ak=f[x0,x1,,xk]a_k=f[x_0,x_1,\dots,x_k]. Hence Newton's divided difference formula:

P(x)=f[x0]+(xx0)f[x0,x1]+(xx0)(xx1)f[x0,x1,x2]+\boxed{P(x)=f[x_0]+(x-x_0)f[x_0,x_1]+(x-x_0)(x-x_1)f[x_0,x_1,x_2]+\cdots}

Symmetry. By induction it can be shown that

f[x0,x1,,xn]=i=0nfiji(xixj).f[x_0,x_1,\dots,x_n]=\sum_{i=0}^{n}\frac{f_i}{\prod_{j\neq i}(x_i-x_j)}.

This expression is a symmetric function of x0,x1,,xnx_0,x_1,\dots,x_n — interchanging any two arguments leaves it unchanged. Therefore the divided differences are symmetric with respect to their arguments, i.e.

f[x0,x1]=f[x1,x0],f[x0,x1,x2]=f[x2,x0,x1]=f[x_0,x_1]=f[x_1,x_0],\quad f[x_0,x_1,x_2]=f[x_2,x_0,x_1]=\dots

(b) Lagrange Interpolation at x=10x=10

Data: (5,12),(6,13),(9,14),(11,16)(5,12),(6,13),(9,14),(11,16). Lagrange's formula:

f(x)=ifijixxjxixj.f(x)=\sum_{i}f_i\prod_{j\neq i}\frac{x-x_j}{x_i-x_j}.

At x=10x=10:

L0=(106)(109)(1011)(56)(59)(511)=(4)(1)(1)(1)(4)(6)=424=16L_0=\frac{(10-6)(10-9)(10-11)}{(5-6)(5-9)(5-11)}=\frac{(4)(1)(-1)}{(-1)(-4)(-6)}=\frac{-4}{-24}=\tfrac{1}{6} L1=(105)(109)(1011)(65)(69)(611)=(5)(1)(1)(1)(3)(5)=515=13L_1=\frac{(10-5)(10-9)(10-11)}{(6-5)(6-9)(6-11)}=\frac{(5)(1)(-1)}{(1)(-3)(-5)}=\frac{-5}{15}=-\tfrac{1}{3} L2=(105)(106)(1011)(95)(96)(911)=(5)(4)(1)(4)(3)(2)=2024=56L_2=\frac{(10-5)(10-6)(10-11)}{(9-5)(9-6)(9-11)}=\frac{(5)(4)(-1)}{(4)(3)(-2)}=\frac{-20}{-24}=\tfrac{5}{6} L3=(105)(106)(109)(115)(116)(119)=(5)(4)(1)(6)(5)(2)=2060=13L_3=\frac{(10-5)(10-6)(10-9)}{(11-5)(11-6)(11-9)}=\frac{(5)(4)(1)}{(6)(5)(2)}=\frac{20}{60}=\tfrac{1}{3} f(10)=1216+13(13)+1456+1613=2133+353+163=2+383.f(10)=12\cdot\tfrac16+13\cdot(-\tfrac13)+14\cdot\tfrac56+16\cdot\tfrac13 = 2-\tfrac{13}{3}+\tfrac{35}{3}+\tfrac{16}{3}=2+\tfrac{38}{3}. f(10)=44314.667\boxed{f(10)=\tfrac{44}{3}\approx 14.667}
interpolationnewton-divided-differencelagrange-interpolation
3long12 marks

(a) Explain the Gauss-Seidel iterative method for solving a system of linear equations. State the condition of convergence (diagonal dominance) for the method. [5]

(b) Solve the following system of equations using the Gauss-Seidel iteration method, performing three iterations and starting with the initial approximation (0,0,0)(0,0,0):

20x+y2z=17,3x+20yz=18,2x3y+20z=2520x + y - 2z = 17,\quad 3x + 20y - z = -18,\quad 2x - 3y + 20z = 25

[7]

(a) Gauss-Seidel Iterative Method

For a system a11x1+=b1,a_{11}x_1+\dots=b_1,\dots, each equation is solved for its diagonal unknown:

xi(k+1)=1aii(bij<iaijxj(k+1)j>iaijxj(k)).x_i^{(k+1)}=\frac{1}{a_{ii}}\Big(b_i-\sum_{j<i}a_{ij}x_j^{(k+1)}-\sum_{j>i}a_{ij}x_j^{(k)}\Big).

The distinguishing feature is that each newly computed value is used immediately in the same sweep, so it generally converges faster than Jacobi iteration. Iteration continues until successive iterates agree to the required tolerance.

Condition of convergence (diagonal dominance). A sufficient condition is that the coefficient matrix be diagonally dominant:

aiijiaijfor all i, with strict inequality for at least one i.|a_{ii}|\ge\sum_{j\neq i}|a_{ij}|\quad\text{for all }i,\text{ with strict inequality for at least one }i.

Under this condition the iteration converges for any starting vector.

(b) Three Iterations, start (0,0,0)(0,0,0)

The system is already diagonally dominant. Rearranging:

x=17y+2z20,y=183x+z20,z=252x+3y20.x=\frac{17-y+2z}{20},\quad y=\frac{-18-3x+z}{20},\quad z=\frac{25-2x+3y}{20}.

Iteration 1 (with x=y=z=0x=y=z=0 initially):

x=170+020=0.8500,    y=183(0.85)+020=1.0275,    z=252(0.85)+3(1.0275)20=1.0109.x=\tfrac{17-0+0}{20}=0.8500,\;\; y=\tfrac{-18-3(0.85)+0}{20}=-1.0275,\;\; z=\tfrac{25-2(0.85)+3(-1.0275)}{20}=1.0109.

Iteration 2:

x=17(1.0275)+2(1.0109)20=1.0025,    y=183(1.0025)+1.010920=0.9998,    z=252(1.0025)+3(0.9998)20=0.9998.x=\tfrac{17-(-1.0275)+2(1.0109)}{20}=1.0025,\;\; y=\tfrac{-18-3(1.0025)+1.0109}{20}=-0.9998,\;\; z=\tfrac{25-2(1.0025)+3(-0.9998)}{20}=0.9998.

Iteration 3:

x=17(0.9998)+2(0.9998)20=1.0000,    y=183(1.0000)+0.999820=1.0000,    z=252(1.0000)+3(1.0000)20=1.0000.x=\tfrac{17-(-0.9998)+2(0.9998)}{20}=1.0000,\;\; y=\tfrac{-18-3(1.0000)+0.9998}{20}=-1.0000,\;\; z=\tfrac{25-2(1.0000)+3(-1.0000)}{20}=1.0000.
Iterxyz
10.85001.0275-1.02751.0109
21.00250.9998-0.99980.9998
31.00001.0000-1.00001.0000
x=1,  y=1,  z=1\boxed{x=1,\; y=-1,\; z=1}
solution-of-linear-systemsgauss-eliminationiterative-methods
4long12 marks

(a) Derive the standard five-point finite-difference formula for the Laplace equation 2ux2+2uy2=0\dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} = 0 over a square mesh. [6]

(b) Classify the partial differential equation Auxx+Buxy+Cuyy+f(x,y,u,ux,uy)=0A u_{xx} + B u_{xy} + C u_{yy} + f(x,y,u,u_x,u_y) = 0 as elliptic, parabolic or hyperbolic, and give one physical example of each type. [6]

(a) Five-Point Formula for the Laplace Equation

Use a uniform square mesh of spacing hh (Δx=Δy=h\Delta x=\Delta y=h); let ui,j=u(xi,yj)u_{i,j}=u(x_i,y_j). Central second differences give

2ux2i,jui+1,j2ui,j+ui1,jh2,2uy2i,jui,j+12ui,j+ui,j1h2.\frac{\partial^2 u}{\partial x^2}\Big|_{i,j}\approx\frac{u_{i+1,j}-2u_{i,j}+u_{i-1,j}}{h^2},\qquad \frac{\partial^2 u}{\partial y^2}\Big|_{i,j}\approx\frac{u_{i,j+1}-2u_{i,j}+u_{i,j-1}}{h^2}.

Substituting into uxx+uyy=0u_{xx}+u_{yy}=0 and multiplying by h2h^2:

ui+1,j+ui1,j+ui,j+1+ui,j14ui,j=0,u_{i+1,j}+u_{i-1,j}+u_{i,j+1}+u_{i,j-1}-4u_{i,j}=0, ui,j=14(ui+1,j+ui1,j+ui,j+1+ui,j1).\boxed{\,u_{i,j}=\tfrac14\big(u_{i+1,j}+u_{i-1,j}+u_{i,j+1}+u_{i,j-1}\big)\,}.

This standard five-point (cross) formula states that the value at any interior node equals the average of its four nearest neighbours (Liebmann's method solves the resulting set iteratively).

(b) Classification of Auxx+Buxy+Cuyy+f=0A\,u_{xx}+B\,u_{xy}+C\,u_{yy}+f=0

The type is fixed by the discriminant Δ=B24AC\Delta=B^2-4AC:

ConditionTypePhysical example
B24AC<0B^2-4AC<0EllipticLaplace/Poisson equation uxx+uyy=0u_{xx}+u_{yy}=0 — steady-state heat / potential / electrostatics
B24AC=0B^2-4AC=0ParabolicHeat (diffusion) equation ut=αuxxu_t=\alpha\,u_{xx} — transient heat conduction
B24AC>0B^2-4AC>0HyperbolicWave equation utt=c2uxxu_{tt}=c^2 u_{xx} — vibrating string / wave propagation

Worked check: For Laplace, A=1,B=0,C=1B24AC=4<0A=1,B=0,C=1\Rightarrow B^2-4AC=-4<0 (elliptic). For the heat equation uxxut=0u_{xx}-u_t=0 written in two variables, the second-order part has A=1,B=0,C=0B24AC=0A=1,B=0,C=0\Rightarrow B^2-4AC=0 (parabolic). For the wave equation uttc2uxx=0u_{tt}-c^2u_{xx}=0, B24AC=4c2>0B^2-4AC=4c^2>0 (hyperbolic).

numerical-solution-of-pdeslaplace-equationfinite-difference
B

Section B: Short Answer Questions

Attempt all / any as specified.

7 questions
5short8 marks

Find a real root of the equation cosx=3x1\cos x = 3x - 1 correct to four significant figures using the Secant method. Take the initial approximations x0=0.5x_0 = 0.5 and x1=0.6x_1 = 0.6 and tabulate the successive iterations.

Secant Method for cosx=3x1\cos x = 3x-1

Write f(x)=cosx3x+1=0f(x)=\cos x-3x+1=0. The secant iteration is

xn+1=xnf(xn)(xnxn1)f(xn)f(xn1).x_{n+1}=x_n-\frac{f(x_n)\,(x_n-x_{n-1})}{f(x_n)-f(x_{n-1})}.

With x0=0.5,  x1=0.6x_0=0.5,\;x_1=0.6:

f(0.5)=cos0.51.5+1=0.877580.5=0.37758,f(0.5)=\cos 0.5-1.5+1=0.87758-0.5=0.37758, f(0.6)=cos0.61.8+1=0.825340.8=0.02534.f(0.6)=\cos 0.6-1.8+1=0.82534-0.8=0.02534.
nxn1x_{n-1}xnx_nf(xn)f(x_n)xn+1x_{n+1}
10.500000.600000.0253360.0253360.607193
20.600000.6071930.000325-0.0003250.607102
30.6071930.6071020\approx 00.607102

Sample step (n=1):

x2=0.60.025336(0.60.5)0.0253360.37758=0.60.00253360.35224=0.60719.x_2=0.6-\frac{0.025336\,(0.6-0.5)}{0.025336-0.37758}=0.6-\frac{0.0025336}{-0.35224}=0.60719.

The successive iterates agree to four significant figures, so

x0.6071.\boxed{x \approx 0.6071}.
roots-of-nonlinear-equationssecant-method
6short8 marks

Evaluate the integral 06dx1+x2\displaystyle\int_{0}^{6} \frac{dx}{1+x^2} by dividing the interval into six equal subintervals using (a) the Trapezoidal rule and (b) Simpson's 1/3 rule. Compare your results with the exact value.

Numerical Integration of 06dx1+x2\displaystyle\int_0^6\frac{dx}{1+x^2}

With 6 subintervals, h=1h=1. Tabulate y=11+x2y=\dfrac{1}{1+x^2}:

xx0123456
yy1.00000.50000.20000.10000.0588240.0384620.027027

(a) Trapezoidal Rule

IT=h2[(y0+y6)+2(y1+y2+y3+y4+y5)]I_T=\frac{h}{2}\big[(y_0+y_6)+2(y_1+y_2+y_3+y_4+y_5)\big] =12[(1.0+0.027027)+2(0.5+0.2+0.1+0.058824+0.038462)]=12[1.027027+1.794571]=1.4108.=\frac{1}{2}\big[(1.0+0.027027)+2(0.5+0.2+0.1+0.058824+0.038462)\big]=\frac{1}{2}[1.027027+1.794571]=\boxed{1.4108}.

(b) Simpson's 1/3 Rule

IS=h3[(y0+y6)+4(y1+y3+y5)+2(y2+y4)]I_S=\frac{h}{3}\big[(y_0+y_6)+4(y_1+y_3+y_5)+2(y_2+y_4)\big] =13[1.027027+4(0.5+0.1+0.038462)+2(0.2+0.058824)]=13[1.027027+2.553848+0.517648]=1.3662.=\frac{1}{3}\big[1.027027+4(0.5+0.1+0.038462)+2(0.2+0.058824)\big]=\frac{1}{3}[1.027027+2.553848+0.517648]=\boxed{1.3662}.

Comparison with exact value

06dx1+x2=[tan1x]06=tan16=1.40565.\int_0^6\frac{dx}{1+x^2}=[\tan^{-1}x]_0^6=\tan^{-1}6=1.40565.
MethodResultError
Trapezoidal1.4108+0.0051+0.0051
Simpson 1/31.36620.0395-0.0395
Exact1.40565

The trapezoidal value is closer here because the integrand changes rapidly near x=0x=0; Simpson's rule, though normally more accurate, is more affected by the coarse mesh over this steep region.

numerical-integrationtrapezoidal-rulesimpsons-rule
7short8 marks

From the following table of values, find the first and second derivatives of f(x)f(x) at x=1.1x = 1.1 using Newton's forward difference formula:

x1.01.21.41.61.82.0
f(x)0.0000.1280.5441.2962.4324.000

Numerical Differentiation by Newton's Forward Formula

Here x0=1.0x_0=1.0, h=0.2h=0.2. The forward difference table:

xxyyΔ\DeltaΔ2\Delta^2Δ3\Delta^3
1.00.0000.1280.2880.048
1.20.1280.4160.3360.048
1.40.5440.7520.3840.048
1.61.2961.1360.432
1.82.4321.568
2.04.000

Third differences are constant (0.0480.048) and higher differences vanish.

For x=1.1x=1.1: p=xx0h=1.11.00.2=0.5p=\dfrac{x-x_0}{h}=\dfrac{1.1-1.0}{0.2}=0.5.

First derivative

dydx=1h[Δy0+2p12Δ2y0+3p26p+26Δ3y0].\frac{dy}{dx}=\frac{1}{h}\Big[\Delta y_0+\frac{2p-1}{2}\Delta^2y_0+\frac{3p^2-6p+2}{6}\Delta^3y_0\Big].

With p=0.5p=0.5: 2p12=0\dfrac{2p-1}{2}=0, 3p26p+26=0.753+26=0.041667\dfrac{3p^2-6p+2}{6}=\dfrac{0.75-3+2}{6}=-0.041667.

dydx=10.2[0.128+0+(0.041667)(0.048)]=10.2(0.126)=0.63.\frac{dy}{dx}=\frac{1}{0.2}\big[0.128+0+(-0.041667)(0.048)\big]=\frac{1}{0.2}(0.126)=\boxed{0.63}.

Second derivative

d2ydx2=1h2[Δ2y0+(p1)Δ3y0]=10.04[0.288+(0.51)(0.048)]=10.04(0.264)=6.6.\frac{d^2y}{dx^2}=\frac{1}{h^2}\Big[\Delta^2y_0+(p-1)\Delta^3y_0\Big]=\frac{1}{0.04}\big[0.288+(0.5-1)(0.048)\big]=\frac{1}{0.04}(0.264)=\boxed{6.6}.

Thus at x=1.1x=1.1, f(x)0.63f'(x)\approx 0.63 and f(x)6.6f''(x)\approx 6.6.

numerical-differentiationfinite-difference
8short8 marks

Fit a straight line y=a+bxy = a + bx to the following data using the method of least squares and estimate the value of yy when x=2.5x = 2.5:

x12345
y1.21.83.34.56.3

Least-Squares Straight Line y=a+bxy=a+bx

Normal equations:

y=na+bx,xy=ax+bx2.\sum y=na+b\sum x,\qquad \sum xy=a\sum x+b\sum x^2.
xxyyx2x^2xyxy
11.211.2
21.843.6
33.399.9
44.51618.0
56.32531.5
\sum17.15564.2

with x=15,  n=5\sum x=15,\;n=5. The normal equations:

17.1=5a+15b,64.2=15a+55b.17.1=5a+15b,\qquad 64.2=15a+55b.

Solving (e.g. b=nxyxynx2(x)2=5(64.2)15(17.1)5(55)225=321256.550=64.550=1.29b=\dfrac{n\sum xy-\sum x\sum y}{n\sum x^2-(\sum x)^2}=\dfrac{5(64.2)-15(17.1)}{5(55)-225}=\dfrac{321-256.5}{50}=\dfrac{64.5}{50}=1.29):

b=1.29,a=ybxn=17.11.29(15)5=17.119.355=0.45.b=1.29,\qquad a=\frac{\sum y-b\sum x}{n}=\frac{17.1-1.29(15)}{5}=\frac{17.1-19.35}{5}=-0.45.

Fitted line:

y=0.45+1.29x.\boxed{y=-0.45+1.29x}.

Estimate at x=2.5x=2.5:

y=0.45+1.29(2.5)=0.45+3.225=2.775.y=-0.45+1.29(2.5)=-0.45+3.225=\boxed{2.775}.
curve-fittingleast-squares
9short8 marks

Using the fourth-order Runge-Kutta method, find an approximate value of yy at x=0.2x = 0.2 for the initial value problem dydx=x+y2\dfrac{dy}{dx} = x + y^2, y(0)=1y(0) = 1, taking a step size h=0.1h = 0.1.

Fourth-Order Runge-Kutta Method

Given dydx=f(x,y)=x+y2\dfrac{dy}{dx}=f(x,y)=x+y^2, y(0)=1y(0)=1, h=0.1h=0.1. RK4:

k1=hf(x,y),  k2=hf(x+h2,y+k12),  k3=hf(x+h2,y+k22),  k4=hf(x+h,y+k3),k_1=hf(x,y),\;k_2=hf(x+\tfrac h2,y+\tfrac{k_1}{2}),\;k_3=hf(x+\tfrac h2,y+\tfrac{k_2}{2}),\;k_4=hf(x+h,y+k_3), yn+1=yn+16(k1+2k2+2k3+k4).y_{n+1}=y_n+\tfrac16(k_1+2k_2+2k_3+k_4).

Step 1: x0=0,  y0=1x=0.1x_0=0,\;y_0=1\to x=0.1

k1=0.1(0+12)=0.100000k_1=0.1(0+1^2)=0.100000 k2=0.1(0.05+(1.05)2)=0.1(0.05+1.1025)=0.115250k_2=0.1\big(0.05+(1.05)^2\big)=0.1(0.05+1.1025)=0.115250 k3=0.1(0.05+(1.057625)2)=0.1(0.05+1.118570)=0.116857k_3=0.1\big(0.05+(1.057625)^2\big)=0.1(0.05+1.118570)=0.116857 k4=0.1(0.1+(1.116857)2)=0.1(0.1+1.247370)=0.134737k_4=0.1\big(0.1+(1.116857)^2\big)=0.1(0.1+1.247370)=0.134737 y1=1+16(0.1+2(0.11525)+2(0.116857)+0.134737)=1+0.116492=1.116492.y_1=1+\tfrac16(0.1+2(0.11525)+2(0.116857)+0.134737)=1+0.116492=1.116492.

Step 2: x1=0.1,  y1=1.116492x=0.2x_1=0.1,\;y_1=1.116492\to x=0.2

k1=0.1(0.1+(1.116492)2)=0.134655k_1=0.1\big(0.1+(1.116492)^2\big)=0.134655 k2=0.1(0.15+(1.183819)2)=0.155143k_2=0.1\big(0.15+(1.183819)^2\big)=0.155143 k3=0.1(0.15+(1.194063)2)=0.157579k_3=0.1\big(0.15+(1.194063)^2\big)=0.157579 k4=0.1(0.2+(1.274071)2)=0.182326k_4=0.1\big(0.2+(1.274071)^2\big)=0.182326 y2=1.116492+16(0.134655+2(0.155143)+2(0.157579)+0.182326)=1.116492+0.157071=1.273563.y_2=1.116492+\tfrac16(0.134655+2(0.155143)+2(0.157579)+0.182326)=1.116492+0.157071=1.273563. y(0.2)1.2736.\boxed{y(0.2)\approx 1.2736}.
numerical-solution-of-odesrunge-kutta-method
10short8 marks

Using the LU (Doolittle) decomposition method, factorize the coefficient matrix and solve the system:

2x+3y+z=9,x+2y+3z=6,3x+y+2z=8.2x + 3y + z = 9,\quad x + 2y + 3z = 6,\quad 3x + y + 2z = 8.

LU (Doolittle) Decomposition

A=(231123312),b=(968).A=\begin{pmatrix}2&3&1\\1&2&3\\3&1&2\end{pmatrix},\quad b=\begin{pmatrix}9\\6\\8\end{pmatrix}.

In Doolittle's method A=LUA=LU with unit diagonal in LL:

L=(100l2110l31l321),U=(u11u12u130u22u2300u33).L=\begin{pmatrix}1&0&0\\l_{21}&1&0\\l_{31}&l_{32}&1\end{pmatrix},\quad U=\begin{pmatrix}u_{11}&u_{12}&u_{13}\\0&u_{22}&u_{23}\\0&0&u_{33}\end{pmatrix}.

Row 1 of U: u11=2,  u12=3,  u13=1.u_{11}=2,\;u_{12}=3,\;u_{13}=1. Column 1 of L: l21=1/2=0.5,  l31=3/2=1.5.l_{21}=1/2=0.5,\;l_{31}=3/2=1.5. Row 2 of U: u22=20.5(3)=0.5,  u23=30.5(1)=2.5.u_{22}=2-0.5(3)=0.5,\;u_{23}=3-0.5(1)=2.5. l32l_{32}: l32=11.5(3)0.5=14.50.5=7.l_{32}=\dfrac{1-1.5(3)}{0.5}=\dfrac{1-4.5}{0.5}=-7. u33u_{33}: u33=21.5(1)(7)(2.5)=21.5+17.5=18.u_{33}=2-1.5(1)-(-7)(2.5)=2-1.5+17.5=18.

L=(1000.5101.571),U=(23100.52.50018).L=\begin{pmatrix}1&0&0\\0.5&1&0\\1.5&-7&1\end{pmatrix},\qquad U=\begin{pmatrix}2&3&1\\0&0.5&2.5\\0&0&18\end{pmatrix}.

Forward substitution Lz=bLz=b:

z1=9,z2=60.5(9)=1.5,z3=81.5(9)(7)(1.5)=813.5+10.5=5.z_1=9,\quad z_2=6-0.5(9)=1.5,\quad z_3=8-1.5(9)-(-7)(1.5)=8-13.5+10.5=5.

Back substitution Ux=zUx=z:

x3=518=0.2778,x_3=\frac{5}{18}=0.2778, x2=1.52.5(0.2778)0.5=1.50.69440.5=1.6111,x_2=\frac{1.5-2.5(0.2778)}{0.5}=\frac{1.5-0.6944}{0.5}=1.6111, x1=93(1.6111)1(0.2778)2=94.83330.27782=1.9444.x_1=\frac{9-3(1.6111)-1(0.2778)}{2}=\frac{9-4.8333-0.2778}{2}=1.9444. x=1.9444,  y=1.6111,  z=0.2778\boxed{x=1.9444,\;y=1.6111,\;z=0.2778}

(equivalently x=3518,y=2918,z=518x=\tfrac{35}{18},\,y=\tfrac{29}{18},\,z=\tfrac{5}{18}).

solution-of-linear-systemslu-decompositionmatrix-inverse
11short8 marks

Using the explicit (Bender-Schmidt) finite-difference scheme, solve the one-dimensional heat conduction equation ut=2ux2\dfrac{\partial u}{\partial t} = \dfrac{\partial^2 u}{\partial x^2} subject to u(0,t)=u(1,t)=0u(0,t)=u(1,t)=0, u(x,0)=sinπxu(x,0)=\sin\pi x for 0x10\le x\le 1. Take h=0.25h=0.25 and choose an appropriate time step satisfying the stability criterion; compute uu for the first two time levels.

Bender-Schmidt Explicit Scheme for the Heat Equation

The explicit finite-difference form of ut=uxxu_t=u_{xx} is

uij+1=uij+r(ui1j2uij+ui+1j),r=kh2,u_{i}^{j+1}=u_i^{j}+r\big(u_{i-1}^{j}-2u_i^{j}+u_{i+1}^{j}\big),\qquad r=\frac{k}{h^2},

where h=Δxh=\Delta x, k=Δtk=\Delta t. Stability requires r12r\le\tfrac12. Choosing the Bender-Schmidt value r=12r=\tfrac12 gives the simplified average formula

uij+1=12(ui1j+ui+1j).\boxed{u_i^{j+1}=\tfrac12\big(u_{i-1}^{j}+u_{i+1}^{j}\big)}.

With h=0.25h=0.25, r=12k=rh2=0.5(0.0625)=0.03125.r=\tfrac12\Rightarrow k=r\,h^2=0.5(0.0625)=0.03125. Mesh nodes x=0,0.25,0.5,0.75,1x=0,0.25,0.5,0.75,1.

Initial values u(x,0)=sinπxu(x,0)=\sin\pi x, with boundaries u0=u4=0u_0=u_4=0 for all tt:

u0=0,  u1=sinπ4=0.7071,  u2=sinπ2=1.0000,  u3=sin3π4=0.7071,  u4=0.u_0=0,\;u_1=\sin\tfrac\pi4=0.7071,\;u_2=\sin\tfrac\pi2=1.0000,\;u_3=\sin\tfrac{3\pi}4=0.7071,\;u_4=0.

Level j=1j=1 (t=0.03125t=0.03125):

u1=12(u0+u2)=12(0+1.0)=0.5000u_1=\tfrac12(u_0+u_2)=\tfrac12(0+1.0)=0.5000 u2=12(u1+u3)=12(0.7071+0.7071)=0.7071u_2=\tfrac12(u_1+u_3)=\tfrac12(0.7071+0.7071)=0.7071 u3=12(u2+u4)=12(1.0+0)=0.5000u_3=\tfrac12(u_2+u_4)=\tfrac12(1.0+0)=0.5000

Level j=2j=2 (t=0.0625t=0.0625):

u1=12(0+0.7071)=0.3536,u2=12(0.5+0.5)=0.5000,u3=12(0.7071+0)=0.3536.u_1=\tfrac12(0+0.7071)=0.3536,\quad u_2=\tfrac12(0.5+0.5)=0.5000,\quad u_3=\tfrac12(0.7071+0)=0.3536.
ttx=0x=00.250.500.75x=1x=1
0.0000000.70711.00000.70710
0.0312500.50000.70710.50000
0.0625000.35360.50000.35360

The solution decays symmetrically, consistent with the exact solution u=eπ2tsinπxu=e^{-\pi^2 t}\sin\pi x.

numerical-solution-of-odesheat-equationnumerical-solution-of-pdes

Frequently asked questions

Where can I find the BE Computer Engineering (IOE, TU) Numerical Methods (IOE, SH 553) question paper 2079?
The full BE Computer Engineering (IOE, TU) Numerical Methods (IOE, SH 553) 2079 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
Does the Numerical Methods (IOE, SH 553) 2079 paper come with solutions?
Yes. Every question on this Numerical Methods (IOE, SH 553) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the BE Computer Engineering (IOE, TU) Numerical Methods (IOE, SH 553) 2079 paper?
The BE Computer Engineering (IOE, TU) Numerical Methods (IOE, SH 553) 2079 paper carries 80 full marks and is meant to be completed in 180 minutes, across 11 questions.
Is practising this Numerical Methods (IOE, SH 553) past paper free?
Yes — reading and attempting this Numerical Methods (IOE, SH 553) past paper on Kekkei is completely free.