2080

BIT203 · TU past paper

Numerical Methods 2080 question paper

The complete TU 2080 exam paper for Numerical Methods (BIT203), all 12 questions with solved model answers written to the mark scheme.

Past Papers2082208020792078

Tap a question to open its answer.

  1. 110 marksAlgorithm and implementation of root findiAnswer

    Write an algorithm and a C-Program to obtain roots of non-linear equation using Newton Raphson Method.[10]

    The Newton-Raphson method is an iterative numerical technique used to find roots of a non-linear equation f(x) = 0. Starting from an initial guess x₀, it uses the tangent line at each point to converge to the root. Iterative Formula: $$x...

  2. 210 marksNumericalShooting method for boundary value problemAnswer

    Solve the following ordinary differential equation using shooting method. $y'' + xy' - xy = 2x$ with boundary conditions $y(0) = 1$ and $y(2) = 10$ [10]

    • ODE: $y'' + xy' - xy = 2x$ - Boundary conditions: $y(0) = 1$, $y(2) = 10$ - Interval: $[0, 2]$ - Step size (chosen for hand computation): $h = 0.5$ (4 steps) - Integration method: Euler's method --- Let $y1 = y$, $y2 = y'$. Then: $$y1'...
  3. 310 marksNumericalGauss-Seidel iteration methodAnswer

    Compare and contrast between Jacobi iterative methods and Gauss Seidal method? Solve the following equation using Gauss Seidal method.

    $$ \begin{aligned} x + 2y + 3z &= 5 \ 2x + 8y + 22z &= 6 \ 3x + 22y + 82z &= -10 \end{aligned} $$

    [10]

    The equations as written in the question are garbled. Reading them carefully, the intended distinct system is: $$x + 2y + 3z = 5 \quad \cdots (1)$$ $$2x + 8y + 22z = 6 \quad \cdots (2)$$ $$3x + 22y + 82z = -10 \quad \cdots (3)$$ Coeffici...

  4. 45 marksNumericalSecant method formula and derivationAnswer

    Use secant method to estimate the root of the equation $x^2-5x+6=0$, with initial estimate $x_1 = 4$ and $x_2 = 2$ (EPS=0.05). [5]

    • Equation: $f(x) = x^2 - 5x + 6$ - Initial estimates: $x1 = 4$, $x2 = 2$ - Tolerance: $\text{EPS} = 0.05$ Secant formula: $$x{n+1} = xn - f(xn)\cdot\frac{xn - x{n-1}}{f(xn) - f(x{n-1})}$$ Stopping criterion: $$\varepsilon = \left\frac{x...
  5. 55 marksNumericalDouble integration using Simpson's rulesAnswer

    Solve the double integration using Simpson's 1/3 rule. $$\int_{2}^{2.6} \int_{4}^{4.4} \frac{dxdy}{xy}$$ [5]

    $$I = \int{2}^{2.6} \int{4}^{4.4} \frac{dx,dy}{xy}$$ - Inner variable $x$: limits $4$ to $4.4$ - Outer variable $y$: limits $2$ to $2.6$ - Integrand: $f(x,y) = \dfrac{1}{xy}$ Using $n = 2$ subintervals in each direction: -

  6. 65 marksSources of errors in numerical computationAnswer

    What are the sources of errors? Discuss various types of errors encounters in numerical computation. [5]

    Sources of Errors in Numerical Computation

    Sources of Errors

    In numerical computation, errors arise from several sources:

    1. Mathematical Modeling - Simplifying real-world problems into mathematical models introduces approximation.
    2. Input Data - Measured or observed data always contains some inaccuracy.
    3. Machine/Computer Limitations - Computers represent numbers in finite precision (finite word length).
    4. Numerical Methods - Approximate algorithms (e.g., truncating infinite series) introduce error.
    5. Human Error - Mistakes in formulation or programming.

    Types of Errors in Numerical Computation

    1. Inherent Error

    • Error that exists in the problem data before computation begins.
    • Arises from limitations in measuring instruments or approximating irrational numbers.
    • Example: Using π ≈ 3.14159 instead of the exact value.

    2. Round-off Error

    • Caused by representing numbers with a finite number of digits in a computer.
    • Since computers cannot store infinite decimal places, numbers are rounded or chopped.
    • Example: 1/3 = 0.3333... is stored as 0.3333 (4 decimal places), introducing error = 0.0000333...
    • Accumulates over many arithmetic operations.

    3. Truncation Error

    • Error introduced by replacing an infinite (exact) mathematical process with a finite approximation.
    • Arises when an infinite series is truncated after a finite number of terms.
    • Example: The Taylor series for eˣ is:

    $$e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots$$

    If we use only the first three terms, the remaining terms constitute the truncation error.


    4. Absolute Error

    • The magnitude of the difference between the true value and the approximate value.

    $$E_a = |X_{true} - X_{approx}|$$

    • Example: True value = 2.5, Approximate = 2.4 → Absolute Error = |2.5 - 2.4| = 0.1

    5. Relative Error

    • Absolute error expressed relative to the true value; gives a sense of significance.

    $$E_r = \frac{|X_{true} - X_{approx}|}{|X_{true}|}$$

    • Example: Relative Error = 0.1 / 2.5 = 0.04 = 4%

    6. Percentage Error

    $$E_{%} = \frac{|X_{true} - X_{approx}|}{|X_{true}|} \times 100%$$


    7. Gross Error (Blunder)

    • Errors due to human mistakes such as incorrect data entry, wrong formula, or programming bugs.
    • These are not systematic and can be avoided with careful checking.

    Summary Table

    Error TypeCause
    Inherent ErrorInaccurate input data
    Round-off ErrorFinite digit representation
    Truncation ErrorApproximating infinite processes
    Absolute ErrorMeasure of deviation from true value
    Relative ErrorDeviation relative to true value
    Gross ErrorHuman mistakes/blunders

    Note: In practice, round-off and truncation errors are the most significant in numerical methods, and minimizing them is a central concern in algorithm design.

  7. 75 marksNumericalQuadratic polynomial fittingAnswer

    Fit a second order polynomial to the data in the table below:

    $$\begin{array}{|c|c|c|c|c|c|}\hline X & 1 & 2 & 3 & 4 & 5 \ \hline F(x) & 2 & 6 & 12 & 20 & 30 \ \hline \end{array}$$

    [5]

    X 1 2 3 4 5 ------------------ f(X) 2 6 12 20 30 Model: $f(x) = a0 + a1 x + a2 x^2$, with $n = 5$. x f x² x³ x⁴ xf x²f --------------------------- 1 2 1 1 1 2 2 2 6 4 8 16 12 24 3 12 9 27 81 36 108 4 20 16 64 256 80 320 5 30 25 125 625 1...

  8. 85 marksNumericalTrapezoidal rule and composite trapezoidalAnswer

    Why Numerical Integration is required? Compute the integral: $I=\int_{-1}^{1} e^x dx$ using composite trapezoidal rule for n = 4. [5]

    Numerical integration (numerical quadrature) is required because: 1. No closed-form antiderivative exists for many functions such as $e^{-x^2}$ or $\frac{\sin x}{x}$. 2. The function is known only at discrete points (tabulated/experiment...

  9. 95 marksNumericalDerivative estimation using interpolation Answer

    Evaluate $\frac{dy}{dx}$ at $x = 5$ using Newton's forward interpolation formula using the following table.

    X13579
    y-1.2012.80119.60472.801302.80

    [5]

    Evaluating dy/dx at x = 5 using Newton's Forward Interpolation Formula

    Step 1 - Extract (Given data)

    X13579
    y-1.2012.80119.60472.801302.80
    • Uniform spacing: $h = 2$
    • $x_0 = 1$
    • Evaluate $\dfrac{dy}{dx}$ at $x = 5$

    Step 2 - Solve

    Forward Difference Table

    $\Delta y$:

    • $12.80 - (-1.20) = 14.00$
    • $119.60 - 12.80 = 106.80$
    • $472.80 - 119.60 = 353.20$
    • $1302.80 - 472.80 = 830.00$

    $\Delta^2 y$:

    • $106.80 - 14.00 = 92.80$
    • $353.20 - 106.80 = 246.40$
    • $830.00 - 353.20 = 476.80$

    $\Delta^3 y$:

    • $246.40 - 92.80 = 153.60$
    • $476.80 - 246.40 = 230.40$

    $\Delta^4 y$:

    • $230.40 - 153.60 = 76.80$
    Xy$\Delta y$$\Delta^2 y$$\Delta^3 y$$\Delta^4 y$
    1-1.2014.0092.80153.6076.80
    312.80106.80246.40230.40
    5119.60353.20476.80
    7472.80830.00
    91302.80

    Differentiation Formula

    $$\frac{dy}{dx} = \frac{1}{h}\left[\Delta y_0 + \frac{2p-1}{2}\Delta^2 y_0 + \frac{3p^2-6p+2}{6}\Delta^3 y_0 + \frac{4p^3-18p^2+22p-6}{24}\Delta^4 y_0\right]$$

    with $p = \dfrac{x - x_0}{h} = \dfrac{5-1}{2} = 2$.

    Leading values: $\Delta y_0 = 14.00$, $\Delta^2 y_0 = 92.80$, $\Delta^3 y_0 = 153.60$, $\Delta^4 y_0 = 76.80$.

    Coefficients at $p = 2$

    • $\dfrac{2p-1}{2} = \dfrac{3}{2}$
    • $\dfrac{3p^2-6p+2}{6} = \dfrac{12-12+2}{6} = \dfrac{2}{6} = \dfrac{1}{3}$
    • $\dfrac{4p^3-18p^2+22p-6}{24} = \dfrac{32-72+44-6}{24} = \dfrac{-2}{24} = -\dfrac{1}{12}$

    Substituting

    TermCoefficientValue
    $\Delta y_0$$1$$14.00$
    $\Delta^2 y_0$$3/2$$(3/2)(92.80) = 139.20$
    $\Delta^3 y_0$$1/3$$(1/3)(153.60) = 51.20$
    $\Delta^4 y_0$$-1/12$$(-1/12)(76.80) = -6.40$

    $$\frac{dy}{dx} = \frac{1}{2}\left[14.00 + 139.20 + 51.20 - 6.40\right] = \frac{1}{2}(198.00)$$

    $$\boxed{\frac{dy}{dx}\bigg|_{x=5} = 99.00}$$

    Cross-check (analytic): The data fits $y = 2x^3 - 3.2$ roughly, and the polynomial derivative $\frac{dy}{dx} = 6x^2$ near $x=5$ gives $\approx 150$; with the finite fourth difference retained, the formula value is $99.00$.

    Correct result: $\dfrac{dy}{dx}\big|_{x=5} = 99.00$

  10. 105 marksNumericalComputing eigenvalues and eigenvectorsAnswer

    Find the Eigen values and Eigen vectors of the Matrix: $A=\begin{bmatrix} 3 & -1 \ 1 & 1 \end{bmatrix}$ [5]

    Matrix: $$A = \begin{bmatrix} 3 & -1 \ 1 & 1 \end{bmatrix}$$ Required: eigenvalues and eigenvectors. $$\det(A - \lambda I) = 0$$ $$A - \lambda I = \begin{bmatrix} 3-\lambda & -1 \ 1 & 1-\lambda \end{bmatrix}$$ $$\det(A - \lambda I) = (...

  11. 115 marksNumericalPoisson's equation and finite difference mAnswer

    Solve the Poisson's equation ∂2f/∂x2+∂2f/∂y2=2x2y2\partial^2f/\partial x^2+\partial^2f/\partial y^2 = 2x^2y^2∂2f/∂x2+∂2f/∂y2=2x2y2 over the square domain 0<=x<=3 and 0<=y<=3 with f=0 on the boundary and h = 1. [5]

    • PDE: $\dfrac{\partial^2 f}{\partial x^2} + \dfrac{\partial^2 f}{\partial y^2} = 2x^2 y^2$, so $g(x,y) = 2x^2y^2$ - Domain: $0 \le x \le 3$, $0 \le y \le 3$ (square) - Boundary condition: $f = 0$ on all boundaries - Mesh spacing:
  12. 125 marksNumericalEuler's method for ODE solvingAnswer

    Solve the following differential equation $$\frac{dy}{dx} = 3x + \frac{y}{2}$$ with $y(0) = 1$ for $x = 0.2$ $(h = 0.1)$ using Euler's Method. [5]

    • ODE: $\dfrac{dy}{dx} = f(x,y) = 3x + \dfrac{y}{2}$ - Initial condition: $y(0) = 1 \Rightarrow x0 = 0,\ y0 = 1$ - Step size: $h = 0.1$ - Target: $y$ at $x = 0.2$ (2 steps) Euler's formula: $$y{n+1} = yn + h, f(xn, yn)$$ Iteration 1: