CONMP · Question paper

CET-1 · 22 Aug 2025

Computer Oriented Numerical Methods with Python (S2320C1) · Continuous Evaluation Test 1 · 22 August 2025 · 30 marks · 10:30 am – 12:00 pm ITM (SLS) Baroda University · B.Tech all branches, odd semester 2025-26 · Semester 3. Non-programmable calculator allowed. Questions transcribed from the original paper. Solutions are written by CampusLoop and every number was checked by computer; check the method against your class notes.

Q1 (A). Select the correct option [3]

1. The convergence of which of the following methods is prone to the starting value? (a) Regula-Falsi · (b) Newton-Raphson · (c) Bisection · (d) all Answer: (b) Newton-Raphson. Bisection and Regula-Falsi always converge once a sign-change interval is chosen; Newton-Raphson may diverge from a poor x₀ or where f′(x) ≈ 0.

2. If a number is correct to n significant digits, then the relative error is: (a) ½·10ⁿ · (b) ½·10ⁿ⁻¹ · (c) ≤ ½·10⁻ⁿ · (d) < ½·10⁻ⁿ⁺¹ Answer: (d) relative error < ½ × 10⁻ⁿ⁺¹ (i.e. 1/(2·10ⁿ⁻¹)).

3. In the successive approximation method, for rapid convergence the value of φ′(x) should be: (a) larger than 1 · (b) smaller than 1 · (c) zero · (d) can have any value Answer: (b) |φ′(x)| < 1 is required for convergence, and the smaller it is, the faster the convergence.

Q1 (B). Do as directed [3]

1. If the permissible error is ε, the approximate number of iterations n needed for the bisection method? After n halvings the interval length is (b − a)/2ⁿ. We need (b − a)/2ⁿ ≤ ε, so n ≥ [log(b − a) − log ε] / log 2.

2. Rate of convergence of (a) Newton-Raphson (b) Secant method. (a) Newton-Raphson: quadratic (order 2). (b) Secant: superlinear, order ≈ 1.618 (the golden ratio).

3. Which method is also known as the method of tangents? State its iterative formula. Newton-Raphson method: xₙ₊₁ = xₙ − f(xₙ)/f′(xₙ), n = 0, 1, 2, …

Q2. Attempt any three [9]

Q2(a) Derive the iterative formula for the Newton-Raphson method.

Let x₀ be an approximation to a root of f(x) = 0 and let x₁ = x₀ + h be the exact root, so f(x₀ + h) = 0. Expand by Taylor's series:

f(x₀ + h) = f(x₀) + h f′(x₀) + (h²/2!) f″(x₀) + … = 0

Since h is small, neglect h² and higher powers: f(x₀) + h f′(x₀) = 0, so h = −f(x₀)/f′(x₀) (f′(x₀) ≠ 0).

Hence x₁ = x₀ − f(x₀)/f′(x₀), and in general

xₙ₊₁ = xₙ − f(xₙ)/f′(xₙ), n = 0, 1, 2, …

Geometrically, xₙ₊₁ is where the tangent to y = f(x) at (xₙ, f(xₙ)) cuts the x-axis, hence "method of tangents".

Q2(b) List the rules for estimating errors.

  1. Absolute error: Eₐ = |X − X₁| (true value X, approximate value X₁).
  2. Relative error: Eᵣ = |X − X₁| / |X|; percentage error Eₚ = 100 · Eᵣ.
  3. If a number is rounded to n decimal places, the absolute error ≤ ½ × 10⁻ⁿ.
  4. If a number is correct to n significant digits, the relative error < ½ × 10⁻ⁿ⁺¹.
  5. Addition/subtraction: the absolute error of a sum or difference ≤ the sum of the absolute errors: δ(X ± Y) ≤ δX + δY.
  6. Multiplication/division: the relative error of a product or quotient ≤ the sum of the relative errors: δ(XY)/(XY) ≤ δX/X + δY/Y.
  7. General formula: for u = f(x₁, …, xₙ), δu ≈ Σ |∂f/∂xᵢ| δxᵢ; for u = xᵐ, δu/u = m·δx/x.

Q2(c) Find a real root of x³ − x − 1 = 0 correct to three decimal places by successive approximations.

f(1) = −1 < 0 and f(2) = 5 > 0, so a root lies in (1, 2). Write x = φ(x) = (1 + x)^(1/3). φ′(x) = (1/3)(1 + x)^(−2/3) < 1 on (1, 2), so the iteration converges. Take x₀ = 1.5:

nxₙxₙ₊₁ = (1 + xₙ)^(1/3)
01.500001.35721
11.357211.33086
21.330861.32588
31.325881.32494
41.324941.32476

The last two values agree to three decimals: x ≈ 1.325 (exact root 1.32472).

Q2(d) Percentage error (i) 625.483 approximated to three significant figures (ii) 75462 rounded off to four significant digits.

(i) 625.483 → 625. Error = 0.483. Percentage error = 0.483/625.483 × 100 = 0.0772 %. (ii) 75462 → 75460. Error = 2. Percentage error = 2/75462 × 100 = 0.00265 %.

Q3. Attempt any three [15]

Q3(a) Find the fourth root of 32 correct to four significant digits by the secant method.

Solve f(x) = x⁴ − 32 = 0; f(2) = −16, f(3) = 49. Take x₀ = 2, x₁ = 3 and xₙ₊₁ = xₙ − f(xₙ)(xₙ − xₙ₋₁)/(f(xₙ) − f(xₙ₋₁)):

nxₙ₋₁xₙxₙ₊₁f(xₙ₊₁)
12.000003.000002.24615−6.54589
23.000002.246152.33499−2.27365
32.246152.334992.38227+0.20806
42.334992.382272.37831−0.00576
52.382272.378312.37841−0.00001

⁴√32 ≈ 2.378 (to four significant digits; exact 2.37841).

Q3(b) Using the false position method, find a positive root of 4e⁻ˣ sin x − 1 = 0 correct to three decimal places.

f(0) = −1, f(0.5) = 4e⁻⁰·⁵ sin 0.5 − 1 = 0.16253 > 0, so the smallest positive root lies in (0, 0.5). Formula x = [a f(b) − b f(a)]/[f(b) − f(a)]:

nabxf(x)
10.000000.500000.42987+0.08455
20.000000.429870.39636+0.03892
30.000000.396360.38151+0.01693
40.000000.381510.37516+0.00719
50.000000.375160.37248+0.00302
60.000000.372480.37136+0.00126
70.000000.371360.37089+0.00053

Successive values now agree to three decimals: x ≈ 0.371 (exact 0.37056). (The equation has another positive root near 1.365 in (1, 1.5); either is accepted if worked correctly.)

Q3(c) Obtain a positive root of x³ − x = 11 by the bisection method correct to four significant digits.

f(x) = x³ − x − 11; f(2) = −5, f(3) = 13, so the root is in (2, 3).

nabmf(m)
12.000003.000002.50000+2.12500
22.000002.500002.25000−1.85938
32.250002.500002.37500+0.02148
42.250002.375002.31250−0.94604
52.312502.375002.34375−0.46915
62.343752.375002.35938−0.22556
72.359382.375002.36719−0.10247
82.367192.375002.37109−0.04060
92.371092.375002.37305−0.00959
102.373052.375002.37402+0.00594
112.373052.374022.37354−0.00182
122.373542.374022.37378+0.00206
132.373542.373782.37366+0.00012
142.373542.373662.37360−0.00085

The interval is now (2.3736, 2.3737): x ≈ 2.374 to four significant digits (exact 2.37363).

Q3(d) Find a real root of x log₁₀ x = 1.2 to a tolerance of 0.01 % using Newton-Raphson.

f(x) = x log₁₀ x − 1.2; f′(x) = log₁₀ x + log₁₀ e = log₁₀ x + 0.434294. f(2) = −0.598, f(3) = 0.231, so the root is in (2, 3); take x₀ = 2.5.

nxₙf(xₙ)f′(xₙ)xₙ₊₁relative change
02.500000−0.2051500.8322342.7465058.975 %
12.746505+0.0051130.8730752.7406490.214 %
22.740649+0.0000030.8721482.7406460.0001 %

The relative change is now below 0.01 %: x ≈ 2.7406.