Browse papers
A

Section A: Long Answer Questions

Attempt all / any as specified.

4 questions
1long12 marks

(a) Derive the iterative formula of the Newton-Raphson method for finding a real root of the equation f(x)=0f(x)=0, and state the geometric interpretation of the method. Discuss the conditions under which the method may fail to converge. (6)

(b) A real root of the equation x32x5=0x^3 - 2x - 5 = 0 lies between 2 and 3. Using the Newton-Raphson method, perform three iterations starting from x0=2x_0 = 2 and obtain the root correct to four decimal places. Compare the rate of convergence with that of the bisection method. (6)

(a) Newton-Raphson Formula, Geometry and Failure

Derivation. Let xnx_n be an approximation to a root of f(x)=0f(x)=0. Expand ff in a Taylor series about xnx_n and retain terms up to the first order:

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

Thus the next approximation xn+1=xn+hx_{n+1}=x_n+h gives the iterative formula

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

Geometric interpretation. At the point (xn,f(xn))(x_n,f(x_n)) draw the tangent to the curve y=f(x)y=f(x). This tangent meets the xx-axis at xn+1x_{n+1}. The method therefore successively replaces the curve by its tangent, and the point where the tangent cuts the xx-axis is taken as the improved root.

Conditions for failure / non-convergence. The method may fail or diverge when:

  1. f(xn)=0f'(x_n)=0 or is very small (tangent is horizontal or nearly so), giving a huge correction.
  2. The initial guess x0x_0 is far from the root or lies near a turning point/inflection point, so iterates may oscillate or diverge.
  3. There is a multiple root, where convergence degrades from quadratic to linear.
  4. The function is not sufficiently smooth (ff' not continuous) near the root.

When it does converge near a simple root the convergence is quadratic, i.e. the error satisfies en+1Cen2e_{n+1}\approx C\,e_n^{2}.

(b) Root of x32x5=0x^3-2x-5=0

Here f(x)=x32x5, f(x)=3x22f(x)=x^{3}-2x-5,\ f'(x)=3x^{2}-2, with x0=2x_0=2.

nnxnx_nf(xn)f(x_n)f(xn)f'(x_n)xn+1=xnf(xn)f(xn)x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}
02.0000001-1102.100000
12.1000000.06100011.232.094568
22.0945680.00018911.16142.094551

After three iterations the root is

x2.0946 (correct to 4 decimal places).\boxed{x\approx 2.0946\ \text{(correct to 4 decimal places).}}

Comparison with bisection. The bisection method halves the interval each step, so its error decreases linearly: en+1=12ene_{n+1}=\tfrac12 e_n, needing about log2(range/tol)14\log_2(\text{range}/\text{tol})\approx 14 steps for 10410^{-4} accuracy on [2,3][2,3]. Newton-Raphson roughly doubles the number of correct digits each iteration (quadratic convergence) and reached 4-decimal accuracy in only 3 iterations. Hence Newton-Raphson converges much faster, though bisection is always convergent once the root is bracketed.

roots-of-equationsnewton-raphsonbisection-method
2long14 marks

(a) Derive Newton's forward difference interpolation formula and clearly state the situation in which it should be preferred over Newton's backward difference formula. (6)

(b) The following table gives the population (in thousands) of a town in different census years:

Year (xx)19711981199120012011
Population (yy)46668193101

Using an appropriate interpolation formula, estimate the population of the town in the year 1976. (8)

(a) Newton's Forward Difference Interpolation Formula

For equally spaced nodes xi=x0+ihx_i=x_0+ih, with forward differences Δy0,Δ2y0,\Delta y_0,\Delta^2 y_0,\dots, put p=xx0hp=\dfrac{x-x_0}{h}. The interpolating polynomial is

y(x)=y0+pΔy0+p(p1)2!Δ2y0+p(p1)(p2)3!Δ3y0+y(x)=y_0+p\,\Delta y_0+\frac{p(p-1)}{2!}\Delta^2 y_0+\frac{p(p-1)(p-2)}{3!}\Delta^3 y_0+\cdots

Outline of derivation. Using the shift operator EE with Ey0=y1E\,y_0=y_1 and E=1+ΔE=1+\Delta, we have yp=Epy0=(1+Δ)py0y_p=E^{p}y_0=(1+\Delta)^{p}y_0. Expanding (1+Δ)p(1+\Delta)^p by the binomial theorem,

yp=[1+pΔ+p(p1)2!Δ2+p(p1)(p2)3!Δ3+]y0,y_p=\Big[1+p\Delta+\tfrac{p(p-1)}{2!}\Delta^2+\tfrac{p(p-1)(p-2)}{3!}\Delta^3+\cdots\Big]y_0,

which is the required formula.

When to prefer it. Newton's forward formula should be used to interpolate near the beginning of the table (small pp, xx close to x0x_0). Newton's backward formula is preferred near the end of the table (close to xnx_n). Since 1976 is close to the first tabulated year 1971, the forward formula is appropriate here.

(b) Population in 1976

With x0=1971, h=10x_0=1971,\ h=10, the forward difference table is:

xxyyΔ\DeltaΔ2\Delta^2Δ3\Delta^3Δ4\Delta^4
197146205-523-3
198166153-31-1
199181124-4
2001938
2011101

Here p=1976197110=0.5p=\dfrac{1976-1971}{10}=0.5. Applying the formula:

y=46+(0.5)(20)+(0.5)(0.5)2(5)+(0.5)(0.5)(1.5)6(2)+(0.5)(0.5)(1.5)(2.5)24(3)y=46+(0.5)(20)+\frac{(0.5)(-0.5)}{2}(-5)+\frac{(0.5)(-0.5)(-1.5)}{6}(2)+\frac{(0.5)(-0.5)(-1.5)(-2.5)}{24}(-3) y=46+10+0.625+0.125+0.1172=56.867.y=46+10+0.625+0.125+0.1172=56.867. Population in 197656.87 thousand (56,867).\boxed{\text{Population in 1976}\approx 56.87\ \text{thousand}\ (\approx 56{,}867).}
interpolationnewton-divided-differencelagrange-interpolation
3long14 marks

(a) Derive the fourth-order Runge-Kutta method for solving the first-order ordinary differential equation dydx=f(x,y)\frac{dy}{dx}=f(x,y) with the initial condition y(x0)=y0y(x_0)=y_0. (6)

(b) Using the fourth-order Runge-Kutta method, find y(0.2)y(0.2) for the initial value problem dydx=x+y2,  y(0)=1\frac{dy}{dx}=x+y^2,\; y(0)=1, taking step size h=0.1h=0.1. Carry out two steps and retain four decimal places. (8)

(a) Fourth-Order Runge-Kutta Method

For dydx=f(x,y), y(x0)=y0\dfrac{dy}{dx}=f(x,y),\ y(x_0)=y_0, the RK4 method estimates the increment in yy over one step hh as a weighted average of four slopes:

k1=hf(xn,yn),k_1=h\,f(x_n,y_n), k2=hf ⁣(xn+h2,yn+k12),k_2=h\,f\!\left(x_n+\tfrac{h}{2},\,y_n+\tfrac{k_1}{2}\right), k3=hf ⁣(xn+h2,yn+k22),k_3=h\,f\!\left(x_n+\tfrac{h}{2},\,y_n+\tfrac{k_2}{2}\right), k4=hf ⁣(xn+h,yn+k3),k_4=h\,f\!\left(x_n+h,\,y_n+k_3\right), yn+1=yn+16(k1+2k2+2k3+k4).\boxed{y_{n+1}=y_n+\tfrac{1}{6}\,(k_1+2k_2+2k_3+k_4).}

Idea of derivation. Write yn+1=yn+wikiy_{n+1}=y_n+\sum w_i k_i and expand each kik_i and the exact solution in Taylor series in hh. Matching the coefficients of h,h2,h3,h4h,h^2,h^3,h^4 gives the standard weights 16,13,13,16\tfrac16,\tfrac13,\tfrac13,\tfrac16 and the half-step evaluation points. The local truncation error is O(h5)O(h^{5}), so the method is fourth order accurate.

(b) Solve dydx=x+y2, y(0)=1, h=0.1\frac{dy}{dx}=x+y^{2},\ y(0)=1,\ h=0.1

Step 1 (x0=0, y0=1x_0=0,\ y_0=1):

k1=0.1f(0,1)=0.1(1)=0.1000k_1=0.1\,f(0,1)=0.1(1)=0.1000 k2=0.1f(0.05,1.05)=0.1(0.05+1.1025)=0.1153k_2=0.1\,f(0.05,1.05)=0.1(0.05+1.1025)=0.1153 k3=0.1f(0.05,1.0577)=0.1(0.05+1.1187)=0.1169k_3=0.1\,f(0.05,1.0577)=0.1(0.05+1.1187)=0.1169 k4=0.1f(0.1,1.1169)=0.1(0.1+1.2475)=0.1347k_4=0.1\,f(0.1,1.1169)=0.1(0.1+1.2475)=0.1347 y1=1+16(0.1+2(0.1153)+2(0.1169)+0.1347)=1.1165.y_1=1+\tfrac16(0.1+2(0.1153)+2(0.1169)+0.1347)=1.1165.

So y(0.1)1.1165y(0.1)\approx 1.1165.

Step 2 (x1=0.1, y1=1.1165x_1=0.1,\ y_1=1.1165):

k1=0.1347,k2=0.1551,k3=0.1576,k4=0.1823k_1=0.1347,\quad k_2=0.1551,\quad k_3=0.1576,\quad k_4=0.1823 y2=1.1165+16(0.1347+2(0.1551)+2(0.1576)+0.1823)=1.2736.y_2=1.1165+\tfrac16(0.1347+2(0.1551)+2(0.1576)+0.1823)=1.2736. y(0.2)1.2736.\boxed{y(0.2)\approx 1.2736.}
numerical-solution-of-odesrunge-kutta-methodeuler-method
4long12 marks

(a) Explain the Gauss-Seidel iterative method for solving a system of linear equations. State the condition of diagonal dominance and explain why it guarantees convergence. (5)

(b) Solve the following system of equations using the Gauss-Seidel iterative method, performing iterations until the values are correct to three decimal places:

10x+2y+z=9,2x+20y2z=44,2x+3y+10z=2210x + 2y + z = 9,\quad 2x + 20y - 2z = -44,\quad -2x + 3y + 10z = 22

(7)

(a) Gauss-Seidel Method and Diagonal Dominance

For a system Ax=bAx=b, solve the ii-th equation for xix_i:

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

Unlike Jacobi's method, Gauss-Seidel uses each newly computed value immediately within the same iteration, which usually speeds up convergence. Iterations continue until successive values agree to the required accuracy.

Diagonal dominance. The matrix is (strictly) diagonally dominant if for every row

aii>jiaij.|a_{ii}|>\sum_{j\neq i}|a_{ij}|.

When this holds, the magnitude of the iteration's correction terms is bounded by a factor <1<1, so the error contracts every sweep; hence the iteration converges to the unique solution regardless of the starting guess. If a system is not dominant, rearranging the equations to achieve dominance is advisable.

(b) Solve by Gauss-Seidel

The system is already diagonally dominant. Rearranged:

x=92yz10,y=442x+2z20,z=22+2x3y10.x=\frac{9-2y-z}{10},\quad y=\frac{-44-2x+2z}{20},\quad z=\frac{22+2x-3y}{10}.

Starting with x=y=z=0x=y=z=0:

Iterxxyyzz
10.9002.290-2.2903.067
21.05131.9984-1.99843.0098
30.99871.9989-1.99892.9994
40.99982.0000-2.00003.0000
51.00002.0000-2.00003.0000

The values are stable to three decimal places:

x=1.000,y=2.000,z=3.000.\boxed{x=1.000,\quad y=-2.000,\quad z=3.000.}
linear-systemsgauss-seidelgaussian-elimination
B

Section B: Short Answer Questions

Attempt all / any as specified.

7 questions
5short7 marks

Using the secant method, find a real root of the equation cosxxex=0\cos x - x e^{x} = 0 correct to three decimal places. Take initial approximations x0=0x_0 = 0 and x1=1x_1 = 1, and tabulate your iterations.

Secant Method for f(x)=cosxxex=0f(x)=\cos x - x e^{x}=0

Formula: xn+1=xnf(xn)xnxn1f(xn)f(xn1).\displaystyle x_{n+1}=x_n-f(x_n)\,\frac{x_n-x_{n-1}}{f(x_n)-f(x_{n-1})}.

With x0=0, x1=1x_0=0,\ x_1=1: f(0)=1, f(1)=cos1e=0.54032.7183=2.1780.f(0)=1,\ f(1)=\cos 1 - e=0.5403-2.7183=-2.1780.

nnxn1x_{n-1}xnx_nf(xn)f(x_n)xn+1x_{n+1}
10.000001.000002.17798-2.177980.31467
21.000000.314670.519870.44673
30.314670.446730.203540.53171
40.446730.531710.04293-0.042930.51690
50.531710.516900.002590.51776
60.516900.517760\approx 00.51776

Successive values agree to three decimals at x0.5177x\approx 0.51770.51780.5178.

Root x0.518.\boxed{\text{Root }x\approx 0.518.}
roots-of-equationssecant-method
6short7 marks

Fit a curve of the form y=aebxy = a e^{bx} to the following data by the method of least squares and hence estimate yy at x=6x = 6:

xx12345
yy1.652.704.507.3512.10

Fitting y=aebxy=a e^{bx} by Least Squares

Take logarithms: lny=lna+bx\ln y=\ln a + b x. Let Y=lny, A=lnaY=\ln y,\ A=\ln a, so Y=A+bxY=A+bx — a straight line fitted by least squares.

xxyyY=lnyY=\ln yx2x^2xYxY
11.650.500810.5008
22.700.993341.9865
34.501.504194.5122
47.351.9947167.9788
512.102.49322512.4659
\sum7.48605527.4443

With n=5, x=15n=5,\ \sum x=15:

b=nxYxYnx2(x)2=5(27.4443)15(7.4860)5(55)225=24.931550=0.4986,b=\frac{n\sum xY-\sum x\sum Y}{n\sum x^2-(\sum x)^2}=\frac{5(27.4443)-15(7.4860)}{5(55)-225}=\frac{24.9315}{50}=0.4986, A=Ybxn=7.48600.4986(15)5=0.0013  a=e0.00131.00131.00.A=\frac{\sum Y-b\sum x}{n}=\frac{7.4860-0.4986(15)}{5}=0.0013\ \Rightarrow\ a=e^{0.0013}\approx 1.0013\approx 1.00.

Hence the fitted curve is

y1.00e0.499x.\boxed{y\approx 1.00\,e^{0.499\,x}.}

Estimate at x=6x=6: y=1.0013e0.4986×6=1.0013e2.991619.95.y=1.0013\,e^{0.4986\times 6}=1.0013\,e^{2.9916}\approx 19.95.

y(6)19.95.\boxed{y(6)\approx 19.95.}
curve-fittingleast-squareslinearization
7short7 marks

Evaluate the integral 01dx1+x2\int_{0}^{1}\frac{dx}{1+x^{2}} by dividing the interval into six equal subintervals, using (a) the Trapezoidal rule and (b) Simpson's 1/31/3 rule. Compare both results with the exact value and comment on the accuracy.

Evaluating 01dx1+x2\displaystyle\int_0^1\frac{dx}{1+x^2} with n=6, h=16n=6,\ h=\tfrac16

xi: 0, 16, 26, 36, 46, 56, 1.x_i:\ 0,\ \tfrac16,\ \tfrac26,\ \tfrac36,\ \tfrac46,\ \tfrac56,\ 1.
iixix_iyi=11+xi2y_i=\frac{1}{1+x_i^2}
00.00001.000000
10.16670.972973
20.33330.900000
30.50000.800000
40.66670.692308
50.83330.590164
61.00000.500000

(a) Trapezoidal rule.

IT=h2[(y0+y6)+2(y1+y2+y3+y4+y5)]=1/62[1.5+2(3.955445)]=0.784241.I_T=\frac{h}{2}\big[(y_0+y_6)+2(y_1+y_2+y_3+y_4+y_5)\big]=\frac{1/6}{2}\big[1.5+2(3.955445)\big]=0.784241.

(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] =1/63[1.5+4(2.363137)+2(1.592308)]=0.785398.=\frac{1/6}{3}\big[1.5+4(2.363137)+2(1.592308)\big]=0.785398.

Exact value: 01dx1+x2=tan11=π4=0.785398.\displaystyle\int_0^1\frac{dx}{1+x^2}=\tan^{-1}1=\frac{\pi}{4}=0.785398.

MethodValueError
Trapezoidal0.7842410.001157
Simpson's 1/30.7853980.000000\approx 0.000000
Exact π/4\pi/40.785398

Comment. Simpson's rule is far more accurate: it fits parabolic arcs (error O(h4)O(h^4)) and matches the exact value to six decimals, whereas the trapezoidal rule (error O(h2)O(h^2)) is correct only to about two decimals.

numerical-integrationsimpsons-ruletrapezoidal-rule
8short6 marks

From the following table of values, find the first and second derivatives of the function y=f(x)y=f(x) at x=1.1x = 1.1 using suitable numerical differentiation formulae:

xx1.01.21.41.61.8
yy0.0000.1280.5441.2962.432

Numerical Differentiation at x=1.1x=1.1

The nodes are equally spaced with h=0.2h=0.2 and x0=1.0x_0=1.0. Since 1.11.1 is near the start, use Newton's forward-difference derivative formulae with p=1.11.00.2=0.5p=\dfrac{1.1-1.0}{0.2}=0.5.

Forward difference table:

xxyyΔ\DeltaΔ2\Delta^2Δ3\Delta^3Δ4\Delta^4
1.00.0000.1280.2880.0480.000
1.20.1280.4160.3360.048
1.40.5440.7520.384
1.61.2961.136
1.82.432

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^2 y_0+\frac{3p^2-6p+2}{6}\Delta^3 y_0+\cdots\Big].

With p=0.5p=0.5 (Δ4=0\Delta^4=0):

dydx=10.2[0.128+02(0.288)+3(0.25)3+26(0.048)]=10.2[0.1280.002]=0.1260.2=0.63.\frac{dy}{dx}=\frac{1}{0.2}\Big[0.128+\frac{0}{2}(0.288)+\frac{3(0.25)-3+2}{6}(0.048)\Big]=\frac{1}{0.2}\big[0.128-0.002\big]=\frac{0.126}{0.2}=0.63.

Second derivative:

d2ydx2=1h2[Δ2y0+(p1)Δ3y0+12p236p+2224Δ4y0+].\frac{d^2y}{dx^2}=\frac{1}{h^2}\Big[\Delta^2 y_0+(p-1)\Delta^3 y_0+\frac{12p^2-36p+22}{24}\Delta^4 y_0+\cdots\Big].

With p=0.5p=0.5: d2ydx2=10.04[0.288+(0.5)(0.048)]=0.2640.04=6.6.\dfrac{d^2y}{dx^2}=\dfrac{1}{0.04}\big[0.288+(-0.5)(0.048)\big]=\dfrac{0.264}{0.04}=6.6.

y(1.1)0.63,y(1.1)6.6.\boxed{y'(1.1)\approx 0.63,\qquad y''(1.1)\approx 6.6.}
numerical-differentiationfinite-differences
9short6 marks

(a) Distinguish between truncation error and round-off error with one example of each. (3)

(b) If u=5xy2z3u = \frac{5xy^{2}}{z^{3}} and errors in x,y,zx, y, z are each 0.0010.001 at x=y=z=1x = y = z = 1, compute the maximum absolute error and the maximum relative error in uu. (3)

(a) Truncation vs Round-off Error

Truncation error arises from approximating an infinite/exact mathematical process by a finite one — i.e. from terminating a series or replacing a derivative/integral by a finite formula. Example: using sinxxx36\sin x\approx x-\dfrac{x^3}{6} (dropping higher terms) introduces a truncation error of order x5/120x^5/120.

Round-off error arises because a computer/calculator stores numbers with a finite number of digits, so each stored value or arithmetic result is rounded. Example: representing 13=0.3333\tfrac13=0.3333 to 4 digits introduces a round-off error of about 0.0000330.000033.

(b) Error in u=5xy2z3u=\dfrac{5xy^{2}}{z^{3}}

The maximum absolute error is

δu=uxδx+uyδy+uzδz.\delta u=\Big|\frac{\partial u}{\partial x}\Big|\delta x+\Big|\frac{\partial u}{\partial y}\Big|\delta y+\Big|\frac{\partial u}{\partial z}\Big|\delta z.

Partial derivatives:

ux=5y2z3,uy=10xyz3,uz=15xy2z4.\frac{\partial u}{\partial x}=\frac{5y^2}{z^3},\quad \frac{\partial u}{\partial y}=\frac{10xy}{z^3},\quad \frac{\partial u}{\partial z}=-\frac{15xy^2}{z^4}.

At x=y=z=1x=y=z=1: u=5u=5, and the partials are 5, 10, 155,\ 10,\ 15 in magnitude. With δx=δy=δz=0.001\delta x=\delta y=\delta z=0.001:

δu=(5+10+15)(0.001)=30(0.001)=0.03.\delta u=(5+10+15)(0.001)=30(0.001)=0.03.

Maximum relative error:

δuu=0.035=0.006 (=0.6%).\frac{\delta u}{u}=\frac{0.03}{5}=0.006\ (=0.6\%).

(Equivalently, since δuu=δxx+2δyy+3δzz=0.001+0.002+0.003=0.006.\dfrac{\delta u}{u}=\dfrac{\delta x}{x}+2\dfrac{\delta y}{y}+3\dfrac{\delta z}{z}=0.001+0.002+0.003=0.006.)

δumax=0.03,(δuu)max=0.006.\boxed{\delta u_{\max}=0.03,\qquad \left(\frac{\delta u}{u}\right)_{\max}=0.006.}
error-analysisround-off-errortruncation-error
10short7 marks

Using the Modified Euler method, solve the differential equation dydx=x+y\frac{dy}{dx} = x + y with y(0)=1y(0) = 1 to find y(0.1)y(0.1) and y(0.2)y(0.2), taking h=0.1h = 0.1. Perform the corrector iteration until two successive values agree to four decimal places.

Modified Euler Method for dydx=x+y, y(0)=1, h=0.1\frac{dy}{dx}=x+y,\ y(0)=1,\ h=0.1

Predictor (Euler): yn+1(0)=yn+hf(xn,yn).y_{n+1}^{(0)}=y_n+h\,f(x_n,y_n).

Corrector: yn+1(k+1)=yn+h2[f(xn,yn)+f(xn+1,yn+1(k))]y_{n+1}^{(k+1)}=y_n+\dfrac{h}{2}\big[f(x_n,y_n)+f(x_{n+1},y_{n+1}^{(k)})\big], iterated until convergence.

Step 1: find y(0.1)y(0.1), with x0=0, y0=1, f(x0,y0)=1x_0=0,\ y_0=1,\ f(x_0,y_0)=1

  • Predictor: y1(0)=1+0.1(1)=1.1000.y_1^{(0)}=1+0.1(1)=1.1000.
  • Corrector 1: y1=1+0.12[1+(0.1+1.1)]=1+0.05(2.2)=1.1100.y_1=1+\tfrac{0.1}{2}\big[1+(0.1+1.1)\big]=1+0.05(2.2)=1.1100.
  • Corrector 2: y1=1+0.05[1+(0.1+1.1100)]=1+0.05(2.2100)=1.1105.y_1=1+0.05\big[1+(0.1+1.1100)\big]=1+0.05(2.2100)=1.1105.
  • Corrector 3: y1=1+0.05[1+(0.1+1.1105)]=1.11053.y_1=1+0.05\big[1+(0.1+1.1105)\big]=1.11053.

Converged: y(0.1)1.1105.\boxed{y(0.1)\approx 1.1105.}

Step 2: find y(0.2)y(0.2), with x1=0.1, y1=1.1105, f(x1,y1)=1.2105x_1=0.1,\ y_1=1.1105,\ f(x_1,y_1)=1.2105

  • Predictor: y2(0)=1.1105+0.1(1.2105)=1.2316.y_2^{(0)}=1.1105+0.1(1.2105)=1.2316.
  • Corrector 1: y2=1.1105+0.05[1.2105+(0.2+1.2316)]=1.1105+0.05(2.6421)=1.2426.y_2=1.1105+0.05\big[1.2105+(0.2+1.2316)\big]=1.1105+0.05(2.6421)=1.2426.
  • Corrector 2: y2=1.1105+0.05[1.2105+(0.2+1.2426)]=1.1105+0.05(2.6531)=1.2432.y_2=1.1105+0.05\big[1.2105+(0.2+1.2426)\big]=1.1105+0.05(2.6531)=1.2432.
  • Corrector 3: y2=1.1105+0.05[1.2105+(0.2+1.2432)]=1.2432.y_2=1.1105+0.05\big[1.2105+(0.2+1.2432)\big]=1.2432.

Converged: y(0.2)1.2432.\boxed{y(0.2)\approx 1.2432.}

(For reference the exact solution y=2exx1y=2e^{x}-x-1 gives y(0.1)=1.1103, y(0.2)=1.2428y(0.1)=1.1103,\ y(0.2)=1.2428, confirming the accuracy.)

numerical-solution-of-odespredictor-correctormodified-euler
11short7 marks

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

x+y+z=6,3x+3y+4z=20,2x+y+3z=13x + y + z = 6,\quad 3x + 3y + 4z = 20,\quad 2x + y + 3z = 13

LU (Doolittle) Decomposition

The system x+y+z=6, 3x+3y+4z=20, 2x+y+3z=13x+y+z=6,\ 3x+3y+4z=20,\ 2x+y+3z=13 has coefficient matrix

A=(111334213),b=(62013).A=\begin{pmatrix}1&1&1\\3&3&4\\2&1&3\end{pmatrix},\qquad b=\begin{pmatrix}6\\20\\13\end{pmatrix}.

Note on pivoting. Direct Doolittle factorization fails at the (2,2)(2,2) pivot because u22=a22l21u12=33(1)=0u_{22}=a_{22}-l_{21}u_{12}=3-3(1)=0. We therefore interchange rows 2 and 3 (partial pivoting) and factorize the rearranged system

A=(111213334),b=(61320).A'=\begin{pmatrix}1&1&1\\2&1&3\\3&3&4\end{pmatrix},\qquad b'=\begin{pmatrix}6\\13\\20\end{pmatrix}.

Doolittle factorization A=LUA'=LU (LL unit lower-triangular):

L=(100210301),U=(111011001).L=\begin{pmatrix}1&0&0\\2&1&0\\3&0&1\end{pmatrix},\qquad U=\begin{pmatrix}1&1&1\\0&-1&1\\0&0&1\end{pmatrix}.

Check: u11=1,u12=1,u13=1; l21=2, u22=12=1, u23=32=1; l31=3, l32=(33)/(1)=0, u33=430=1.u_{11}=1,u_{12}=1,u_{13}=1;\ l_{21}=2,\ u_{22}=1-2=-1,\ u_{23}=3-2=1;\ l_{31}=3,\ l_{32}=(3-3)/(-1)=0,\ u_{33}=4-3-0=1.

Forward substitution Ly=bLy=b':

y1=6,y2=132(6)=1,y3=203(6)0=2.y_1=6,\quad y_2=13-2(6)=1,\quad y_3=20-3(6)-0=2.

Back substitution Ux=yUx=y:

x3=2,x2+x3=1x2=1,x1+x2+x3=6x1=3.x_3=2,\quad -x_2+x_3=1\Rightarrow x_2=1,\quad x_1+x_2+x_3=6\Rightarrow x_1=3. x=3,y=1,z=2.\boxed{x=3,\quad y=1,\quad z=2.}
linear-systemslu-decompositionmatrix-inversion

Frequently asked questions

Where can I find the BE Computer Engineering (Pokhara University) Numerical Methods (PU, MTH 252) question paper 2078?
The full BE Computer Engineering (Pokhara University) Numerical Methods (PU, MTH 252) 2078 (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 (PU, MTH 252) 2078 paper come with solutions?
Yes. Every question on this Numerical Methods (PU, MTH 252) 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 (Pokhara University) Numerical Methods (PU, MTH 252) 2078 paper?
The BE Computer Engineering (Pokhara University) Numerical Methods (PU, MTH 252) 2078 paper carries 100 full marks and is meant to be completed in 180 minutes, across 11 questions.
Is practising this Numerical Methods (PU, MTH 252) past paper free?
Yes — reading and attempting this Numerical Methods (PU, MTH 252) past paper on Kekkei is completely free.