BIT203 · TU past paper
Numerical Methods 2078 question paper
The complete TU 2078 exam paper for Numerical Methods (BIT203), all 12 questions with solved model answers written to the mark scheme.
Tap a question to open its answer.
- Q1.10 marksNumericalSimpson's 3/8 rule and composite Simpson'sHideAnswer
Derive the formula for integration using simpsons 3/8 rule. Use Secant Method to estimate the root of equation with initial estimate x₁ = 4 and x₂ = 2, $x^2 - 4x - 10 = 0$. [10]
- Q2.10 marksNumericalShooting method for boundary value problemHideAnswer
What do you mean by boundary value problem? Use shootuing method, solve the equation: y'' = 6x², with y(0) = 1 and y(1) = 2 in the interval (0, 1) for y(0.5) taking h = 0.5[10]
Boundary Value Problem and Shooting Method
Given
- ODE: $y'' = 6x^2$
- Boundary conditions: $y(0) = 1$, $y(1) = 2$
- Interval: $(0, 1)$
- Step size: $h = 0.5$
- Required: $y(0.5)$
Boundary Value Problem (Definition)
A boundary value problem (BVP) is a differential equation together with conditions specified at two or more different points (the boundaries of the domain), rather than all at a single point.
General second order form: $$y'' = f(x, y, y'), \quad a \le x \le b, \quad y(a) = \alpha, \ \ y(b) = \beta$$
Shooting Method (Idea)
The shooting method converts a BVP into an initial value problem (IVP) by guessing the unknown initial slope $y'(0) = t$, integrating forward, and adjusting $t$ until the far boundary condition $y(b) = \beta$ is met. Since this ODE is linear, only two trial slopes (or the decomposition method) are needed, and the correct $t$ follows by linear interpolation.
Solution
Reduce to a first-order system with $y_1 = y$, $y_2 = y'$: $$y_1' = y_2, \qquad y_2' = 6x^2$$ with $y_1(0) = 1$, $y_2(0) = t$ (unknown).
Use Euler's method, $h = 0.5$, two steps ($x = 0, 0.5, 1.0$).
Trial 1: guess $t = t_1 = 0$
$x$ $y_1$ $y_2$ $y_2'=6x^2$ 0.0 1.0000 0.0000 0.0 0.5 $1+0.5(0)=1.0000$ $0+0.5(0)=0.0000$ $6(0.25)=1.5$ 1.0 $1+0.5(0)=1.0000$ $0+0.5(1.5)=0.75$ -- So with $t_1 = 0$: $y(1) = 1.0000 \equiv \beta_1$
Trial 2: guess $t = t_2 = 1$
$x$ $y_1$ $y_2$ $y_2'=6x^2$ 0.0 1.0000 1.0000 0.0 0.5 $1+0.5(1)=1.5000$ $1+0.5(0)=1.0000$ $1.5$ 1.0 $1.5+0.5(1)=2.0000$ $1+0.5(1.5)=1.75$ -- So with $t_2 = 1$: $y(1) = 2.0000 \equiv \beta_2$
Linear interpolation for correct slope
Target $\beta = 2$. Since the ODE is linear: $$t = t_1 + (t_2 - t_1)\cdot \frac{\beta - \beta_1}{\beta_2 - \beta_1} = 0 + (1-0)\cdot\frac{2 - 1}{2 - 1} = 1$$
Thus the correct slope is $t = 1$, and Trial 2 is exactly the required solution.
Read off $y(0.5)$
From Trial 2 at $x = 0.5$: $$\boxed{y(0.5) = 1.5000}$$
Verification with Exact Solution
Integrating twice: $$y' = 2x^3 + C_1, \qquad y = \frac{x^4}{2} + C_1 x + C_2$$
Apply $y(0)=1 \Rightarrow C_2 = 1$. Apply $y(1)=2 \Rightarrow \tfrac12 + C_1 + 1 = 2 \Rightarrow C_1 = \tfrac12$.
$$y = \frac{x^4}{2} + \frac{x}{2} + 1$$
Exact value: $$y(0.5) = \frac{(0.5)^4}{2} + \frac{0.5}{2} + 1 = \frac{0.0625}{2} + 0.25 + 1 = 0.03125 + 1.25 = 1.28125$$
Note: The Euler shooting result $y(0.5) = 1.5$ differs from the exact $1.28125$. This gap is due to the very large step size $h = 0.5$ used by Euler's method (only two steps). Euler's method reproduces the correct boundary values $y(0)=1$ and $y(1)=2$ exactly because the slope-parameter interpolation is exact for the linear problem, but the intermediate point $y(0.5)$ carries the local truncation error of Euler's scheme. The method-consistent answer requested by the problem (using shooting with $h=0.5$) is:
$$y(0.5) \approx 1.5$$
while the true analytic value is $1.28125$.
- Q3.10 marksLagrange interpolation formula and algoritHideAnswer
Write an algorithm and program to compute the interpolation using Lagrange Interpolation.[10]
- Q4.5 marksNewton Raphson method formula and convergeHideAnswer
Show that the rate of convergence of Newtons Raphson method is quadratic. [5]
- Q5.5 marksNumericalExponential curve fittingHideAnswer
The temperature of a metal strip was measured at various time intervals during heating and the values are given in the table below. If the relation between the time 't' and temperature 'T' is of the form: $T = be^{t/4} + a$. Estimate the temperature at t = 6 minute.
Time ('t' min) 1 2 3 4 Temp ('T' °C) 70 83 100 124 [5]
- Q6.5 marksNumericalNewton's divided difference methodHideAnswer
Given the following set of data points. Obtain the table of divided difference and use that table to estimate the value of $f(1.5)$.
$$\begin{array}{|c|c|c|c|c|c|}\hline x & 1 & 2 & 3 & 4 & 5 \ \hline f(x)=x^3-1 & 0 & 7 & 26 & 63 & 124 \ \hline \end{array}$$
[5]
- Q7.5 marksNumericalGaussian elimination with partial pivotingHideAnswer
Solve the following system of linear equation by Gauss Elimination with Pivoting $2x + 2y + z = 6$, $4x + 2y + 3z = 4$, $x - y + 1 = 0$. [5]
- Q8.5 marksNumericalComputing eigenvalues and eigenvectorsHideAnswer
Determine the Eigen Values and corresponding Eigen Vectors for the matrix.
$$A = \begin{bmatrix} 1 & 6 & 1 \ 1 & 2 & 0 \ 0 & 0 & 3 \end{bmatrix}$$
[5]
- Q9.5 marksNumericalDivided difference table for derivativesHideAnswer
The table below gives the values of distance travelled by a car at various time intervals during the initial running. Estimate the velocity and acceleration at time t = 7 sec.
$$\begin{array}{|c|c|c|c|c|c|}\hline \text{Time (t sec)} & 5 & 6 & 7 & 8 & 9 \ \hline \text{Distance (s m)} & 10.0 & 14.5 & 19.5 & 25.5 & 32.0 \ \hline \end{array}$$
[5]
- Q10.5 marksNumericalTrapezoidal rule and composite trapezoidalHideAnswer
Solve the following integral using trapezoidal rule form = 8, $l=\int_{2}^{4} (x^4 + 1)dx$. [5]
- Q11.5 marksNumericalEuler's method for ODE solvingHideAnswer
Given the equation y′=3x2+1y' = 3x^2 + 1y′=3x2+1 with y(1) = 2, estimate y(2) by Euler's Method using h = 0.2. [5]
- Q12.5 marksNumericalPoisson's equation and finite difference mHideAnswer
Solve the Poisson's Equation $\nabla^2 f = 2x^2 y^2$ over the square domain $0 \leq x \leq 3$ and $0 \leq y \leq 3$ with $f = 0$ on the boundary and $h = 1$. [5]
Solving Poisson's Equation by Finite Difference Method
Given
- PDE: $\nabla^2 f = f_{xx} + f_{yy} = 2x^2y^2$
- Domain: $0 \le x \le 3$, $0 \le y \le 3$ (square)
- Boundary condition: $f = 0$ on all boundaries
- Step size: $h = 1$
With $h=1$ over $[0,3]$, interior nodes are at $x=1,2$ and $y=1,2$ (four interior points).
Solution
Five-point formula: $$f_{i+1,j}+f_{i-1,j}+f_{i,j+1}+f_{i,j-1}-4f_{i,j}=h^2 g(x_i,y_j)=2x_i^2 y_j^2$$
Interior points and RHS $=2x^2y^2$:
Label $(x,y)$ RHS $f_1$ $(1,1)$ $2$ $f_2$ $(2,1)$ $8$ $f_3$ $(1,2)$ $8$ $f_4$ $(2,2)$ $32$ Equations (boundaries = 0):
$(1,1):; -4f_1+f_2+f_3=2$ ...(1)
$(2,1):; f_1-4f_2+f_4=8$ ...(2)
$(1,2):; f_1-4f_3+f_4=8$ ...(3)
$(2,2):; f_2+f_3-4f_4=32$ ...(4)
Symmetry: (2) and (3) give $f_2=f_3$.
From (1): $-4f_1+2f_2=2 \Rightarrow f_1=\dfrac{2f_2-2}{4}=\dfrac{f_2-1}{2}$ ...(5)
From (4): $2f_2-4f_4=32 \Rightarrow f_4=\dfrac{2f_2-32}{4}=\dfrac{f_2-16}{2}$ ...(6)
Substitute into (2): $f_1-4f_2+f_4=8$
$$\frac{f_2-1}{2}-4f_2+\frac{f_2-16}{2}=8$$
$$\frac{(f_2-1)+(f_2-16)}{2}-4f_2=8$$
$$\frac{2f_2-17}{2}-4f_2=8$$
$$f_2-8.5-4f_2=8$$
$$-3f_2=16.5 \Rightarrow f_2=-5.5$$
Back-substitute:
$$f_3=f_2=-5.5$$
$$f_1=\frac{f_2-1}{2}=\frac{-5.5-1}{2}=\frac{-6.5}{2}=-3.25$$
$$f_4=\frac{f_2-16}{2}=\frac{-5.5-16}{2}=\frac{-21.5}{2}=-10.75$$
Verification with (1): $-4(-3.25)+(-5.5)+(-5.5)=13-11=2$ ✓ With (4): $-5.5-5.5-4(-10.75)=-11+43=32$ ✓
Final Result
$$\boxed{f_1=f(1,1)=-3.25,\quad f_2=f(2,1)=-5.5,\quad f_3=f(1,2)=-5.5,\quad f_4=f(2,2)=-10.75}$$