Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

Explain the fourth-order Runge-Kutta method for solving ordinary differential equations. Solve dy/dx = x + y, y(0) = 1 to find y(0.2) taking h = 0.1.

Fourth-Order Runge-Kutta (RK4) Method

The RK4 method solves the initial value problem dydx=f(x,y), y(x0)=y0\dfrac{dy}{dx}=f(x,y),\ y(x_0)=y_0 by advancing the solution one step hh at a time using a weighted average of four slope estimates. It achieves accuracy equivalent to a 4th-order Taylor expansion without needing higher derivatives.

For each step from (xn,yn)(x_n, y_n):

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)y_{n+1} = y_n + \frac{1}{6}\left(k_1 + 2k_2 + 2k_3 + k_4\right)

Here k1k_1 is the slope at the start, k2,k3k_2,k_3 are slopes at the midpoint, and k4k_4 is the slope at the end of the interval. The local truncation error is O(h5)O(h^5) and the global error is O(h4)O(h^4).

Solving dydx=x+y, y(0)=1, h=0.1\dfrac{dy}{dx}=x+y,\ y(0)=1,\ h=0.1 for y(0.2)y(0.2)

Here f(x,y)=x+yf(x,y)=x+y.

Step 1: from x0=0, y0=1x_0=0,\ y_0=1 to x1=0.1x_1=0.1

k1=0.1(0+1)=0.100000k_1 = 0.1(0+1) = 0.100000 k2=0.1(0.05+1.05)=0.110000k_2 = 0.1(0.05 + 1.05) = 0.110000 k3=0.1(0.05+1.055)=0.110500k_3 = 0.1(0.05 + 1.055) = 0.110500 k4=0.1(0.1+1.1105)=0.121050k_4 = 0.1(0.1 + 1.1105) = 0.121050 y1=1+16(0.1+2(0.11)+2(0.1105)+0.12105)=1.110342y_1 = 1 + \tfrac{1}{6}(0.1 + 2(0.11) + 2(0.1105) + 0.12105) = 1.110342

Step 2: from x1=0.1, y1=1.110342x_1=0.1,\ y_1=1.110342 to x2=0.2x_2=0.2

k1=0.1(0.1+1.110342)=0.121034k_1 = 0.1(0.1 + 1.110342) = 0.121034 k2=0.1(0.15+1.170859)=0.132086k_2 = 0.1(0.15 + 1.170859) = 0.132086 k3=0.1(0.15+1.176385)=0.132638k_3 = 0.1(0.15 + 1.176385) = 0.132638 k4=0.1(0.2+1.242980)=0.144298k_4 = 0.1(0.2 + 1.242980) = 0.144298 y2=1.110342+16(0.121034+2(0.132086)+2(0.132638)+0.144298)y_2 = 1.110342 + \tfrac{1}{6}(0.121034 + 2(0.132086) + 2(0.132638) + 0.144298) y(0.2)1.2428\boxed{y(0.2) \approx 1.2428}

(The exact value y=2exx1y=2e^{x}-x-1 gives y(0.2)=1.242806y(0.2)=1.242806, confirming the result.)

oderunge-kutta
2long10 marks

Derive the Newton-Raphson method for solving a non-linear equation and discuss its convergence. Find a root of x^3 - 2x - 5 = 0 correct to four decimal places.

Derivation of the Newton-Raphson Method

To solve f(x)=0f(x)=0, expand ff in a Taylor series about an approximate root xnx_n and retain linear terms:

f(xn+1)f(xn)+(xn+1xn)f(xn)f(x_{n+1}) \approx f(x_n) + (x_{n+1}-x_n)\,f'(x_n)

Setting f(xn+1)=0f(x_{n+1})=0 and solving for xn+1x_{n+1} gives the iteration 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

Geometrically, the tangent to the curve at (xn,f(xn))(x_n, f(x_n)) is drawn, and its x-intercept becomes the next approximation.

Convergence

Newton-Raphson has quadratic convergence near a simple root: if εn\varepsilon_n is the error at step nn, then

εn+1f(ξ)2f(ξ)εn2\varepsilon_{n+1} \approx \frac{f''(\xi)}{2f'(\xi)}\,\varepsilon_n^{2}

so the number of correct digits roughly doubles each iteration. Limitations: it requires f(x)f'(x); it may diverge or oscillate if the initial guess is poor or f(xn)0f'(x_n)\approx 0; convergence drops to linear at a multiple root.

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

f(x)=3x22,xn+1=xnxn32xn53xn22f'(x) = 3x^2 - 2,\qquad x_{n+1} = x_n - \frac{x_n^3 - 2x_n - 5}{3x_n^2 - 2}

Since f(2)=1<0f(2)=-1<0 and f(3)=16>0f(3)=16>0, take x0=2x_0 = 2.

nnxnx_nf(xn)f(x_n)
02.000000-1.000000
12.1000000.061000
22.0945680.000186
32.0945510.000000

Successive values agree to four decimals:

x2.0946\boxed{x \approx 2.0946}
nonlinearnewton
3long10 marks

What is curve fitting? Explain the least squares method to fit a straight line y = a + bx to a given set of data points.

Curve Fitting

Curve fitting is the process of constructing a mathematical function (curve) that best approximates a given set of discrete data points (xi,yi), i=1,2,,n(x_i, y_i),\ i=1,2,\dots,n. Unlike interpolation, the fitted curve need not pass through every point; instead it captures the overall trend while minimizing the deviation from the data. It is used for prediction, smoothing noisy data, and modelling relationships.

Least Squares Method for a Straight Line y=a+bxy = a + bx

For each data point the residual (error) is ei=yi(a+bxi)e_i = y_i - (a + bx_i). The least squares principle chooses aa and bb that minimize the sum of squared residuals:

S=i=1n(yiabxi)2S = \sum_{i=1}^{n} \left(y_i - a - b x_i\right)^2

Setting the partial derivatives to zero:

Sa=2(yiabxi)=0\frac{\partial S}{\partial a} = -2\sum (y_i - a - bx_i) = 0 Sb=2xi(yiabxi)=0\frac{\partial S}{\partial b} = -2\sum x_i(y_i - a - bx_i) = 0

These give the normal equations:

yi=na+bxi\sum y_i = n a + b \sum x_i xiyi=axi+bxi2\sum x_i y_i = a \sum x_i + b \sum x_i^2

Solving simultaneously:

b=nxiyixiyinxi2(xi)2,a=yˉbxˉ=yibxinb = \frac{n\sum x_i y_i - \sum x_i \sum y_i}{n\sum x_i^2 - (\sum x_i)^2}, \qquad a = \bar{y} - b\bar{x} = \frac{\sum y_i - b\sum x_i}{n}

where xˉ,yˉ\bar{x},\bar{y} are the means. The required sums xi, yi, xiyi, xi2\sum x_i,\ \sum y_i,\ \sum x_i y_i,\ \sum x_i^2 are computed in a table; substituting them gives aa and bb, and hence the best-fit line y=a+bxy = a + bx.

regression
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Explain numerical differentiation using forward and backward difference formulae.

Numerical Differentiation Using Finite Differences

Given tabulated values yi=f(xi)y_i = f(x_i) at equally spaced points with step hh, derivatives are approximated by finite difference formulas obtained from Taylor expansions.

Forward difference (uses points ahead, best near the start of a table):

f(xi)yi+1yihf'(x_i) \approx \frac{y_{i+1} - y_i}{h}

Derived from f(xi+h)=f(xi)+hf(xi)+O(h2)f(x_i+h) = f(x_i) + h f'(x_i) + O(h^2). Truncation error is O(h)O(h).

Backward difference (uses points behind, best near the end of a table):

f(xi)yiyi1hf'(x_i) \approx \frac{y_i - y_{i-1}}{h}

Derived from f(xih)=f(xi)hf(xi)+O(h2)f(x_i-h) = f(x_i) - h f'(x_i) + O(h^2). Truncation error is also O(h)O(h).

Second derivative (central form, error O(h2)O(h^2)):

f(xi)yi+12yi+yi1h2f''(x_i) \approx \frac{y_{i+1} - 2y_i + y_{i-1}}{h^2}

Example: For y=x2y = x^2 tabulated at x=1,2,3x=1,2,3 giving y=1,4,9y=1,4,9 with h=1h=1, the forward difference at x=1x=1 is f(1)(41)/1=3f'(1)\approx(4-1)/1 = 3, and the backward difference at x=3x=3 is f(3)(94)/1=5f'(3)\approx(9-4)/1 = 5 (compare exact f(x)=2xf'(x)=2x giving 2 and 6 — accuracy improves as h0h\to0).

differentiation
5short5 marks

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

Euler's Method

Euler's method is the simplest numerical technique for the initial value problem dydx=f(x,y), y(x0)=y0\dfrac{dy}{dx}=f(x,y),\ y(x_0)=y_0. It approximates the solution curve by short straight-line segments, using the slope at the current point to step forward:

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

where hh is the step size. It is a first-order method with global error O(h)O(h), so accuracy improves as hh is reduced.

Example

Solve dydx=x+y, y(0)=1\dfrac{dy}{dx} = x + y,\ y(0)=1 for 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.22(x2=0.2)y_2 = 1.1 + 0.1(0.1 + 1.1) = 1.22 \quad (x_2 = 0.2)

So y(0.2)1.22y(0.2) \approx 1.22. (The exact value is 1.24281.2428; the gap reflects Euler's O(h)O(h) error, which a smaller hh would reduce.)

odeeuler
6short5 marks

Differentiate between the Gauss elimination and Gauss-Jordan methods.

Gauss Elimination vs Gauss-Jordan Method

Both are direct methods for solving a linear system AX=BAX = B by row operations, but they differ in how far the elimination is carried.

AspectGauss EliminationGauss-Jordan
Reduced formUpper triangular matrixDiagonal / identity matrix
EliminationOnly below the pivot (forward elimination)Both below and above the pivot
Final stepRequires back-substitution to get the solutionSolution read off directly (no back-substitution)
Arithmetic operationsAbout n33\frac{n^3}{3} — fewerAbout n32\frac{n^3}{2} — more
EfficiencyMore efficient for solving AX=BAX=BLess efficient, but convenient
Typical useSolving systemsComputing matrix inverse A1A^{-1}

Summary: Gauss elimination triangularizes the augmented matrix then back-substitutes, whereas Gauss-Jordan continues eliminating until the coefficient matrix becomes the identity, giving the solution directly. Gauss elimination needs fewer operations, while Gauss-Jordan is preferred for finding the inverse of a matrix.

linear-systemsgauss-jordan
7short5 marks

Explain Newton's divided difference interpolation formula.

Newton's Divided Difference Interpolation

For unequally spaced data points (x0,y0),(x1,y1),,(xn,yn)(x_0,y_0),(x_1,y_1),\dots,(x_n,y_n), Newton's divided difference formula constructs an interpolating polynomial.

Divided differences are defined recursively:

f[xi]=yif[x_i] = y_i f[xi,xi+1]=f[xi+1]f[xi]xi+1xif[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+kxif[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:

P(x)=f[x0]+(xx0)f[x0,x1]+(xx0)(xx1)f[x0,x1,x2]+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 +(xx0)(xx1)(xxn1)f[x0,x1,,xn]\cdots + (x-x_0)(x-x_1)\cdots(x-x_{n-1})\,f[x_0,x_1,\dots,x_n]

Advantages: It works for unequal spacing (unlike Newton's forward/backward formulas), and new data points can be added easily by appending one more term without recomputing existing coefficients. The leading coefficients are obtained from a divided-difference table.

interpolationdivided-difference
8short5 marks

Explain the power method for finding the largest eigenvalue of a matrix.

Power Method (Largest Eigenvalue)

The power method is an iterative technique to find the dominant eigenvalue (largest in magnitude) of a square matrix AA and its corresponding eigenvector. It assumes AA has a single dominant eigenvalue λ1>λ2|\lambda_1| > |\lambda_2| \ge \cdots.

Algorithm:

  1. Choose an arbitrary non-zero initial vector X0X_0 (e.g. [1,1,,1]T[1,1,\dots,1]^T).
  2. Compute Xk+1=AXkX_{k+1} = A X_k.
  3. Normalize by factoring out the largest-magnitude component: Xk+1=λ(k+1)Xˉk+1X_{k+1} = \lambda^{(k+1)} \bar{X}_{k+1}, where λ(k+1)\lambda^{(k+1)} is that largest component.
  4. Repeat until λ(k+1)\lambda^{(k+1)} and the vector Xˉk+1\bar{X}_{k+1} converge.

At convergence, λ(k+1)λ1\lambda^{(k+1)} \to \lambda_1 (largest eigenvalue) and Xˉ\bar{X} \to its eigenvector.

Why it works: Writing X0X_0 as a combination of eigenvectors X0=ciViX_0 = \sum c_i V_i, then AkX0=ciλikVi=λ1k(c1V1+i2ci(λi/λ1)kVi)A^k X_0 = \sum c_i \lambda_i^k V_i = \lambda_1^k\left(c_1 V_1 + \sum_{i\ge2} c_i (\lambda_i/\lambda_1)^k V_i\right). Since λi/λ1<1|\lambda_i/\lambda_1| < 1, all terms except V1V_1 vanish, so AkX0A^k X_0 aligns with V1V_1 and the scaling factor tends to λ1\lambda_1.

Convergence is linear, governed by the ratio λ2/λ1|\lambda_2/\lambda_1|; a small ratio gives fast convergence.

eigenvalue
9short5 marks

Fit a second-degree parabola y = a + bx + cx^2 to a set of data using the least squares principle.

Fitting a Second-Degree Parabola y=a+bx+cx2y = a + bx + cx^2

By the least squares principle, the constants a,b,ca,b,c minimize the sum of squared residuals:

S=i=1n(yiabxicxi2)2S = \sum_{i=1}^{n} \left(y_i - a - b x_i - c x_i^2\right)^2

Setting Sa=Sb=Sc=0\dfrac{\partial S}{\partial a}=\dfrac{\partial S}{\partial b}=\dfrac{\partial S}{\partial c}=0 gives the three normal equations:

y=na+bx+cx2\sum y = n a + b\sum x + c\sum x^2 xy=ax+bx2+cx3\sum xy = a\sum x + b\sum x^2 + c\sum x^3 x2y=ax2+bx3+cx4\sum x^2 y = a\sum x^2 + b\sum x^3 + c\sum x^4

Procedure:

  1. From the data, compute the column sums x, x2, x3, x4, y, xy, x2y\sum x,\ \sum x^2,\ \sum x^3,\ \sum x^4,\ \sum y,\ \sum xy,\ \sum x^2 y (and use nn = number of points) in a tabular form.
  2. Substitute these into the three normal equations.
  3. Solve the resulting 3×33\times3 linear system (e.g. by Gauss elimination) for a,b,ca,b,c.
  4. The best-fit parabola is y=a+bx+cx2y = a + bx + cx^2.

This least-squares parabola gives the curve of best fit minimizing the total squared vertical deviation from the data.

regression
10short5 marks

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

Absolute, Relative and Percentage Errors

If xx is the true value and x~\tilde{x} its approximation:

  • Absolute error: Ea=xx~E_a = |x - \tilde{x}| — the magnitude of the difference (same units as the quantity).
  • Relative error: Er=xx~xE_r = \dfrac{|x - \tilde{x}|}{|x|} — error relative to the true value (dimensionless); a better measure of accuracy than absolute error.
  • Percentage error: Ep=Er×100%=xx~x×100%E_p = E_r \times 100\%= \dfrac{|x - \tilde{x}|}{|x|}\times 100\%.

Sources of Errors in Numerical Computation

  1. Inherent (input/data) errors — errors already present in the input data due to measurement limitations or imprecise constants.
  2. Round-off errors — caused by representing numbers with a finite number of digits/bits in a computer (e.g. storing 1/31/3). They accumulate over many operations.
  3. Truncation errors — caused by approximating an infinite process by a finite one, e.g. cutting off a Taylor/infinite series after a few terms or using a finite step size hh.
  4. Modelling/formulation errors — from simplifying assumptions made when forming the mathematical model.
  5. Human/blunder errors — mistakes in problem setup, programming, or data entry.

Total error is essentially the combination of round-off and truncation errors, and good numerical methods aim to keep both small.

errors
11short5 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 using two previous approximations xn1x_{n-1} and xnx_n. The function is approximated by the straight line (secant) through (xn1,f(xn1))(x_{n-1}, f(x_{n-1})) and (xn,f(xn))(x_n, f(x_n)), and the next estimate is its x-intercept:

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

It is essentially Newton-Raphson with the derivative f(xn)f'(x_n) replaced by the difference quotient f(xn)f(xn1)xnxn1\dfrac{f(x_n)-f(x_{n-1})}{x_n - x_{n-1}}. It needs two starting values but, unlike false position, does not require them to bracket the root.

Comparison with Newton-Raphson

AspectSecantNewton-Raphson
Derivative f(x)f'(x)Not requiredRequired
Starting valuesTwo (x0,x1x_0, x_1)One (x0x_0)
Function evaluations/stepOne new ff evaluationTwo (ff and ff')
Order of convergence1.618\approx 1.618 (superlinear)22 (quadratic)
Cost per stepCheaperMore expensive

Conclusion: Newton-Raphson converges faster (quadratically) but needs the derivative; the secant method converges a little slower yet avoids derivative evaluation, making it useful when f(x)f'(x) is hard or expensive to compute.

nonlinearsecant
12short5 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 find a root of f(x)=0f(x)=0. Starting with two points aa and bb such that f(a)f(b)<0f(a)\,f(b) < 0 (so a root lies between them, by the intermediate value theorem), it approximates the root by the x-intercept of the straight line (chord) joining (a,f(a))(a, f(a)) and (b,f(b))(b, f(b)):

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

Iteration steps:

  1. Compute xx from the formula above.
  2. Evaluate f(x)f(x). If f(x)=0f(x)=0 (or f(x)<ε|f(x)|<\varepsilon), xx is the root.
  3. Otherwise, retain the bracket: if f(a)f(x)<0f(a)\,f(x)<0 replace bb by xx; else replace aa by xx.
  4. Repeat until the root is found to the desired accuracy.

Geometric Interpretation

The curve y=f(x)y=f(x) crosses the x-axis between aa and bb. A straight chord is drawn joining the points (a,f(a))(a,f(a)) (above the axis) and (b,f(b))(b,f(b)) (below the axis). The point where this chord cuts the x-axis is taken as the new approximation xx to the root. The interval is then narrowed to the sub-interval that still brackets the root, and a new chord is drawn — successive chords converge onto the true root.

The method always converges (since the root stays bracketed) but only linearly, and can be one-sided (slow) if the curve is strongly concave/convex on the interval.

nonlinearfalse-position

Frequently asked questions

Where can I find the BSc CSIT (TU) Numerical Method (BSc CSIT, CSC207) question paper 2077?
The full BSc CSIT (TU) Numerical Method (BSc CSIT, CSC207) 2077 (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) 2077 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) 2077 paper?
The BSc CSIT (TU) Numerical Method (BSc CSIT, CSC207) 2077 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.