Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

Explain the bisection method for finding the root of a non-linear equation. Find a real root of the equation x^3 - x - 1 = 0 correct to three decimal places using the bisection method.

Bisection Method

The bisection method is a bracketing method to find a real root of a continuous nonlinear equation f(x)=0f(x)=0. It is based on the Intermediate Value Theorem: if ff is continuous on [a,b][a,b] and f(a)f(b)<0f(a)\cdot f(b)<0, then at least one root lies in (a,b)(a,b).

Procedure

  1. Choose aa and bb such that f(a)f(b)<0f(a)\cdot f(b)<0.
  2. Compute the midpoint c=a+b2c=\dfrac{a+b}{2}.
  3. If f(c)=0f(c)=0 (or f(c)<ε|f(c)|<\varepsilon), then cc is the root.
  4. If f(a)f(c)<0f(a)\cdot f(c)<0, the root lies in [a,c][a,c], so set b=cb=c; otherwise the root lies in [c,b][c,b], so set a=ca=c.
  5. Repeat until ba|b-a| is smaller than the required tolerance.

The method always converges (it is unconditionally convergent) but linearly, since the interval halves each step.

Solving f(x)=x3x1=0f(x)=x^3-x-1=0

f(1)=111=1<0f(1)=1-1-1=-1<0 and f(2)=821=5>0f(2)=8-2-1=5>0, so a root lies in [1,2][1,2].

nabc=(a+b)/2f(c)New interval
11.0002.0001.500000+0.875[1, 1.5]
21.0001.5001.250000-0.2969[1.25, 1.5]
31.2501.5001.375000+0.2246[1.25, 1.375]
41.2501.3751.312500-0.0515[1.3125,1.375]
51.31251.3751.343750+0.0826[1.3125,1.34375]
61.31251.343751.328125+0.01458[1.3125,1.328125]
71.31251.3281251.320313-0.01859[1.320313,1.328125]
81.3203131.3281251.324219-0.00204[1.324219,1.328125]
91.3242191.3281251.326172+0.00627[1.324219,1.326172]
101.3242191.3261721.325195+0.00211[1.324219,1.325195]
111.3242191.3251951.324707+0.00003[1.324219,1.324707]

Continuing until the third decimal place stabilises, the root is

x1.3247x \approx 1.3247

Correct to three decimal places, the root is x1.325x \approx 1.325.

nonlinearbisection
2long10 marks

What is interpolation? Derive Newton's forward and backward difference interpolation formulae and explain when each is used.

Interpolation

Interpolation is the process of estimating the value of a function f(x)f(x) at an intermediate point xx lying within the range of a given set of tabulated data points (x0,y0),(x1,y1),,(xn,yn)(x_0,y_0),(x_1,y_1),\dots,(x_n,y_n), by constructing a polynomial that passes through all the given points.

For equally spaced data with step size hh (xi=x0+ihx_i = x_0 + ih), Newton's difference formulae are used.

Newton's Forward Difference Formula

Let p=xx0hp=\dfrac{x-x_0}{h}. Using the forward difference operator Δyi=yi+1yi\Delta y_i = y_{i+1}-y_i:

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

Derivation (outline): Express the interpolating polynomial as a Newton series y=a0+a1(xx0)+a2(xx0)(xx1)+y = a_0 + a_1(x-x_0)+a_2(x-x_0)(x-x_1)+\cdots. Substituting x=x0,x1,x=x_0,x_1,\dots gives a0=y0a_0=y_0, a1=Δy0/ha_1=\Delta y_0/h, a2=Δ2y0/(2!h2)a_2=\Delta^2 y_0/(2!h^2), etc. Writing xx0=phx-x_0=ph yields the formula above.

Newton's Backward Difference Formula

Let p=xxnhp=\dfrac{x-x_n}{h}. Using the backward difference operator yi=yiyi1\nabla y_i = y_i-y_{i-1}:

y(x)=yn+pyn+p(p+1)2!2yn+p(p+1)(p+2)3!3yn+y(x)=y_n+p\,\nabla y_n+\frac{p(p+1)}{2!}\nabla^2 y_n+\frac{p(p+1)(p+2)}{3!}\nabla^3 y_n+\cdots

It is derived analogously by building the Newton series from the last point backward.

When Each is Used

  • Forward formula is used to interpolate near the beginning of the table (when xx is close to x0x_0), since it uses the leading differences.
  • Backward formula is used to interpolate near the end of the table (when xx is close to xnx_n), since it uses the trailing differences.

Both require equally spaced data; for unequal spacing, Lagrange's or Newton's divided difference formula is used.

interpolation
3long10 marks

Explain the Gauss elimination method with partial pivoting to solve a system of linear equations. Solve the system 2x + y + z = 10, 3x + 2y + 3z = 18, x + 4y + 9z = 16.

Gauss Elimination with Partial Pivoting

Gauss elimination solves Ax=bAx=b by transforming the augmented matrix [Ab][A\,|\,b] into upper-triangular form using elementary row operations (forward elimination), then solving by back substitution.

Partial pivoting: before eliminating column kk, the row below (or at) the pivot having the largest absolute value in that column is swapped into the pivot position. This avoids division by small/zero pivots and improves numerical stability.

Solving the System

2x+y+z=10,3x+2y+3z=18,x+4y+9z=162x+y+z=10,\quad 3x+2y+3z=18,\quad x+4y+9z=16

Augmented matrix:

[211103231814916]\left[\begin{array}{ccc|c}2&1&1&10\\3&2&3&18\\1&4&9&16\end{array}\right]

Step 1 – pivot in column 1. Largest magnitude is 33 (row 2). Swap R1R2R_1\leftrightarrow R_2:

[323182111014916]\left[\begin{array}{ccc|c}3&2&3&18\\2&1&1&10\\1&4&9&16\end{array}\right]

Eliminate: R2R223R1R_2\to R_2-\tfrac{2}{3}R_1, R3R313R1R_3\to R_3-\tfrac{1}{3}R_1:

[32318013120103810]\left[\begin{array}{ccc|c}3&2&3&18\\0&-\tfrac13&-1&-2\\0&\tfrac{10}{3}&8&10\end{array}\right]

Step 2 – pivot in column 2. 103>13|\tfrac{10}{3}|>|\tfrac13|, so swap R2R3R_2\leftrightarrow R_3:

[32318010381001312]\left[\begin{array}{ccc|c}3&2&3&18\\0&\tfrac{10}{3}&8&10\\0&-\tfrac13&-1&-2\end{array}\right]

Eliminate: R3R31/310/3R2=R3+110R2R_3\to R_3-\dfrac{-1/3}{10/3}R_2 = R_3+\tfrac{1}{10}R_2:

[323180103810000.21]\left[\begin{array}{ccc|c}3&2&3&18\\0&\tfrac{10}{3}&8&10\\0&0&-0.2&-1\end{array}\right]

Back substitution:

0.2z=1z=5-0.2\,z=-1 \Rightarrow z=5 103y+8(5)=10103y=30y=9\tfrac{10}{3}y+8(5)=10 \Rightarrow \tfrac{10}{3}y=-30 \Rightarrow y=-9 3x+2(9)+3(5)=183x3=18x=73x+2(-9)+3(5)=18 \Rightarrow 3x-3=18 \Rightarrow x=7

Solution: x=7,  y=9,  z=5\boxed{x=7,\; y=-9,\; z=5}

Check: 2(7)+(9)+5=102(7)+(-9)+5=10 ✓, 3(7)+2(9)+3(5)=183(7)+2(-9)+3(5)=18 ✓, 7+4(9)+9(5)=167+4(-9)+9(5)=16 ✓.

linear-systems
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Define absolute, relative and percentage errors. Explain the sources of errors in numerical computation.

Errors in Numerical Computation

Let xTx_T be the true value and xAx_A the approximate value.

  • Absolute error: the magnitude of the difference between true and approximate values,
Ea=xTxA.E_a=|x_T-x_A|.
  • Relative error: absolute error per unit of the true value,
Er=xTxAxT.E_r=\frac{|x_T-x_A|}{|x_T|}.
  • Percentage error: relative error expressed as a percentage,
Ep=Er×100%.E_p=E_r\times 100\%.

Sources of Errors

  1. Round-off error – caused by representing numbers with a finite number of digits in a computer (finite precision).
  2. Truncation error – caused by approximating an infinite process by a finite one (e.g. truncating a Taylor/infinite series).
  3. Inherent (input/data) error – present in the original data due to measurement limitations or initial assumptions.
  4. Modelling/formulation error – arises from simplifying a real problem into a mathematical model.
  5. Human/blunder errors – mistakes in writing programs, copying numbers, or in formulae.
errors
5short5 marks

Explain the secant method for finding the root of an equation and compare it with the Newton-Raphson method.

Secant Method

The secant method finds a root of f(x)=0f(x)=0 by replacing the tangent used in Newton–Raphson with a secant line through two recent points. Given two approximations xn1x_{n-1} and xnx_n, the next approximation is

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

Geometrically, xn+1x_{n+1} is the point where the secant line joining (xn1,f(xn1))(x_{n-1},f(x_{n-1})) and (xn,f(xn))(x_n,f(x_n)) crosses the xx-axis.

Comparison with Newton–Raphson

FeatureSecantNewton–Raphson
Formula usestwo previous pointsone point + derivative
Derivative f(x)f'(x)not requiredrequired
Function evaluations/iteration1 (reuses old value)2 (ff and ff')
Order of convergence1.618\approx 1.618 (superlinear)22 (quadratic)
Initial guessestwo (x0,x1x_0,x_1)one (x0x_0)
Reliabilitymay fail if f(xn)=f(xn1)f(x_n)=f(x_{n-1})may fail if f(x)=0f'(x)=0

The secant method is preferred when the derivative is hard or expensive to compute, at the cost of slightly slower convergence than Newton–Raphson.

nonlinearsecant
6short5 marks

Describe the false position (regula falsi) method with its geometric interpretation.

False Position (Regula Falsi) Method

The false position method is a bracketing method to solve f(x)=0f(x)=0. Like bisection it needs an interval [a,b][a,b] with f(a)f(b)<0f(a)\cdot f(b)<0, but instead of the midpoint it uses the point where the chord (straight line) joining (a,f(a))(a,f(a)) and (b,f(b))(b,f(b)) cuts the xx-axis:

x=af(b)bf(a)f(b)f(a)=bf(b)baf(b)f(a).x=\frac{a\,f(b)-b\,f(a)}{f(b)-f(a)} = b - f(b)\,\frac{b-a}{f(b)-f(a)}.

Procedure

  1. Find a,ba,b with f(a)f(b)<0f(a)f(b)<0.
  2. Compute xx from the formula above.
  3. If f(a)f(x)<0f(a)\cdot f(x)<0, set b=xb=x; else set a=xa=x.
  4. Repeat until f(x)<ε|f(x)|<\varepsilon or the interval is sufficiently small.

Geometric Interpretation

The curve y=f(x)y=f(x) is approximated by the straight chord joining the two end-points of the bracket. The intersection of this chord with the xx-axis gives the next estimate of the root. Successive chords approach the true root. The method always keeps the root bracketed (so it always converges), generally faster than bisection because it uses the function's slope, though one endpoint may remain fixed, slowing convergence for highly curved functions.

nonlinearfalse-position
7short5 marks

State and explain Lagrange's interpolation formula with a suitable example.

Lagrange's Interpolation Formula

For n+1n+1 data points (x0,y0),(x1,y1),,(xn,yn)(x_0,y_0),(x_1,y_1),\dots,(x_n,y_n) with arbitrary (unequal) spacing, the interpolating polynomial is

y(x)=i=0nLi(x)yi,Li(x)=j=0jinxxjxixj.y(x)=\sum_{i=0}^{n} L_i(x)\,y_i,\qquad L_i(x)=\prod_{\substack{j=0\\ j\neq i}}^{n}\frac{x-x_j}{x_i-x_j}.

Each Lagrange basis polynomial Li(x)L_i(x) equals 11 at x=xix=x_i and 00 at every other node, so y(x)y(x) passes through all the given points. Its main advantage is that the data need not be equally spaced.

Example

Find yy at x=2x=2 given (1,1),(3,27),(4,64)(1,1),(3,27),(4,64) (i.e. y=x3y=x^3).

y(2)=1(23)(24)(13)(14)+27(21)(24)(31)(34)+64(21)(23)(41)(43)y(2)=1\cdot\frac{(2-3)(2-4)}{(1-3)(1-4)}+27\cdot\frac{(2-1)(2-4)}{(3-1)(3-4)}+64\cdot\frac{(2-1)(2-3)}{(4-1)(4-3)} =1(1)(2)(2)(3)+27(1)(2)(2)(1)+64(1)(1)(3)(1)=1\cdot\frac{(-1)(-2)}{(-2)(-3)}+27\cdot\frac{(1)(-2)}{(2)(-1)}+64\cdot\frac{(1)(-1)}{(3)(1)} =126+2722+6413=0.3333+2721.3333=6.=1\cdot\tfrac{2}{6}+27\cdot\tfrac{-2}{-2}+64\cdot\tfrac{-1}{3}=0.3333+27-21.3333=6.

So y(2)6y(2)\approx 6, close to the exact 23=82^3=8 (the cubic is not recovered exactly because only three points are used).

interpolationlagrange
8short5 marks

Derive the trapezoidal rule for numerical integration and state its error term.

Trapezoidal Rule

Derivation

To evaluate I=abf(x)dxI=\int_{a}^{b} f(x)\,dx, divide [a,b][a,b] into nn equal sub-intervals of width h=banh=\dfrac{b-a}{n}, with nodes xi=a+ihx_i=a+ih and ordinates yi=f(xi)y_i=f(x_i).

Over a single sub-interval [xi,xi+1][x_i,x_{i+1}], approximate f(x)f(x) by the straight line through (xi,yi)(x_i,y_i) and (xi+1,yi+1)(x_{i+1},y_{i+1}). The area under this line is a trapezium:

xixi+1f(x)dxh2(yi+yi+1).\int_{x_i}^{x_{i+1}} f(x)\,dx \approx \frac{h}{2}\,(y_i+y_{i+1}).

Summing over all sub-intervals gives the composite trapezoidal rule:

Ih2[y0+yn+2(y1+y2++yn1)].I\approx \frac{h}{2}\Big[y_0+y_n+2(y_1+y_2+\cdots+y_{n-1})\Big].

(For a single interval, I=ba2[f(a)+f(b)]I=\frac{b-a}{2}[f(a)+f(b)].)

Error Term

The error of the composite trapezoidal rule is

E=(ba)h212f(ξ)=nh312f(ξ),ξ(a,b).E=-\frac{(b-a)h^{2}}{12}\,f''(\xi)=-\frac{nh^{3}}{12}f''(\xi),\qquad \xi\in(a,b).

Thus the rule is exact for linear functions, has error O(h2)O(h^2), and underestimates/overestimates depending on the sign of ff'' (concavity).

integrationtrapezoidal
9short5 marks

Explain the Gauss-Seidel iterative method to solve a system of linear equations.

Gauss–Seidel Iterative Method

The Gauss–Seidel method is an iterative technique for solving a system Ax=bAx=b. The ii-th equation is solved for the ii-th 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).

Its key feature is that newly computed values are used immediately within the same iteration (unlike Jacobi, which uses only previous-iteration values), so it usually converges faster.

Procedure (for a 3×3 system)

Given

a11x+a12y+a13z=b1, a_{11}x+a_{12}y+a_{13}z=b_1,\ \dots

rewrite as

x(k+1)=1a11(b1a12y(k)a13z(k)),x^{(k+1)}=\tfrac{1}{a_{11}}\big(b_1-a_{12}y^{(k)}-a_{13}z^{(k)}\big), y(k+1)=1a22(b2a21x(k+1)a23z(k)),y^{(k+1)}=\tfrac{1}{a_{22}}\big(b_2-a_{21}x^{(k+1)}-a_{23}z^{(k)}\big), z(k+1)=1a33(b3a31x(k+1)a32y(k+1)).z^{(k+1)}=\tfrac{1}{a_{33}}\big(b_3-a_{31}x^{(k+1)}-a_{32}y^{(k+1)}\big).
  1. Start with an initial guess (commonly x=y=z=0x=y=z=0).
  2. Update each unknown using the latest available values.
  3. Repeat until xi(k+1)xi(k)<ε|x_i^{(k+1)}-x_i^{(k)}|<\varepsilon for all ii.

Convergence Condition

Convergence is guaranteed if the coefficient matrix is diagonally dominant, i.e. aiijiaij|a_{ii}|\ge\sum_{j\neq i}|a_{ij}| for each row (rearrange equations if needed).

linear-systemsiterative
10short5 marks

Explain numerical differentiation using forward and backward difference formulae.

Numerical Differentiation (Forward & Backward Differences)

Given a function tabulated at equally spaced points xi=x0+ihx_i=x_0+ih with step hh and values yiy_i, the derivative is estimated from finite differences.

Forward Difference Formula

Used near the beginning of the table. From Newton's forward formula, differentiating with respect to xx:

f(x0)y1y0h=Δy0h,f'(x_0)\approx\frac{y_1-y_0}{h}=\frac{\Delta y_0}{h},

and more accurately

f(x0)=1h(Δy0Δ2y02+Δ3y03).f'(x_0)=\frac{1}{h}\Big(\Delta y_0-\frac{\Delta^2 y_0}{2}+\frac{\Delta^3 y_0}{3}-\cdots\Big).

The simple first form has error O(h)O(h).

Backward Difference Formula

Used near the end of the table. From Newton's backward formula:

f(xn)ynyn1h=ynh,f'(x_n)\approx\frac{y_n-y_{n-1}}{h}=\frac{\nabla y_n}{h},

and more accurately

f(xn)=1h(yn+2yn2+3yn3+).f'(x_n)=\frac{1}{h}\Big(\nabla y_n+\frac{\nabla^2 y_n}{2}+\frac{\nabla^3 y_n}{3}+\cdots\Big).

Second Derivative

f(x0)y22y1+y0h2=Δ2y0h2.f''(x_0)\approx\frac{y_2-2y_1+y_0}{h^2}=\frac{\Delta^2 y_0}{h^2}.

Forward/backward first-difference formulae are first-order accurate (O(h)O(h)); smaller hh improves accuracy but excessively small hh amplifies round-off error.

differentiation
11short5 marks

Explain Euler's method to solve an ordinary differential equation with an example.

Euler's Method

Euler's method is the simplest numerical method to solve a first-order ODE

dydx=f(x,y),y(x0)=y0.\frac{dy}{dx}=f(x,y),\qquad y(x_0)=y_0.

It advances the solution in steps of size hh using the tangent (slope) at the current point:

yn+1=yn+hf(xn,yn),xn+1=xn+h.y_{n+1}=y_n+h\,f(x_n,y_n),\qquad x_{n+1}=x_n+h.

Geometrically, the curve is approximated by a series of short straight-line segments along the local slope. It is a first-order method with local truncation error O(h2)O(h^2) and global error O(h)O(h).

Example

Solve dydx=x+y\dfrac{dy}{dx}=x+y, y(0)=1y(0)=1, find y(0.2)y(0.2) with h=0.1h=0.1.

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

y1=1+0.1(0+1)=1.1,x1=0.1.y_1=1+0.1\,(0+1)=1.1,\quad x_1=0.1.

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

y2=1.1+0.1(0.1+1.1)=1.1+0.12=1.22,x2=0.2.y_2=1.1+0.1\,(0.1+1.1)=1.1+0.12=1.22,\quad x_2=0.2.

So y(0.2)1.22y(0.2)\approx 1.22. (The exact value is 2e0.20.211.24282e^{0.2}-0.2-1\approx 1.2428; the gap reflects Euler's first-order accuracy, which improves as hh decreases.)

odeeuler
12short5 marks

Differentiate between the Gauss elimination and Gauss-Jordan methods.

Gauss Elimination vs Gauss–Jordan

AspectGauss EliminationGauss–Jordan
Final matrix formUpper-triangular (echelon)Diagonal / reduced row-echelon (identity)
Elimination directionOnly below the pivotBoth below and above the pivot
How solution is obtainedRequires back substitutionRead off directly; no back substitution
Pivot normalisationNot necessaryPivot row divided by pivot (made 1)
Computational effortFewer operations n33\approx \frac{n^3}{3}More operations n32\approx \frac{n^3}{2}
Main useSolving a single linear system efficientlyFinding matrix inverse and solving multiple RHS

Summary: Gauss elimination reduces the augmented matrix to upper-triangular form and then uses back substitution, whereas Gauss–Jordan continues the elimination to make the coefficient matrix the identity so the solution appears directly. Gauss–Jordan needs more arithmetic but is convenient for computing inverses.

linear-systemsgauss-jordan

Frequently asked questions

Where can I find the BSc CSIT (TU) Numerical Method (BSc CSIT, CSC207) question paper 2079?
The full BSc CSIT (TU) Numerical Method (BSc CSIT, CSC207) 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 Method (BSc CSIT, CSC207) 2079 paper come with solutions?
Yes. Every question on this Numerical Method (BSc CSIT, CSC207) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the BSc CSIT (TU) Numerical Method (BSc CSIT, CSC207) 2079 paper?
The BSc CSIT (TU) Numerical Method (BSc CSIT, CSC207) 2079 paper carries 60 full marks and is meant to be completed in 180 minutes, across 12 questions.
Is practising this Numerical Method (BSc CSIT, CSC207) past paper free?
Yes — reading and attempting this Numerical Method (BSc CSIT, CSC207) past paper on Kekkei is completely free.