Skip to main content

Chapter 1

Numerical Methods

PU BCA past exam questions

Past questions and answers

44 questions set from this chapter. Most repeated first.

  • 2024 Spring · 7 marks

Fit the following set of a data to a curve in the form of y=abxy = ab^x. Also calculate y(7)y(7). (x and y values given in the paper: y = 16, 17.1, 8.7, 4.7, 2.6.)

Similar questions: Fit y = a e^{bx} (2023 Spring)

Answer

Taking x=1,2,3,4,5x=1,2,3,4,5 with y=16, 17.1, 8.7, 4.7, 2.6y=16,\,17.1,\,8.7,\,4.7,\,2.6.

Linearise. From y=abxy=ab^x: log⁡y=log⁡a+xlog⁡b\log y=\log a+x\log b, i.e. Y=A+BxY=A+Bx with Y=log⁡10yY=\log_{10}y, A=log⁡aA=\log a, B=log⁡bB=\log b.

xxyyY=log⁡yY=\log yx2x^2xYxY
1161.204111.2041
217.11.233042.4660
38.70.939592.8185
44.70.6721162.6884
52.60.4150252.0749
Sum 154.46375511.2519

Normal equations: 4.4637=5A+15B4.4637=5A+15B and 11.2519=15A+55B11.2519=15A+55B.

B=5(11.2519)−15(4.4637)5(55)−152=−0.2139,A=4.4637+15(0.2139)5=1.5345B=\frac{5(11.2519)-15(4.4637)}{5(55)-15^2}=-0.2139,\qquad A=\frac{4.4637+15(0.2139)}{5}=1.5345

a=101.5345=34.24,b=10−0.2139=0.611a=10^{1.5345}=34.24,\qquad b=10^{-0.2139}=0.611

Fitted curve: y=34.24 (0.611)xy=34.24\,(0.611)^x.

At x=7x=7: y=34.24(0.611)7=34.24×0.0318≈1.09y=34.24(0.611)^7=34.24\times0.0318\approx1.09.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 8 marks

Fit a power curve of the form y=aebxy = ae^{bx} to the following data (x and y values given in the paper: y = 10.5, 2.15, 3.85, 8.30).

Similar questions: Fit y = a b^x, estimate y(7) (2024 Spring)

Answer

Taking x=1,2,3,4x=1,2,3,4 with y=10.5, 2.15, 3.85, 8.30y=10.5,\,2.15,\,3.85,\,8.30.

Linearise. y=aebx⇒ln⁡y=ln⁡a+bxy=ae^{bx}\Rightarrow\ln y=\ln a+bx, i.e. Y=A+bxY=A+bx with Y=ln⁡yY=\ln y, A=ln⁡aA=\ln a.

xxyyY=ln⁡yY=\ln yx2x^2xYxY
110.52.351412.3514
22.150.765541.5310
33.851.348194.0443
48.302.1163168.4650
Sum 106.58133016.3917

Normal equations: 6.5813=4A+10b6.5813=4A+10b and 16.3917=10A+30b16.3917=10A+30b.

b=4(16.3917)−10(6.5813)4(30)−102=−0.246220≈−0.0123b=\frac{4(16.3917)-10(6.5813)}{4(30)-10^2}=\frac{-0.2462}{20}\approx-0.0123

A=6.5813+10(0.0123)4=1.6761,a=e1.6761≈5.34A=\frac{6.5813+10(0.0123)}{4}=1.6761,\qquad a=e^{1.6761}\approx5.34

Fitted curve: y≈5.34 e−0.0123xy\approx5.34\,e^{-0.0123x}.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

Derive the formula for Newton-Raphson method. Use the method to find the root of f(x)=x3−4x−9=0f(x) = x^3 - 4x - 9 = 0 starting at x0=2.5x_0 = 2.5. Perform four iterations.

Answer

Derivation. Let xnx_n be an approximation to a root of f(x)=0f(x)=0. Expanding ff about xnx_n by Taylor's series and keeping the first two terms:

f(xn+h)≈f(xn)+hf′(xn)f(x_n+h)\approx f(x_n)+h f'(x_n)

We want f(xn+h)=0f(x_n+h)=0, so h=−f(xn)f′(xn)h=-\dfrac{f(x_n)}{f'(x_n)}. The improved root is xn+1=xn+hx_{n+1}=x_n+h:

xn+1=xn−f(xn)f′(xn),f′(xn)≠0x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)},\qquad f'(x_n)\neq 0

Geometrically, xn+1x_{n+1} is where the tangent to y=f(x)y=f(x) at (xn,f(xn))(x_n,f(x_n)) cuts the xx-axis. The method converges quadratically near a simple root.

Numerical work. f(x)=x3−4x−9f(x)=x^3-4x-9, f′(x)=3x2−4f'(x)=3x^2-4, x0=2.5x_0=2.5.

nnxnx_nf(xn)f(x_n)f′(xn)f'(x_n)xn+1x_{n+1}
02.500000-3.37500014.7500002.728814
12.7288140.40464718.3392702.706749
22.7067490.00397517.9794712.706528
32.7065280.00000017.9758812.706528

After four iterations the root is x≈2.7065x\approx 2.7065.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

Use False position method to locate the root of f(x)=x3−x−1=0f(x) = x^3 - x - 1 = 0 between x=1x = 1 and x=2x = 2 up to 6 iterations.

Answer

Method. For f(x)=x3−x−1f(x)=x^3-x-1, f(1)=−1<0f(1)=-1<0 and f(2)=5>0f(2)=5>0, so a root lies in (1,2)(1,2). The false position (regula falsi) formula is

c=af(b)−bf(a)f(b)−f(a)c=\frac{a f(b)-b f(a)}{f(b)-f(a)}

The interval is then replaced by [c,b][c,b] if f(c)<0f(c)<0 (otherwise [a,c][a,c]).

Iteraabbccf(c)f(c)
11.00000021.166667-0.578704
21.16666721.253112-0.285363
31.25311221.293437-0.129542
41.29343721.311281-0.056588
51.31128121.318989-0.024304
61.31898921.322283-0.010362

After 6 iterations the root is x≈1.3223x\approx 1.3223 (the true root is 1.32471.3247). Since f(c)<0f(c)<0 every time, b=2b=2 stays fixed and the convergence is linear.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

Find a root of x2−5x+6=0x^2 - 5x + 6 = 0 using the fixed point iteration method.

Answer

Method. Rewrite f(x)=0f(x)=0 as x=g(x)x=g(x) and iterate xn+1=g(xn)x_{n+1}=g(x_n). The iteration converges to a root near which ∣g′(x)∣<1|g'(x)|<1.

Write x2−5x+6=0x^2-5x+6=0 as

x=g(x)=x2+65,g′(x)=2x5x=g(x)=\frac{x^2+6}{5},\qquad g'(x)=\frac{2x}{5}

For x<2.5x<2.5 we have ∣g′(x)∣<1|g'(x)|<1, so the iteration converges to the root x=2x=2 (the other root x=3x=3 has g′(3)=1.2>1g'(3)=1.2>1 and is not reached by this form).

Take x0=1x_0=1:

nnxnx_n
11.40000
21.59200
31.70689
41.78270
51.83560
61.87389
81.92374
121.97045

The values approach x=2x=2 steadily (linear convergence, ratio about g′(2)=0.8g'(2)=0.8). Hence a root is x=2x=2; check: 22−5(2)+6=02^2-5(2)+6=0.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

Find the polynomial from given data (table of x and f(x) given in the paper) also calculate f(x)f(x) at x=3.45x = 3.45 using Newton's divided difference method.

Answer

Taking the tabulated data as f(x)=log⁡10xf(x)=\log_{10}x at x=3, 3.2, 3.4, 3.6x=3,\,3.2,\,3.4,\,3.6 with f=0.4771, 0.5051, 0.5315, 0.5563f=0.4771,\,0.5051,\,0.5315,\,0.5563.

Divided difference table

xxf(x)f(x)1st2nd3rd
3.00.4771
0.1400
3.20.5051-0.0200
0.13200.0000
3.40.5315-0.0200
0.1240
3.60.5563

Newton's divided difference polynomial

f(x)=f(x0)+(x−x0)f[x0,x1]+(x−x0)(x−x1)f[x0,x1,x2]+…f(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]+\dots

f(x)=0.4771+0.14(x−3)−0.02(x−3)(x−3.2)f(x)=0.4771+0.14(x-3)-0.02(x-3)(x-3.2)

The third difference is zero, so the polynomial is quadratic. Expanded:

f(x)=−0.02x2+0.264x−0.1349f(x)=-0.02x^2+0.264x-0.1349

At x=3.45x=3.45:

f(3.45)=0.4771+0.14(0.45)−0.02(0.45)(0.25)=0.4771+0.0630−0.00225=0.53785f(3.45)=0.4771+0.14(0.45)-0.02(0.45)(0.25)=0.4771+0.0630-0.00225=0.53785

So f(3.45)≈0.5379f(3.45)\approx 0.5379.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

The temperature of metal stripe was measured at various time interval at heating and the values are tabulated in the paper (Time t in min; Temp T in ∘^\circC: 70, 83, 100, 124). If the relationship between temperature T and time t is of the form T=aet/2+bT = ae^{t/2} + b, estimate the temperature at t=1.5t = 1.5 and 3.53.5 minute.

Answer

Taking the data as t=1,2,3,4t=1,2,3,4 min and T=70,83,100,124 ∘T=70,83,100,124\,^\circC.

Linearising. Put u=et/2u=e^{t/2}. Then T=au+bT=au+b is a straight line in uu, and the normal equations are

∑T=a∑u+nb,∑uT=a∑u2+b∑u\sum T=a\sum u+nb,\qquad \sum uT=a\sum u^2+b\sum u

ttu=et/2u=e^{t/2}TTu2u^2uTuT
11.6487702.7183115.41
22.7183837.3891225.62
34.481710020.0855448.17
47.389112454.5982916.24
Sum16.237737784.79111705.44

377=16.2377a+4b,1705.44=84.7911a+16.2377b377=16.2377a+4b,\qquad 1705.44=84.7911a+16.2377b

Solving: a=9.273a=9.273, b=56.606b=56.606, so

T=9.273 et/2+56.606T=9.273\,e^{t/2}+56.606

Estimates

t=1.5t=1.5: T=9.273e0.75+56.606=9.273(2.1170)+56.606≈76.2 ∘T=9.273e^{0.75}+56.606=9.273(2.1170)+56.606\approx 76.2\,^\circC

t=3.5t=3.5: T=9.273e1.75+56.606=9.273(5.7546)+56.606≈110.0 ∘T=9.273e^{1.75}+56.606=9.273(5.7546)+56.606\approx 110.0\,^\circC

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

Evaluate the definite integral given in the paper (limits 0.2 to 1.5) by Simpson's and Trapezoid rule's taking n=6n = 6.

Answer

Taking the integral as I=∫0.21.5(sin⁡x−ln⁡x+ex)dxI=\displaystyle\int_{0.2}^{1.5}\left(\sin x-\ln x+e^x\right)dx with n=6n=6.

h=1.5−0.26=0.21667h=\frac{1.5-0.2}{6}=0.21667

iixix_iyi=f(xi)y_i=f(x_i)
00.200003.02951
10.416672.79708
20.633332.93247
30.850003.25345
41.066673.71673
51.283334.31815
61.500005.07372

Trapezoidal rule

I≈h2[y0+y6+2(y1+⋯+y5)]=0.216672[8.10323+2(17.01788)]≈4.5651I\approx\frac h2\left[y_0+y_6+2(y_1+\dots+y_5)\right]=\frac{0.21667}{2}\left[8.10323+2(17.01788)\right]\approx 4.5651

Simpson's 1/3 rule (valid since n=6n=6 is even)

I≈h3[y0+y6+4(y1+y3+y5)+2(y2+y4)]I\approx\frac h3\left[y_0+y_6+4(y_1+y_3+y_5)+2(y_2+y_4)\right]

=0.216673[8.10323+4(10.36868)+2(6.64920)]≈4.5411=\frac{0.21667}{3}\left[8.10323+4(10.36868)+2(6.64920)\right]\approx 4.5411

So Trapezoidal gives 4.5654.565 and Simpson's rule gives 4.5414.541 (Simpson is more accurate).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

Solve the system of equations using Gauss elimination method:
3x+y+z=13x + y + z = 1 2x+4y+z=22x + 4y + z = 2 x+y+5z=3x + y + 5z = 3

Answer

Augmented matrix:

[311124121153]\left[\begin{array}{ccc|c}3&1&1&1\\2&4&1&2\\1&1&5&3\end{array}\right]

Forward elimination. R2→R2−23R1R_2\to R_2-\tfrac23R_1, R3→R3−13R1R_3\to R_3-\tfrac13R_1:

[31110103134302314383]\left[\begin{array}{ccc|c}3&1&1&1\\0&\tfrac{10}{3}&\tfrac13&\tfrac43\\0&\tfrac23&\tfrac{14}{3}&\tfrac83\end{array}\right]

R3→R3−15R2R_3\to R_3-\tfrac15R_2:

[31110103134300235125]\left[\begin{array}{ccc|c}3&1&1&1\\0&\tfrac{10}{3}&\tfrac13&\tfrac43\\0&0&\tfrac{23}{5}&\tfrac{12}{5}\end{array}\right]

Back substitution

z=12/523/5=1223≈0.5217z=\frac{12/5}{23/5}=\frac{12}{23}\approx0.5217

y=43−13z103=4−z10=823≈0.3478y=\frac{\tfrac43-\tfrac13z}{\tfrac{10}{3}}=\frac{4-z}{10}=\frac{8}{23}\approx0.3478

x=1−y−z3=123≈0.0435x=\frac{1-y-z}{3}=\frac{1}{23}\approx0.0435

Solution: x=123, y=823, z=1223x=\tfrac1{23},\ y=\tfrac8{23},\ z=\tfrac{12}{23}. Check in eq. 2: 2+32+1223=2\tfrac{2+32+12}{23}=2.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

Solve the system using Gauss-Jacobi method, performing three iterations starting from (0,0,0):
10x+y+z=1210x + y + z = 12 2x+10y+z=132x + 10y + z = 13 2x+2y+10z=142x + 2y + 10z = 14

Answer

The system is diagonally dominant, so Jacobi iteration converges. Solve each equation for its diagonal variable and use only the previous iterate:

x(k+1)=12−y(k)−z(k)10,y(k+1)=13−2x(k)−z(k)10,z(k+1)=14−2x(k)−2y(k)10x^{(k+1)}=\frac{12-y^{(k)}-z^{(k)}}{10},\quad y^{(k+1)}=\frac{13-2x^{(k)}-z^{(k)}}{10},\quad z^{(k+1)}=\frac{14-2x^{(k)}-2y^{(k)}}{10}

Start (x,y,z)=(0,0,0)(x,y,z)=(0,0,0).

Iterationxxyyzz
11.20001.30001.4000
20.93000.92000.9000
31.01801.02401.0300

For example iteration 2: x=(12−1.3−1.4)/10=0.93x=(12-1.3-1.4)/10=0.93, y=(13−2.4−1.4)/10=0.92y=(13-2.4-1.4)/10=0.92, z=(14−2.4−2.6)/10=0.90z=(14-2.4-2.6)/10=0.90.

After three iterations x≈1.018, y≈1.024, z≈1.030x\approx1.018,\ y\approx1.024,\ z\approx1.030; the values are converging to the exact solution (1,1,1)(1,1,1).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

Find dominant eigen value and corresponding eigen vector of the matrix given in the paper.

Answer

Taking the matrix as A=[2134]A=\begin{bmatrix}2&1\\3&4\end{bmatrix} and using the power method with v0=[11]v_0=\begin{bmatrix}1\\1\end{bmatrix}. At each step compute AvkAv_k, take its largest component as the eigenvalue estimate and divide by it.

kkAvkAv_kλk+1\lambda_{k+1}vk+1v_{k+1}
0(3,7)(3,7)7(0.4286, 1)(0.4286,\,1)
1(1.8571, 5.2857)(1.8571,\,5.2857)5.2857(0.3514, 1)(0.3514,\,1)
2(1.7027, 5.0541)(1.7027,\,5.0541)5.0541(0.3369, 1)(0.3369,\,1)
3(1.6738, 5.0107)(1.6738,\,5.0107)5.0107(0.3340, 1)(0.3340,\,1)
4(1.6680, 5.0020)(1.6680,\,5.0020)5.0020(0.3335, 1)(0.3335,\,1)

The iterates converge to

λ≈5,v≈[0.33331] (or [13])\lambda\approx5,\qquad v\approx\begin{bmatrix}0.3333\\1\end{bmatrix}\ \text{(or }\begin{bmatrix}1\\3\end{bmatrix})

Check: A(1,3)T=(5,15)T=5(1,3)TA(1,3)^T=(5,15)^T=5(1,3)^T. The characteristic equation λ2−6λ+5=0\lambda^2-6\lambda+5=0 gives λ=5,1\lambda=5,1, so 5 is dominant.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

Using Euler's method solve the given differential equation d2ydx2+2dydx−3y=6\dfrac{d^2y}{dx^2} + 2\dfrac{dy}{dx} - 3y = 6, y(0)=0y(0) = 0, y′(0)=1y'(0) = 1, with h=0.2h = 0.2 for y(0.4)=?y(0.4) = ?

Answer

Let y′=zy'=z. Then z′=6−2z+3yz'=6-2z+3y with y(0)=0, z(0)=1y(0)=0,\ z(0)=1, h=0.2h=0.2.

Euler's formulas: yn+1=yn+hzny_{n+1}=y_n+hz_n, zn+1=zn+h(6−2zn+3yn)z_{n+1}=z_n+h(6-2z_n+3y_n).

Step 1 (x=0→0.2x=0\to0.2): y1=0+0.2(1)=0.2y_1=0+0.2(1)=0.2 z1=1+0.2(6−2+0)=1.8z_1=1+0.2(6-2+0)=1.8

Step 2 (x=0.2→0.4x=0.2\to0.4): y2=0.2+0.2(1.8)=0.56y_2=0.2+0.2(1.8)=0.56 z2=1.8+0.2(6−3.6+0.6)=2.4z_2=1.8+0.2(6-3.6+0.6)=2.4

xxyyy′y'
001
0.20.21.8
0.40.562.4

Hence y(0.4)≈0.56y(0.4)\approx0.56.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 7 marks

Solve the given differential equation using Runge Kutta second order method: dydx=2yx\dfrac{dy}{dx} = \dfrac{2y}{x}, y(1)=2y(1) = 2, y(2)=?y(2) = ? (take h=0.25h = 0.25)

Answer

f(x,y)=2yxf(x,y)=\dfrac{2y}{x}, x0=1, y0=2x_0=1,\ y_0=2, h=0.25h=0.25. Second-order Runge-Kutta (Heun):

k1=hf(xn,yn),k2=hf(xn+h,yn+k1),yn+1=yn+12(k1+k2)k_1=hf(x_n,y_n),\quad k_2=hf(x_n+h,y_n+k_1),\quad y_{n+1}=y_n+\tfrac12(k_1+k_2)

xnx_nyny_nk1k_1k2k_2yn+1y_{n+1}
1.002.00001.00001.20003.1000
1.253.10001.24001.44674.4433
1.504.44331.48111.69276.0302
1.756.03021.72291.93837.8608

Hence y(2)≈7.861y(2)\approx7.861. (The exact solution y=2x2y=2x^2 gives y(2)=8y(2)=8.)

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 8 marks

Solve: ∇2u=−10(x2+y2)\nabla^2 u = -10(x^2 + y^2) over the square mesh with sides x=0=yx = 0 = y, x=3=yx = 3 = y with u=0u = 0 on the boundary and h=1h = 1.

Answer

Here ∇2u=−10(x2+y2)\nabla^2u=-10(x^2+y^2) on 0≤x,y≤30\le x,y\le3 with u=0u=0 on the boundary and h=1h=1. The interior nodes are (1,1),(2,1),(1,2),(2,2)(1,1),(2,1),(1,2),(2,2).

The five-point formula for uxx+uyy=gu_{xx}+u_{yy}=g gives

ui+1,j+ui−1,j+ui,j+1+ui,j−1−4ui,j=h2g(xi,yj)u_{i+1,j}+u_{i-1,j}+u_{i,j+1}+u_{i,j-1}-4u_{i,j}=h^2g(x_i,y_j)

so 4uij=(sum of 4 neighbours)+10(xi2+yi2)4u_{ij}=\text{(sum of 4 neighbours)}+10(x_i^2+y_i^2) with right-hand sides 20, 50, 50, 8020,\,50,\,50,\,80 at (1,1),(2,1),(1,2),(2,2)(1,1),(2,1),(1,2),(2,2).

By symmetry u21=u12u_{21}=u_{12}. Let u1=u11u_1=u_{11}, u2=u21=u12u_2=u_{21}=u_{12}, u3=u22u_3=u_{22} (boundary values are 0):

4u1=2u2+20,4u2=u1+u3+50,4u3=2u2+804u_1=2u_2+20,\qquad 4u_2=u_1+u_3+50,\qquad 4u_3=2u_2+80

So u1=u2+102u_1=\dfrac{u_2+10}{2}, u3=u2+402u_3=\dfrac{u_2+40}{2}. Substituting:

4u2=u2+102+u2+402+50=u2+75 ⇒ u2=254u_2=\frac{u_2+10}{2}+\frac{u_2+40}{2}+50=u_2+75\ \Rightarrow\ u_2=25

u1=17.5,u3=32.5u_1=17.5,\qquad u_3=32.5

Hence u(1,1)=17.5, u(2,1)=u(1,2)=25, u(2,2)=32.5u(1,1)=17.5,\ u(2,1)=u(1,2)=25,\ u(2,2)=32.5.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 5 marks

Write short notes on: Cubic spline interpolation

Answer

Cubic spline interpolation fits a separate cubic polynomial Si(x)S_i(x) on each subinterval [xi,xi+1][x_i,x_{i+1}] of the data points (x0,y0),…,(xn,yn)(x_0,y_0),\dots,(x_n,y_n), joined so the curve is smooth.

Conditions

  • Si(xi)=yiS_i(x_i)=y_i and Si(xi+1)=yi+1S_i(x_{i+1})=y_{i+1} (passes through the points).
  • Si′(xi+1)=Si+1′(xi+1)S_i'(x_{i+1})=S_{i+1}'(x_{i+1}) (continuous slope).
  • Si′′(xi+1)=Si+1′′(xi+1)S_i''(x_{i+1})=S_{i+1}''(x_{i+1}) (continuous curvature).
  • End conditions: for a natural spline S′′(x0)=S′′(xn)=0S''(x_0)=S''(x_n)=0.

Form. With Mi=S′′(xi)M_i=S''(x_i) and hi=xi+1−xih_i=x_{i+1}-x_i:

Si(x)=Mi(xi+1−x)3+Mi+1(x−xi)36hi+(yihi−Mihi6)(xi+1−x)+(yi+1hi−Mi+1hi6)(x−xi)S_i(x)=\frac{M_i(x_{i+1}-x)^3+M_{i+1}(x-x_i)^3}{6h_i}+\left(\frac{y_i}{h_i}-\frac{M_ih_i}{6}\right)(x_{i+1}-x)+\left(\frac{y_{i+1}}{h_i}-\frac{M_{i+1}h_i}{6}\right)(x-x_i)

The MiM_i come from the tridiagonal system

hi−1Mi−1+2(hi−1+hi)Mi+hiMi+1=6[yi+1−yihi−yi−yi−1hi−1]h_{i-1}M_{i-1}+2(h_{i-1}+h_i)M_i+h_iM_{i+1}=6\left[\frac{y_{i+1}-y_i}{h_i}-\frac{y_i-y_{i-1}}{h_{i-1}}\right]

Advantage. It avoids the oscillation of a single high-degree polynomial and gives a smooth curve, widely used in curve design and graphics.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 5 marks

Write short notes on: Newton Cote's Quadrature formula

Answer

Newton-Cotes quadrature approximates ∫abf(x) dx\int_a^b f(x)\,dx by integrating the Lagrange interpolating polynomial through n+1n+1 equally spaced points xi=a+ihx_i=a+ih, h=b−anh=\dfrac{b-a}{n}.

∫abf(x) dx≈∑i=0nwif(xi)\int_a^b f(x)\,dx\approx\sum_{i=0}^{n}w_if(x_i)

The weights wiw_i depend only on nn. The common cases are:

  • n=1n=1, Trapezoidal rule: ∫abf dx≈h2 (y0+y1)\displaystyle\int_a^b f\,dx\approx\frac h2\,(y_0+y_1)
  • n=2n=2, Simpson's 1/3 rule: h3 (y0+4y1+y2)\displaystyle\frac h3\,(y_0+4y_1+y_2)
  • n=3n=3, Simpson's 3/8 rule: 3h8 (y0+3y1+3y2+y3)\displaystyle\frac{3h}{8}\,(y_0+3y_1+3y_2+y_3)

Composite versions apply the rule on many sub-intervals; e.g. composite Simpson: h3[y0+yn+4(odd)+2(even)]\dfrac h3[y_0+y_n+4(\text{odd})+2(\text{even})] with nn even.

Notes. A rule with nn even is exact for polynomials of degree n+1n+1; with nn odd, degree nn. For large nn some weights become negative, so low-order composite rules are preferred.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2025 Spring · 5 marks

Write short notes on: ODEs Vs PDEs

Answer

BasisODEPDE
UnknownFunction of one independent variable, y(x)y(x)Function of two or more variables, u(x,y,t)u(x,y,t)
DerivativesOrdinary derivatives onlyPartial derivatives
Exampledydx=x+y\dfrac{dy}{dx}=x+y∂u∂t=α∂2u∂x2\dfrac{\partial u}{\partial t}=\alpha\dfrac{\partial^2u}{\partial x^2}
ConditionsInitial value or boundary value at pointsBoundary and initial conditions on curves/regions
Numerical methodsEuler, Heun, Runge-Kutta, shootingFinite differences on a mesh (five-point formula, Crank-Nicolson)
ModelsPopulation growth, circuits, motionHeat flow, waves, potential problems

PDEs of second order are classified as elliptic (Laplace, Poisson), parabolic (heat equation) and hyperbolic (wave equation). ODEs need only a step-by-step march in one variable, whereas PDEs need a grid in several variables and give large systems of equations.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 8 marks

Explain different types of error in numerical calculation. Find out the root of nonlinear equation 2x3+4x2−4x−6=02x^3 + 4x^2 - 4x - 6 = 0, correct upto three decimal places.

Answer

Types of errors

  1. Inherent (data) error: present in the input data because of measurement or earlier approximation.
  2. Round-off error: caused by representing numbers with a finite number of digits (e.g. π≈3.1416\pi\approx3.1416).
  3. Truncation error: caused by cutting an infinite process short, e.g. keeping only a few terms of a Taylor series.
  4. Absolute error: Ea=∣xtrue−xapprox∣E_a=|x_{true}-x_{approx}|.
  5. Relative error: Er=Ea∣xtrue∣E_r=\dfrac{E_a}{|x_{true}|}; percentage error =Er×100=E_r\times100.
  6. Blunders/Modelling errors: human mistakes or wrong mathematical models.

Root of f(x)=2x3+4x2−4x−6f(x)=2x^3+4x^2-4x-6 by Newton-Raphson. f(1)=−4<0f(1)=-4<0 and f(2)=18>0f(2)=18>0, so a root lies in (1,2)(1,2); since f(1.5)=3.75>0f(1.5)=3.75>0, take x0=1.5x_0=1.5. f′(x)=6x2+8x−4f'(x)=6x^2+8x-4.

nnxnx_nf(xn)f(x_n)f′(xn)f'(x_n)xn+1x_{n+1}
01.5000003.75000021.50001.325581
11.3255810.38487217.14761.303137
21.3031370.00599916.61411.302776
31.3027760.00000216.60561.302776

The root, correct to three decimals, is x≈1.303x\approx1.303. (Indeed f(x)=(x+1)(2x2+2x−6)f(x)=(x+1)(2x^2+2x-6), giving x=−1+132=1.3028x=\frac{-1+\sqrt{13}}{2}=1.3028.)

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 7 marks

Find the root of equation sin⁡x=1−x\sin x = 1 - x, correct up to 3 decimal place using NR Method.

Answer

Let f(x)=sin⁡x+x−1f(x)=\sin x+x-1 (from sin⁡x=1−x\sin x=1-x), f′(x)=cos⁡x+1f'(x)=\cos x+1. Since f(0)=−1<0f(0)=-1<0 and f(1)=0.8415>0f(1)=0.8415>0, a root lies in (0,1)(0,1). Take x0=0.5x_0=0.5 (radians).

xn+1=xn−sin⁡xn+xn−1cos⁡xn+1x_{n+1}=x_n-\frac{\sin x_n+x_n-1}{\cos x_n+1}

nnxnx_nf(xn)f(x_n)f′(xn)f'(x_n)xn+1x_{n+1}
00.500000-0.0205741.8775830.510958
10.510958-0.0000291.8722760.510973
20.5109730.0000001.8722690.510973

The last two iterates agree to three decimals, so the root is x≈0.511x\approx0.511.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 8 marks

Solve the following system of a linear equation by Gauss Elimination Method. Also apply partial pivoting if necessary.
2x+2y+z=62x + 2y + z = 6 4x+2y+3z=44x + 2y + 3z = 4 x+y+z=0x + y + z = 0

Answer

Augmented matrix:

[221642341110]\left[\begin{array}{ccc|c}2&2&1&6\\4&2&3&4\\1&1&1&0\end{array}\right]

Pivoting. The largest entry in column 1 is 4, so interchange R1↔R2R_1\leftrightarrow R_2:

[423422161110]\left[\begin{array}{ccc|c}4&2&3&4\\2&2&1&6\\1&1&1&0\end{array}\right]

Eliminate xx: R2→R2−12R1R_2\to R_2-\tfrac12R_1, R3→R3−14R1R_3\to R_3-\tfrac14R_1:

[423401−12401214−1]\left[\begin{array}{ccc|c}4&2&3&4\\0&1&-\tfrac12&4\\0&\tfrac12&\tfrac14&-1\end{array}\right]

In column 2 the pivot 1 is already the larger, so no swap is needed. R3→R3−12R2R_3\to R_3-\tfrac12R_2:

[423401−1240012−3]\left[\begin{array}{ccc|c}4&2&3&4\\0&1&-\tfrac12&4\\0&0&\tfrac12&-3\end{array}\right]

Back substitution

z=−31/2=−6,y=4+12z=1,x=4−2y−3z4=4−2+184=5z=\frac{-3}{1/2}=-6,\qquad y=4+\tfrac12z=1,\qquad x=\frac{4-2y-3z}{4}=\frac{4-2+18}{4}=5

Solution: x=5, y=1, z=−6x=5,\ y=1,\ z=-6. Check eq. 1: 10+2−6=610+2-6=6.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 7 marks

Solve the following system of linear equations by relaxation method.
5x+2y+z=−125x + 2y + z = -12 −x+4y+2z=20-x + 4y + 2z = 20 2x−3y+10z=32x - 3y + 10z = 3

Answer

Residuals: R1=−12−5x−2y−zR_1=-12-5x-2y-z, R2=20+x−4y−2zR_2=20+x-4y-2z, R3=3−2x+3y−10zR_3=3-2x+3y-10z. Start from (0,0,0)(0,0,0), so R=(−12, 20, 3)R=(-12,\,20,\,3). At each step the largest residual is reduced to zero by changing the corresponding variable by δ=Rj/ajj\delta=R_j/a_{jj}; the other residuals are updated using the column of the matrix.

StepChangexxyyzzR1R_1R2R_2R3R_3
0000-12203
1δy=+5\delta y=+5050-22018
2δx=−4.4\delta x=-4.4-4.4500-4.426.8
3δz=+2.68\delta z=+2.68-4.452.68-2.68-9.760
4δy=−2.44\delta y=-2.44-4.42.562.682.20-7.32
5δz=−0.73\delta z=-0.73-4.42.561.952.931.460
6δx=+0.59\delta x=+0.59-3.812.561.9502.05-1.2
7δy=+0.51\delta y=+0.51-3.813.071.95-1.0400.33
8δx=−0.21\delta x=-0.21-4.023.071.950-0.20.75
9δz=+0.07\delta z=+0.07-4.023.072.02-0.06-0.340
10δy=−0.08\delta y=-0.08-4.022.992.020.10-0.19

The residuals are now small, giving

x≈−4.0,y≈3.0,z≈2.0x\approx-4.0,\quad y\approx3.0,\quad z\approx2.0

Check: 5(−4)+2(3)+2=−125(-4)+2(3)+2=-12; −(−4)+4(3)+2(2)=20-(-4)+4(3)+2(2)=20; 2(−4)−3(3)+10(2)=32(-4)-3(3)+10(2)=3.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 8 marks

Solve the following linear equation by LU factorization method.
3x+2y+z=103x + 2y + z = 10 2x+3y+2z=142x + 3y + 2z = 14 x+2y+3z=14x + 2y + 3z = 14

Answer

Write A=LUA=LU (Doolittle, unit diagonal in LL) for

A=[321232123]A=\begin{bmatrix}3&2&1\\2&3&2\\1&2&3\end{bmatrix}

Factorisation. Row 1 of UU: (3,2,1)(3,2,1). Multipliers: l21=23l_{21}=\tfrac23, l31=13l_{31}=\tfrac13.

u22=3−23(2)=53u_{22}=3-\tfrac23(2)=\tfrac53, u23=2−23(1)=43u_{23}=2-\tfrac23(1)=\tfrac43, l32=2−13(2)5/3=45l_{32}=\dfrac{2-\tfrac13(2)}{5/3}=\tfrac45, u33=3−13(1)−45⋅43=85u_{33}=3-\tfrac13(1)-\tfrac45\cdot\tfrac43=\tfrac85.

L=[100231013451],U=[321053430085]L=\begin{bmatrix}1&0&0\\\tfrac23&1&0\\\tfrac13&\tfrac45&1\end{bmatrix},\qquad U=\begin{bmatrix}3&2&1\\0&\tfrac53&\tfrac43\\0&0&\tfrac85\end{bmatrix}

Forward substitution Ly=bLy=b, b=(10,14,14)Tb=(10,14,14)^T:

y1=10y_1=10, y2=14−23(10)=223y_2=14-\tfrac23(10)=\tfrac{22}{3}, y3=14−103−45⋅223=245y_3=14-\tfrac{10}{3}-\tfrac45\cdot\tfrac{22}{3}=\tfrac{24}{5}

Back substitution Ux=yUx=y:

z=24/58/5=3,y=223−43(3)5/3=2,x=10−2(2)−33=1z=\frac{24/5}{8/5}=3,\qquad y=\frac{\tfrac{22}{3}-\tfrac43(3)}{5/3}=2,\qquad x=\frac{10-2(2)-3}{3}=1

Solution: x=1, y=2, z=3x=1,\ y=2,\ z=3.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 8 marks

The following table gives the population of a town during the last six census. Estimate the change in population from 1845 to 1885. (Census years 1841, 1851, 1861, 1871, 1881, 1891 with populations in the paper.)

Answer

Taking populations (in thousands) 12,15,20,27,39,5212,15,20,27,39,52 for 1841, 1851, ..., 1891 (h=10h=10).

Difference table

YearyyΔ\DeltaΔ2\Delta^2Δ3\Delta^3Δ4\Delta^4Δ5\Delta^5
1841123203-10
185115523-7
18612075-4
187127121
18813913
189152

Population in 1845 (Newton forward, x0=1841x_0=1841, p=1845−184110=0.4p=\frac{1845-1841}{10}=0.4):

y=y0+pΔy0+p(p−1)2Δ2y0+p(p−1)(p−2)6Δ3y0+…y=y_0+p\Delta y_0+\frac{p(p-1)}{2}\Delta^2y_0+\frac{p(p-1)(p-2)}{6}\Delta^3y_0+\dots

=12+1.2−0.24+0−0.1248−0.2995≈12.54=12+1.2-0.24+0-0.1248-0.2995\approx12.54

Population in 1885 (Newton backward, xn=1891x_n=1891, p=1885−189110=−0.6p=\frac{1885-1891}{10}=-0.6) with ∇yn=13, ∇2=1, ∇3=−4, ∇4=−7, ∇5=−10\nabla y_n=13,\ \nabla^2=1,\ \nabla^3=-4,\ \nabla^4=-7,\ \nabla^5=-10:

y=52+(−0.6)(13)+(−0.6)(0.4)2(1)+(−0.6)(0.4)(1.4)6(−4)+(−0.6)(0.4)(1.4)(2.4)24(−7)+(−0.6)(0.4)(1.4)(2.4)(3.4)120(−10)y=52+(-0.6)(13)+\frac{(-0.6)(0.4)}{2}(1)+\frac{(-0.6)(0.4)(1.4)}{6}(-4)+\frac{(-0.6)(0.4)(1.4)(2.4)}{24}(-7)+\frac{(-0.6)(0.4)(1.4)(2.4)(3.4)}{120}(-10)

=52−7.8−0.12+0.224+0.235+0.228≈44.77=52-7.8-0.12+0.224+0.235+0.228\approx44.77

Change in population

P(1885)−P(1845)≈44.77−12.54≈32.2 thousandP(1885)-P(1845)\approx44.77-12.54\approx32.2\ \text{thousand}

i.e. an increase of about 32,200 people.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 7 marks

A rod is rotating in a plane. The following table gives angle (θ\theta) radian through which rod is turned at a various time interval (t) sec. Calculate angular velocity and angular acceleration of a rod when t=0.2t = 0.2 sec. (Table in the paper: t = 0, 0.2, 0.4, 0.6, 0.8; θ\theta = 0, 0.12, 0.49, 1.12, 2.02.)

Answer

Angular velocity ω=dθdt\omega=\dfrac{d\theta}{dt} and angular acceleration α=d2θdt2\alpha=\dfrac{d^2\theta}{dt^2}. The point t=0.2t=0.2 is the second tabulated value, so use Newton's forward formula with x0=0x_0=0, h=0.2h=0.2, p=0.2−00.2=1p=\dfrac{0.2-0}{0.2}=1.

Difference table

ttθ\thetaΔ\DeltaΔ2\Delta^2Δ3\Delta^3Δ4\Delta^4
000.120.250.010
0.20.120.370.260.01
0.40.490.630.27
0.61.120.90
0.82.02

Angular velocity

dθdt=1h[Δθ0+2p−12Δ2θ0+3p2−6p+26Δ3θ0+… ]\frac{d\theta}{dt}=\frac1h\left[\Delta\theta_0+\frac{2p-1}{2}\Delta^2\theta_0+\frac{3p^2-6p+2}{6}\Delta^3\theta_0+\dots\right]

At p=1p=1:

ω=10.2[0.12+12(0.25)+−16(0.01)]=5(0.24333)≈1.217 rad/s\omega=\frac1{0.2}\left[0.12+\frac12(0.25)+\frac{-1}{6}(0.01)\right]=5(0.24333)\approx1.217\ \text{rad/s}

Angular acceleration

d2θdt2=1h2[Δ2θ0+(p−1)Δ3θ0+… ]=0.25+00.04=6.25 rad/s2\frac{d^2\theta}{dt^2}=\frac1{h^2}\left[\Delta^2\theta_0+(p-1)\Delta^3\theta_0+\dots\right]=\frac{0.25+0}{0.04}=6.25\ \text{rad/s}^2

So at t=0.2t=0.2 s: ω≈1.217\omega\approx1.217 rad/s and α≈6.25\alpha\approx6.25 rad/s2^2.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 8 marks

Using Heun's method, solve y′′=y+xy′y'' = y + xy', y(0)=1y(0) = 1 and y′(0)=1y'(0) = 1 to find y(0.2)y(0.2) and y′(0.2)y'(0.2) with h=0.1h = 0.1.

Answer

Let y′=zy'=z. Then z′=y+xzz'=y+xz, with x0=0, y0=1, z0=1x_0=0,\ y_0=1,\ z_0=1, h=0.1h=0.1. Heun's method for the system:

predictor:  yˉ=yn+hzn,  zˉ=zn+h(yn+xnzn)\text{predictor: }\ \bar y=y_n+hz_n,\ \ \bar z=z_n+h(y_n+x_nz_n)

corrector:  yn+1=yn+h2[zn+zˉ],  zn+1=zn+h2[(yn+xnzn)+(yˉ+xn+1zˉ)]\text{corrector: }\ y_{n+1}=y_n+\tfrac h2\left[z_n+\bar z\right],\ \ z_{n+1}=z_n+\tfrac h2\left[(y_n+x_nz_n)+(\bar y+x_{n+1}\bar z)\right]

Step 1 (x=0→0.1x=0\to0.1): Predictor: yˉ=1+0.1(1)=1.1\bar y=1+0.1(1)=1.1, zˉ=1+0.1(1)=1.1\bar z=1+0.1(1)=1.1. Slope at the new point: yˉ+0.1zˉ=1.1+0.11=1.21\bar y+0.1\bar z=1.1+0.11=1.21. y1=1+0.05(1+1.1)=1.105y_1=1+0.05(1+1.1)=1.105 z1=1+0.05(1+1.21)=1.1105z_1=1+0.05(1+1.21)=1.1105

Step 2 (x=0.1→0.2x=0.1\to0.2): Initial slopes: z1=1.1105z_1=1.1105, y1+0.1z1=1.105+0.11105=1.21605y_1+0.1z_1=1.105+0.11105=1.21605. Predictor: yˉ=1.105+0.11105=1.21605\bar y=1.105+0.11105=1.21605, zˉ=1.1105+0.121605=1.232105\bar z=1.1105+0.121605=1.232105. Slope at the new point: yˉ+0.2zˉ=1.21605+0.246421=1.462471\bar y+0.2\bar z=1.21605+0.246421=1.462471. y2=1.105+0.05(1.1105+1.232105)=1.22213y_2=1.105+0.05(1.1105+1.232105)=1.22213 z2=1.1105+0.05(1.21605+1.462471)=1.24443z_2=1.1105+0.05(1.21605+1.462471)=1.24443

Hence y(0.2)≈1.2221y(0.2)\approx1.2221 and y′(0.2)≈1.2444y'(0.2)\approx1.2444.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 8 marks

Using shooting method solve the following equation d2ydx2=6x\dfrac{d^2y}{dx^2} = 6x, given, y(1)=2y(1) = 2, y(2)=9y(2) = 9 in an interval of 1 and 2.

Answer

Idea. Replace the boundary value problem by an initial value problem with an assumed slope y′(1)=my'(1)=m, integrate to x=2x=2, and adjust mm until y(2)=9y(2)=9.

Let y′=zy'=z, so z′=6xz'=6x with y(1)=2y(1)=2, z(1)=mz(1)=m. Integrating,

z=m+3(x2−1),y=2+m(x−1)+(x3−1)−3(x−1)z=m+3(x^2-1),\qquad y=2+m(x-1)+(x^3-1)-3(x-1)

so y(2)=2+m+7−3=m+6y(2)=2+m+7-3=m+6. (A Runge-Kutta or Euler integration gives the same result since y(2)y(2) is linear in mm.)

First trial: m1=0⇒y(2)=6m_1=0\Rightarrow y(2)=6 (target 9, too low). Second trial: m2=2⇒y(2)=8m_2=2\Rightarrow y(2)=8 (still low).

Since y(2)y(2) varies linearly with mm, interpolate:

m=m2+9−88−6(m2−m1)=2+12(2)=3m=m_2+\frac{9-8}{8-6}(m_2-m_1)=2+\frac12(2)=3

Third trial: m=3⇒y(2)=9m=3\Rightarrow y(2)=9, which matches the boundary condition.

With y′(1)=3y'(1)=3: z=3x2z=3x^2 and

y=x3+1y=x^3+1

Check: y(1)=2, y(2)=9, y′′=6xy(1)=2,\ y(2)=9,\ y''=6x. For example y(1.5)=4.375y(1.5)=4.375.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 7 marks

Solve the Poisson equation fxx+fyy=−10(x2+y2)f_{xx} + f_{yy} = -10(x^2 + y^2) over the square domain 0≤x≤30 \le x \le 3, 0≤y≤30 \le y \le 3 with f=0f = 0 on the boundary and mesh length h=1h = 1.

Answer

For fxx+fyy=g(x,y)=−10(x2+y2)f_{xx}+f_{yy}=g(x,y)=-10(x^2+y^2) with h=1h=1, the five-point formula is

fi+1,j+fi−1,j+fi,j+1+fi,j−1−4fij=h2gij ⇒ 4fij=∑neighbours+10(xi2+yj2)f_{i+1,j}+f_{i-1,j}+f_{i,j+1}+f_{i,j-1}-4f_{ij}=h^2g_{ij}\ \Rightarrow\ 4f_{ij}=\sum\text{neighbours}+10(x_i^2+y_j^2)

Interior nodes: (1,1),(2,1),(1,2),(2,2)(1,1),(2,1),(1,2),(2,2); boundary values are 0. Let f1=f(1,1)f_1=f(1,1), f2=f(2,1)=f(1,2)f_2=f(2,1)=f(1,2) (symmetry), f3=f(2,2)f_3=f(2,2):

(1,1): 4f1=f2+f2+20(1,1):\ 4f_1=f_2+f_2+20 (2,1): 4f2=f1+f3+50(2,1):\ 4f_2=f_1+f_3+50 (2,2): 4f3=f2+f2+80(2,2):\ 4f_3=f_2+f_2+80

From the first and third: f1=f2+102f_1=\dfrac{f_2+10}{2}, f3=f2+402f_3=\dfrac{f_2+40}{2}. Then 4f2=f2+25+504f_2=f_2+25+50, so f2=25f_2=25.

f(1,1)=17.5,f(2,1)=f(1,2)=25,f(2,2)=32.5f(1,1)=17.5,\qquad f(2,1)=f(1,2)=25,\qquad f(2,2)=32.5

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 5 marks

Write short notes on: Algorithm of Bisection Method

Answer

Bisection method finds a root of f(x)=0f(x)=0 in [a,b][a,b] where ff is continuous and f(a)f(b)<0f(a)f(b)<0, by repeatedly halving the interval.

Algorithm

  1. Choose a,ba,b with f(a)f(b)<0f(a)f(b)<0 and a tolerance ε\varepsilon.
  2. Compute the midpoint c=a+b2c=\dfrac{a+b}{2}.
  3. If f(c)=0f(c)=0 or b−a2<ε\dfrac{b-a}{2}<\varepsilon, stop: cc is the root.
  4. If f(a)f(c)<0f(a)f(c)<0, set b=cb=c; otherwise set a=ca=c.
  5. Go to step 2.

Properties

  • Always converges (if the sign condition holds), but only linearly: the error halves at each step.
  • The number of iterations needed for accuracy ε\varepsilon is n≥log⁡(b−a)−log⁡εlog⁡2n\ge\dfrac{\log(b-a)-\log\varepsilon}{\log2}.
  • Simple and robust, but slower than Newton-Raphson or secant.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 5 marks

Write short notes on: Parabolic equation

Answer

A second-order PDE Auxx+Buxy+Cuyy+⋯=0Au_{xx}+Bu_{xy}+Cu_{yy}+\dots=0 is parabolic when B2−4AC=0B^2-4AC=0. The standard example is the one-dimensional heat (diffusion) equation

∂u∂t=α∂2u∂x2\frac{\partial u}{\partial t}=\alpha\frac{\partial^2u}{\partial x^2}

It needs an initial condition u(x,0)u(x,0) and boundary conditions at the ends of the rod.

Explicit finite-difference solution. With xi=ihx_i=ih, tj=jkt_j=jk and λ=αkh2\lambda=\dfrac{\alpha k}{h^2}:

ui,j+1=λui−1,j+(1−2λ)ui,j+λui+1,ju_{i,j+1}=\lambda u_{i-1,j}+(1-2\lambda)u_{i,j}+\lambda u_{i+1,j}

This is stable only if λ≤12\lambda\le\tfrac12 (λ=12\lambda=\tfrac12 gives Bender-Schmidt: ui,j+1=12(ui−1,j+ui+1,j)u_{i,j+1}=\tfrac12(u_{i-1,j}+u_{i+1,j})). The Crank-Nicolson implicit method is unconditionally stable and requires solving a tridiagonal system at each time level.

Parabolic equations model heat conduction and diffusion.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2024 Spring · 5 marks

Write short notes on: RK-4 method

Answer

The fourth-order Runge-Kutta method solves y′=f(x,y)y'=f(x,y), y(x0)=y0y(x_0)=y_0 with step hh:

k1=hf(xn,yn)k_1=hf(x_n,y_n) k2=hf(xn+h2, yn+k12)k_2=hf\left(x_n+\tfrac h2,\ y_n+\tfrac{k_1}2\right) k3=hf(xn+h2, yn+k22)k_3=hf\left(x_n+\tfrac h2,\ y_n+\tfrac{k_2}2\right) k4=hf(xn+h, yn+k3)k_4=hf(x_n+h,\ y_n+k_3)

yn+1=yn+16(k1+2k2+2k3+k4)y_{n+1}=y_n+\frac16\left(k_1+2k_2+2k_3+k_4\right)

Features

  • It agrees with the Taylor series up to h4h^4, so the local error is O(h5)O(h^5) and the global error O(h4)O(h^4).
  • It is a single-step method needing no derivatives of ff and no starting values, but four evaluations of ff per step.
  • It extends to systems and higher-order ODEs by writing them as first-order systems.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 7 marks

Explain the types of errors. An approximate value of π\pi is given by x1=3.1428571x_1 = 3.1428571 and its true value is x=3.1415926x = 3.1415926. Find the absolute and relative errors.

Answer

Types of errors

  1. Inherent error: error in the input data (from measurement or earlier approximation).
  2. Round-off error: from keeping a finite number of digits, e.g. π≈3.1416\pi\approx3.1416.
  3. Truncation error: from replacing an infinite process by a finite one, e.g. cutting a Taylor series.
  4. Absolute error: Ea=∣x−x1∣E_a=|x-x_1|.
  5. Relative error: Er=∣x−x1∣∣x∣E_r=\dfrac{|x-x_1|}{|x|}, and the percentage error is Er×100E_r\times100.

Numerical part. True value x=3.1415926x=3.1415926, approximate value x1=3.1428571x_1=3.1428571.

Ea=∣3.1415926−3.1428571∣=0.0012645E_a=|3.1415926-3.1428571|=0.0012645

Er=0.00126453.1415926=0.000403E_r=\frac{0.0012645}{3.1415926}=0.000403

The percentage error is about 0.0403%0.0403\%.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 8 marks

Write a difference between secant method and false position method. Using secant method find a root of the equation 3x+sin⁡x−ex=03x + \sin x - e^x = 0 correct to three decimal places.

Answer

Differences

Secant methodFalse position method
Needs two starting values; they need not bracket the rootNeeds two values with f(a)f(b)<0f(a)f(b)<0
Always uses the two latest points, xn−1,xnx_{n-1},x_nKeeps the end that retains opposite signs
May divergeAlways converges (bracketing is kept)
Faster, order ≈1.618\approx1.618Slower, linear order

Both use xn+1=xn−f(xn)(xn−xn−1)f(xn)−f(xn−1)x_{n+1}=x_n-\dfrac{f(x_n)(x_n-x_{n-1})}{f(x_n)-f(x_{n-1})}.

Root of f(x)=3x+sin⁡x−exf(x)=3x+\sin x-e^x. f(0)=−1f(0)=-1, f(1)=1.1232f(1)=1.1232; take x0=0, x1=1x_0=0,\ x_1=1.

nnxn−1x_{n-1}xnx_nf(xn−1)f(x_{n-1})f(xn)f(x_n)xn+1x_{n+1}
101-1.00001.12320.47099
210.470991.12320.265160.30751
30.470990.307510.26516-0.134820.36261
40.307510.36261-0.134820.005480.36046
50.362610.360460.005480.000100.36042
60.360460.360420.000100.000000.36042

The root is x≈0.360x\approx0.360.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 7 marks

The population of a town in the last six censuses was as given below. Estimate the population in the year 1946.
Year191119211931194119511961
Population (000)121520273952

Answer

1946 lies near the end of the table, so use Newton's backward formula with xn=1961x_n=1961, h=10h=10:

p=1946−196110=−1.5p=\frac{1946-1961}{10}=-1.5

Backward difference table (population in thousands)

Yearyy∇\nabla∇2\nabla^2∇3\nabla^3∇4\nabla^4∇5\nabla^5
191112
1921153
19312052
194127720
19513912533
196152131-4-7-10

y=yn+p∇yn+p(p+1)2!∇2yn+p(p+1)(p+2)3!∇3yn+p(p+1)(p+2)(p+3)4!∇4yn+p(p+1)(p+2)(p+3)(p+4)5!∇5yny=y_n+p\nabla y_n+\frac{p(p+1)}{2!}\nabla^2y_n+\frac{p(p+1)(p+2)}{3!}\nabla^3y_n+\frac{p(p+1)(p+2)(p+3)}{4!}\nabla^4y_n+\frac{p(p+1)(p+2)(p+3)(p+4)}{5!}\nabla^5y_n

=52+(−1.5)(13)+(0.375)(1)+(0.0625)(−4)+(0.0234375)(−7)+(0.0117188)(−10)=52+(-1.5)(13)+(0.375)(1)+(0.0625)(-4)+(0.0234375)(-7)+(0.0117188)(-10)

=52−19.5+0.375−0.25−0.1641−0.1172=32.344=52-19.5+0.375-0.25-0.1641-0.1172=32.344

The population in 1946 is about 32.332.3 thousand (≈32,300\approx32{,}300).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 8 marks

Solve the following equations by Gauss-Seidel Method:
27x+6y−z=8527x + 6y - z = 85 6x+15y+2z=726x + 15y + 2z = 72 x+y+54z=110x + y + 54z = 110

Answer

The system is diagonally dominant. Solve for the diagonal unknowns and always use the latest values:

x=85−6y+z27,y=72−6x−2z15,z=110−x−y54x=\frac{85-6y+z}{27},\qquad y=\frac{72-6x-2z}{15},\qquad z=\frac{110-x-y}{54}

Start with (0,0,0)(0,0,0).

Iterxxyyzz
13.148153.540741.91317
22.432173.572041.92585
32.425693.572941.92595
42.425493.573011.92595
52.425483.573021.92595

Iteration 1 example: x=85/27=3.14815x=85/27=3.14815; y=(72−6×3.14815)/15=3.54074y=(72-6\times3.14815)/15=3.54074; z=(110−3.14815−3.54074)/54=1.91317z=(110-3.14815-3.54074)/54=1.91317.

Solution: x≈2.4255, y≈3.5730, z≈1.9260x\approx2.4255,\ y\approx3.5730,\ z\approx1.9260.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 7 marks

Use power method to find the largest Eigen value and Eigen vector of the matrix given in the paper.

Answer

Taking A=[6−22−23−12−13]A=\begin{bmatrix}6&-2&2\\-2&3&-1\\2&-1&3\end{bmatrix} with initial vector v0=(1,1,1)Tv_0=(1,1,1)^T. At each step compute AvAv, take the largest component as the eigenvalue estimate λ\lambda, and divide AvAv by it.

kkAvkAv_kλ\lambdavk+1v_{k+1}
0(6,0,4)(6,0,4)6(1, 0, 0.6667)(1,\,0,\,0.6667)
1(7.3333, −2.6667, 4)(7.3333,\,-2.6667,\,4)7.3333(1, −0.3636, 0.5455)(1,\,-0.3636,\,0.5455)
2(7.8182, −3.6364, 4)(7.8182,\,-3.6364,\,4)7.8182(1, −0.4651, 0.5116)(1,\,-0.4651,\,0.5116)
3(7.9535, −3.9070, 4)(7.9535,\,-3.9070,\,4)7.9535(1, −0.4912, 0.5029)(1,\,-0.4912,\,0.5029)
4(7.9883, −3.9766, 4)(7.9883,\,-3.9766,\,4)7.9883(1, −0.4978, 0.5007)(1,\,-0.4978,\,0.5007)

The estimates converge to

λmax≈8,v≈(1, −0.5, 0.5)T\lambda_{max}\approx8,\qquad v\approx(1,\,-0.5,\,0.5)^T

Check: A(1,−0.5,0.5)T=(8,−4,4)T=8(1,−0.5,0.5)TA(1,-0.5,0.5)^T=(8,-4,4)^T=8(1,-0.5,0.5)^T.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 8 marks

Using Gauss Jordan method, find the inverse of the matrix given in the paper.

Answer

Taking A=[123014560]A=\begin{bmatrix}1&2&3\\0&1&4\\5&6&0\end{bmatrix}. Form [A ∣ I][A\,|\,I] and reduce AA to II.

[123100014010560001]\left[\begin{array}{ccc|ccc}1&2&3&1&0&0\\0&1&4&0&1&0\\5&6&0&0&0&1\end{array}\right]

R3→R3−5R1R_3\to R_3-5R_1:

[1231000140100−4−15−501]\left[\begin{array}{ccc|ccc}1&2&3&1&0&0\\0&1&4&0&1&0\\0&-4&-15&-5&0&1\end{array}\right]

R1→R1−2R2R_1\to R_1-2R_2, R3→R3+4R2R_3\to R_3+4R_2:

[10−51−20014010001−541]\left[\begin{array}{ccc|ccc}1&0&-5&1&-2&0\\0&1&4&0&1&0\\0&0&1&-5&4&1\end{array}\right]

R1→R1+5R3R_1\to R_1+5R_3, R2→R2−4R3R_2\to R_2-4R_3:

[100−2418501020−15−4001−541]\left[\begin{array}{ccc|ccc}1&0&0&-24&18&5\\0&1&0&20&-15&-4\\0&0&1&-5&4&1\end{array}\right]

A−1=[−2418520−15−4−541]A^{-1}=\begin{bmatrix}-24&18&5\\20&-15&-4\\-5&4&1\end{bmatrix}

Check: row 1 of A−1A^{-1} times column 1 of AA gives −24+0+25=1-24+0+25=1, and times column 2 gives −48+18+30=0-48+18+30=0.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 7 marks

Consider the following table showing the distance (in meters) traveled by an object at different time intervals (in seconds) (table in the paper). Using the trapezoidal and Simpson integration rule, calculate the average velocity of the bicycle over the time interval from t=0t = 0 to t=4t = 4 seconds.

Answer

Taking the table as velocity vv (m/s) measured every h=1h=1 s:

tt01234
vv0381524

The distance covered is ∫04v dt\displaystyle\int_0^4v\,dt and the average velocity is vˉ=14−0∫04v dt\bar v=\dfrac{1}{4-0}\displaystyle\int_0^4v\,dt.

Trapezoidal rule

∫04v dt≈h2[v0+v4+2(v1+v2+v3)]=12[24+2(26)]=38 m\int_0^4v\,dt\approx\frac h2\left[v_0+v_4+2(v_1+v_2+v_3)\right]=\frac12\left[24+2(26)\right]=38\ \text{m}

vˉ=384=9.5 m/s\bar v=\frac{38}{4}=9.5\ \text{m/s}

Simpson's 1/3 rule

∫04v dt≈h3[v0+v4+4(v1+v3)+2v2]=13[24+4(18)+2(8)]=1123=37.33 m\int_0^4v\,dt\approx\frac h3\left[v_0+v_4+4(v_1+v_3)+2v_2\right]=\frac13\left[24+4(18)+2(8)\right]=\frac{112}{3}=37.33\ \text{m}

vˉ=37.334=9.33 m/s\bar v=\frac{37.33}{4}=9.33\ \text{m/s}

Simpson's value is the more accurate (the data follow v=t2+2tv=t^2+2t, whose exact integral is 37.3337.33).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 7 marks

Using Euler's method, solve dydx=y+sin⁡x\dfrac{dy}{dx} = y + \sin x, with y(0)=1y(0) = 1 in the interval 0≤x≤10 \le x \le 1. Take h=0.2h = 0.2.

Answer

f(x,y)=y+sin⁡xf(x,y)=y+\sin x, x0=0, y0=1x_0=0,\ y_0=1, h=0.2h=0.2. Euler: yn+1=yn+h f(xn,yn)y_{n+1}=y_n+h\,f(x_n,y_n).

nnxnx_nyny_nf(xn,yn)f(x_n,y_n)yn+1y_{n+1}
00.01.000001.000001.20000
10.21.200001.398671.47973
20.41.479731.869151.85356
30.61.853562.418202.33720
40.82.337203.054552.94811

So y(0.2)=1.2000y(0.2)=1.2000, y(0.4)=1.4797y(0.4)=1.4797, y(0.6)=1.8536y(0.6)=1.8536, y(0.8)=2.3372y(0.8)=2.3372 and y(1.0)≈2.9481y(1.0)\approx2.9481.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 8 marks

Using RK-4 method, solve the equation for y(0.2)y(0.2). Given the second order differential equation in the paper with y(0)=0y(0) = 0, y′(0)=1y'(0) = 1, h=0.1h = 0.1.

Answer

Taking the equation as y′′=x+yy''=x+y, y(0)=0y(0)=0, y′(0)=1y'(0)=1, h=0.1h=0.1. Let y′=zy'=z, so y′=z=f1y'=z=f_1, z′=x+y=f2z'=x+y=f_2.

For each step, with slopes (not multiplied by hh):

k1=(z, x+y)k_1=(z,\ x+y), k2k_2 at (x+h2, y+h2k1y, z+h2k1z)(x+\tfrac h2,\ y+\tfrac h2k_{1y},\ z+\tfrac h2k_{1z}), and so on, then

yn+1=yn+h6(k1+2k2+2k3+k4)y_{n+1}=y_n+\tfrac h6(k_1+2k_2+2k_3+k_4)

Step 1 (x=0x=0, y=0y=0, z=1z=1): k1=(1, 0)k_1=(1,\ 0), k2=(1, 0.1)k_2=(1,\ 0.1), k3=(1.005, 0.1)k_3=(1.005,\ 0.1), k4=(1.01, 0.2005)k_4=(1.01,\ 0.2005)

y1=0+0.16(1+2+2.01+1.01)=0.10033y_1=0+\tfrac{0.1}{6}(1+2+2.01+1.01)=0.10033 z1=1+0.16(0+0.2+0.2+0.2005)=1.01001z_1=1+\tfrac{0.1}{6}(0+0.2+0.2+0.2005)=1.01001

Step 2 (x=0.1x=0.1, y=0.10033y=0.10033, z=1.01001z=1.01001): k1=(1.01001, 0.20033)k_1=(1.01001,\ 0.20033), k2=(1.02003, 0.30083)k_2=(1.02003,\ 0.30083), k3=(1.02505, 0.30133)k_3=(1.02505,\ 0.30133), k4=(1.04014, 0.40284)k_4=(1.04014,\ 0.40284)

y2=0.10033+0.16(1.01001+2.04005+2.0501+1.04014)=0.20267y_2=0.10033+\tfrac{0.1}{6}(1.01001+2.04005+2.0501+1.04014)=0.20267 z2=1.01001+0.16(0.20033+0.60167+0.60267+0.40284)=1.04013z_2=1.01001+\tfrac{0.1}{6}(0.20033+0.60167+0.60267+0.40284)=1.04013

Hence y(0.2)≈0.2027y(0.2)\approx0.2027 (and y′(0.2)≈1.0401y'(0.2)\approx1.0401). The exact solution y=2sinh⁡x−xy=2\sinh x-x gives 0.202670.20267.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 7 marks

What is boundary value problem? Derive Laplace five point formula.

Answer

Boundary value problem (BVP). A differential equation together with conditions given at more than one point (the boundary) of the domain. For example, y′′=f(x,y,y′)y''=f(x,y,y') with y(a)=α, y(b)=βy(a)=\alpha,\ y(b)=\beta, or a PDE such as Laplace's equation ∇2u=0\nabla^2u=0 in a region with uu prescribed on the boundary. (In an initial value problem all conditions are given at one point.)

Laplace five-point formula. Cover the region with a square mesh of side hh, with nodes (xi,yj)=(ih,jh)(x_i,y_j)=(ih,jh) and ui,j=u(xi,yj)u_{i,j}=u(x_i,y_j). Taylor expansion gives

ui+1,j=ui,j+hux+h22uxx+h36uxxx+…u_{i+1,j}=u_{i,j}+hu_x+\frac{h^2}{2}u_{xx}+\frac{h^3}{6}u_{xxx}+\dots ui−1,j=ui,j−hux+h22uxx−h36uxxx+…u_{i-1,j}=u_{i,j}-hu_x+\frac{h^2}{2}u_{xx}-\frac{h^3}{6}u_{xxx}+\dots

Adding: ui+1,j+ui−1,j=2ui,j+h2uxx+O(h4)u_{i+1,j}+u_{i-1,j}=2u_{i,j}+h^2u_{xx}+O(h^4), so

uxx≈ui+1,j−2ui,j+ui−1,jh2u_{xx}\approx\frac{u_{i+1,j}-2u_{i,j}+u_{i-1,j}}{h^2}

Similarly

uyy≈ui,j+1−2ui,j+ui,j−1h2u_{yy}\approx\frac{u_{i,j+1}-2u_{i,j}+u_{i,j-1}}{h^2}

Substituting into uxx+uyy=0u_{xx}+u_{yy}=0:

ui+1,j+ui−1,j+ui,j+1+ui,j−1−4ui,j=0u_{i+1,j}+u_{i-1,j}+u_{i,j+1}+u_{i,j-1}-4u_{i,j}=0

ui,j=14[ui+1,j+ui−1,j+ui,j+1+ui,j−1]\boxed{u_{i,j}=\frac14\left[u_{i+1,j}+u_{i-1,j}+u_{i,j+1}+u_{i,j-1}\right]}

So the value at an interior node is the average of its four neighbours. Writing this for every interior node gives a linear system, solved by Gauss-Seidel or Liebmann's iteration.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 8 marks

Use the Bisection Method to compute a root of the equation: xex=cos⁡xxe^x = \cos x correct to 4 decimal places.

Answer

Let f(x)=xex−cos⁡xf(x) = xe^x - \cos x.

Step 1: Locate the root.

f(0)=0−1=−1<0f(0) = 0 - 1 = -1 < 0 and f(1)=2.71828−0.54030=2.17798>0f(1) = 2.71828 - 0.54030 = 2.17798 > 0, so a root lies in (0,1)(0, 1).

Step 2: Bisection. Use c=a+b2c = \dfrac{a+b}{2} and keep the half where the sign changes.

nabcf(c)
1010.5−0.05322-0.05322
20.510.75+0.85606+0.85606
30.50.750.625+0.35669+0.35669
40.50.6250.5625+0.14129+0.14129
50.50.56250.53125+0.04151+0.04151
60.50.531250.515625−0.00648-0.00648
70.5156250.531250.523438+0.01736+0.01736
80.5156250.5234380.519531+0.00540+0.00540
90.5156250.5195310.517578−0.00055-0.00055
100.5175780.5195310.518555+0.00243+0.00243
110.5175780.5185550.518066+0.00094+0.00094
120.5175780.5180660.517822+0.00020+0.00020
130.5175780.5178220.517700−0.00017-0.00017
140.5177000.5178220.517761+0.00001+0.00001

After 14 iterations the root lies in (0.517700, 0.517761)(0.517700,\ 0.517761), and both ends round to 0.51770.5177.

Root ≈0.5177\approx 0.5177 (correct to 4 decimal places).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 5 marks

Write short notes on: Ill conditioned system with an example

Answer

Ill-conditioned system. A system of linear equations Ax=bAx = b is ill-conditioned if a very small change (or rounding error) in the coefficients or the right-hand side produces a large change in the solution. The matrix AA is nearly singular, so its determinant is close to zero and its condition number κ(A)=∥A∥ ∥A−1∥\kappa(A) = \|A\|\,\|A^{-1}\| is very large. If the solution is stable under small changes, the system is well-conditioned.

Example.

x+y=2,x+1.0001y=2.0001x + y = 2,\qquad x + 1.0001y = 2.0001

Subtracting gives 0.0001y=0.00010.0001y = 0.0001, so y=1y = 1 and x=1x = 1.

Now change the right-hand side slightly to 2.00022.0002:

x+y=2,x+1.0001y=2.0002x + y = 2,\qquad x + 1.0001y = 2.0002

Then 0.0001y=0.00020.0001y = 0.0002, so y=2y = 2 and x=0x = 0.

A change of only 0.00010.0001 in one constant changed the solution from (1,1)(1, 1) to (0,2)(0, 2). The two lines are almost parallel (det⁡A=0.0001\det A = 0.0001), so the system is ill-conditioned.

Consequences. Numerical methods such as Gauss elimination give unreliable answers because round-off errors are magnified. Remedies include pivoting, higher-precision arithmetic, and iterative refinement.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 5 marks

Write short notes on: SOR method

Answer

Successive Over-Relaxation (SOR) is an iterative method for solving Ax=bAx = b. It improves the Gauss-Seidel method by adding a relaxation factor ω\omega to speed up convergence.

For the system ∑jaijxj=bi\sum_j a_{ij}x_j = b_i, the SOR update is

xi(k+1)=(1−ω) xi(k)+ωaii(bi−∑j<iaijxj(k+1)−∑j>iaijxj(k))x_i^{(k+1)} = (1-\omega)\,x_i^{(k)} + \frac{\omega}{a_{ii}}\left(b_i - \sum_{j<i} a_{ij}x_j^{(k+1)} - \sum_{j>i} a_{ij}x_j^{(k)}\right)

Equivalently, xi(k+1)=xi(k)+ω (xiGS−xi(k))x_i^{(k+1)} = x_i^{(k)} + \omega\,(x_i^{GS} - x_i^{(k)}), where xiGSx_i^{GS} is the Gauss-Seidel value.

Role of ω\omega (relaxation factor):

  • ω=1\omega = 1 gives exactly the Gauss-Seidel method.
  • 0<ω<10 < \omega < 1 is under-relaxation. It is used to make a non-convergent or oscillating iteration converge.
  • 1<ω<21 < \omega < 2 is over-relaxation. It is used to accelerate a slowly converging iteration.
  • The method converges only for 0<ω<20 < \omega < 2 (for symmetric positive definite AA, it converges for every such ω\omega).

Features: It needs few extra operations compared with Gauss-Seidel. It is well suited to large sparse systems, for example those arising from finite-difference solutions of Laplace and Poisson equations. A good choice of ω\omega can reduce the number of iterations a lot.

Steps: (1) Make AA diagonally dominant if possible. (2) Choose ω\omega and an initial guess x(0)x^{(0)}. (3) Apply the update for i=1,…,ni = 1, \dots, n using the newest values. (4) Stop when max⁡i∣xi(k+1)−xi(k)∣\max_i |x_i^{(k+1)} - x_i^{(k)}| is less than the tolerance.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 Spring · 5 marks

Write short notes on: Elliptical equation

Answer

Elliptic equation. A second-order partial differential equation

A uxx+B uxy+C uyy+⋯=0A\,u_{xx} + B\,u_{xy} + C\,u_{yy} + \dots = 0

is elliptic if B2−4AC<0B^2 - 4AC < 0. Elliptic equations describe steady-state (time-independent) problems and are solved over a region with boundary conditions given on the whole boundary.

Standard examples:

  • Laplace equation: ∇2u=uxx+uyy=0\nabla^2 u = u_{xx} + u_{yy} = 0 (here B2−4AC=−4<0B^2-4AC = -4 < 0).
  • Poisson equation: ∇2u=uxx+uyy=f(x,y)\nabla^2 u = u_{xx} + u_{yy} = f(x, y).

Numerical (finite-difference) solution. Divide the region into a square mesh of step hh. Replacing the derivatives by central differences,

uxx≈ui+1,j−2ui,j+ui−1,jh2,uyy≈ui,j+1−2ui,j+ui,j−1h2u_{xx} \approx \frac{u_{i+1,j} - 2u_{i,j} + u_{i-1,j}}{h^2},\qquad u_{yy} \approx \frac{u_{i,j+1} - 2u_{i,j} + u_{i,j-1}}{h^2}

the Laplace equation becomes the five-point formula

ui,j=14(ui+1,j+ui−1,j+ui,j+1+ui,j−1)u_{i,j} = \frac{1}{4}\left(u_{i+1,j} + u_{i-1,j} + u_{i,j+1} + u_{i,j-1}\right)

and the Poisson equation becomes ui,j=14(ui+1,j+ui−1,j+ui,j+1+ui,j−1−h2fi,j)u_{i,j} = \frac14\left(u_{i+1,j} + u_{i-1,j} + u_{i,j+1} + u_{i,j-1} - h^2 f_{i,j}\right).

Each interior point is the average of its four neighbours. Writing this for all interior points gives a linear system, solved by the Jacobi, Gauss-Seidel (Liebmann) or SOR iteration. Boundary values are fixed by the given boundary conditions (Dirichlet problem).

Applications: steady heat conduction, electrostatic potential, and fluid flow.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

Questions from PU BCA 2025 Spring Numerical Methods (Pokhara University BCA, Spring 2025), PU BCA 2024 Spring Numerical Methods (Pokhara University BCA, Spring 2024), PU BCA 2023 Spring Numerical Methods (Pokhara University BCA, Spring 2023), PU BCA 2025 Spring Mathematical Foundation of Computer Science (Pokhara University BCA, Spring 2025), PU BCA 2024 Fall Mathematical Foundation of Computer Science (Pokhara University BCA, Fall 2024), PU BCA 2024 Spring Mathematical Foundation of Computer Science (Pokhara University BCA, Spring 2024), PU BCA 2023 Spring Mathematical Foundation of Computer Science (Pokhara University BCA, Spring 2023) and PU BCA 2025 Spring Data Communication and Computer Network (Pokhara University BCA, Spring 2025). Answers are written for this site; check them against your class notes.