Numerical Analysis and Statistical Techniques
Comprehensive exam revision notes for BCA-203N Unit 1 (Mathematical Modeling, Errors & Taylor Series). Includes Section A (2M), Section B (5M), and Section C (15M) questions, answers, and diagrams.
Numerical Analysis and Statistical Techniques
Mathematical Modeling, Errors & Taylor Series
Core Definitions & Key Concepts
Mathematical Modeling in computer science
Mathematical modeling is the formulation of a physical, engineering, or computational problem into a system of mathematical equations (algebraic, differential, statistical) that can be solved numerically by digital computers.
What is the difference between Inherent Error and Round-off Error
- Inherent (Data) Error: Errors present in the raw input data itself due to measurement limitations or human entry.
- Round-off Error: Errors introduced by the digital computer due to its finite word length representation (e.g., storing 1/3 as 0.333333).
Absolute Error, Relative Error, and Percentage Error
Let X be the true value and X' be the approximate value:
- Absolute Error ($E_a$): |X - X'|
- Relative Error ($E_r$): \frac{|X - X'|}{|X|}
- Percentage Error ($E_p$): E_r × 100\%
What is Truncation Error in numerical computing
Truncation error arises when an infinite mathematical process is approximated by a finite sequence of operations (e.g., truncating an infinite Taylor series after a finite number of terms).
State Taylor's Theorem with Remainder
If f(x) is (n+1)-times continuously differentiable in [a, b], then: $f(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \dots + \frac{f^{(n)}(a)}{n!}(x-a)^n + R_n(x) where R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1} for some \xi \in (a, x)$ (Lagrange Remainder).
What is the Maclaurin Series
A Maclaurin series is simply a Taylor series expanded about the origin a = 0: $f(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \dots$
Catastrophic Cancellation in floating-point arithmetic
When two nearly equal numbers are subtracted (e.g., 1.0000000001 - 1.0000000000), the leading significant digits cancel out, resulting in a dramatic loss of precision, leaving only noise and round-off error in the result.
What is Machine Epsilon (Unit Roundoff)
Machine epsilon (\epsilon_{mach}) is the smallest positive floating-point number \epsilon such that 1.0 + \epsilon > 1.0 in the computer's floating-point system, characterizing the upper bound on relative rounding error.
What is the error propagation rule for a product u = x \cdot y
The relative error in a product equals the sum of the relative errors of its components: \frac{\Delta u}{u} ≈ \frac{\Delta x}{x} + \frac{\Delta y}{y}.
An 'Ill-Conditioned' problem
A problem is ill-conditioned if a small perturbation or error in the input data leads to a disproportionately large change in the output solution (high condition number \kappa > 1000).
Conceptual & Architectural Analysis
The Interplay between Truncation Error and Round-Off Error with Step Size h
In numerical differentiation and integration, total numerical error is the sum of mathematical truncation error and computational round-off error:
Error |
| Total Error
| \ /
| \ / <-- Truncation Error O(h^p)
| \___/
| / \ <-- Round-off Error O(eps/h)
+---------------------------> Step Size (h)
Optimal h*- As step size h decreases, Truncation Error decreases according to O(h^p).
- However, smaller h requires vastly more arithmetic operations, causing accumulated Round-Off Error to explode as O(\epsilon/h).
- The minimum total error occurs at the *optimal step size $h^$** where both error curves intersect.
State and Derive the General Error Propagation Formula for u = f(x_1, x_2, \dots, x_n)
Using Taylor's first-order expansion in multiple variables: $\Delta u ≈ \frac{\partial f}{\partial x_1}\Delta x_1 + \frac{\partial f}{\partial x_2}\Delta x_2 + \dots + \frac{\partial f}{\partial x_n}\Delta x_n In the worst-case scenario, errors may combine additively: (\Delta u)_{\max} ≤ \sum_{i=1}^n ≤ft|\frac{\partial f}{\partial x_i}\right| \Delta x_i Relative error is obtained by dividing by u: ≤ft(\frac{\Delta u}{u}\right)_{\max} ≤ \sum_{i=1}^n ≤ft|\frac{\partial \ln f}{\partial x_i}\right| \Delta x_i$
Floating-Point Number Representation according to the IEEE 754 Standard
Real numbers are stored in normalized scientific notation: \pm m × 2^{e - bias}
- Single Precision (32-bit):
- 1 sign bit (0 = positive, 1 = negative)
- 8 exponent bits (biased by 127)
- 23 mantissa/fraction bits (~7 decimal digits of precision)
- Double Precision (64-bit):
- 1 sign bit
- 11 exponent bits (biased by 1023)
- 52 mantissa bits (~16 decimal digits of precision)
Expand f(x) = e^x using Maclaurin series and estimate the error when x = 0.2 using 4 terms
Maclaurin expansion of e^x: $e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \dots Using 4 terms: e^{0.2} \approx 1 + 0.2 + \frac{0.04}{2} + \frac{0.008}{6} = 1 + 0.2 + 0.02 + 0.001333 = 1.221333. Remainder error bound by Lagrange form: |R_3(0.2)| \le \frac{e^{0.2}}{4!} (0.2)^4 \le \frac{1.3}{24} (0.0016) \approx 0.0000867$.
Discuss Significant Figures and Rules for Rounding Off
Significant Figure Rules:
- All non-zero digits are significant.
- Zeros between non-zero digits are significant (405 has 3).
- Leading zeros are NOT significant (0.0045 has 2).
- Trailing zeros after decimal point are significant (4.500 has 4).
Round-to-Even (Banker's Rule): When the digit to drop is exactly 5 followed by zeros, round to the nearest even number (4.755 \to 4.76, 4.745 \to 4.74) to avoid systematic upward bias.
In-Depth Analysis & Implementation
Perform Comprehensive Error Analysis on Calculating the Volume of a Cylinder V = \pi r^2 h with Measured Tolerances
Problem Formulation: Let radius r = 2.0 \pm 0.02 cm and height h = 10.0 \pm 0.05 cm. Find the calculated volume, the maximum absolute error, and the percentage error.
Step 1: Nominal Volume Calculation $V = \pi r^2 h = \pi (2.0)^2 (10.0) = 40\pi ≈ 125.6637 cm^3$
Step 2: Partial Derivatives $\frac{\partial V}{\partial r} = 2\pi r h = 2\pi (2.0)(10.0) = 40\pi ≈ 125.66 \frac{\partial V}{\partial h} = \pi r^2 = \pi (2.0)^2 = 4\pi ≈ 12.57$
Step 3: Maximum Absolute Error $\Delta V ≈ ≤ft|\frac{\partial V}{\partial r}\right| \Delta r + ≤ft|\frac{\partial V}{\partial h}\right| \Delta h = (40\pi)(0.02) + (4\pi)(0.05) = 0.8\pi + 0.2\pi = 1.0\pi ≈ 3.1416 cm^3$
Step 4: Relative and Percentage Error $\frac{\Delta V}{V} = \frac{1.0\pi}{40\pi} = \frac{1}{40} = 0.025 Percentage Error = 0.025 × 100\% = 2.5\%$
Conclusion: The calculated volume is V = 125.66 \pm 3.14 cm^3, with an overall relative error bound of 2.5\%.
Derive Taylor's Series Formula and Prove the Lagrange Form of the Remainder Term
1. Statement
Let f: [a, b] \to \mathbb{R} have continuous derivatives up to order n on [a, b] and f^{(n+1)} exist on (a, b). Then for any x \in [a, b]: $f(x) = P_n(x) + R_n(x) where Pn(x) = \sum{k=0}^n \frac{f^{(k)}(a)}{k!}(x - a)^k is the n$-th degree Taylor polynomial.
2. Proof using Rolle's Theorem
Define an auxiliary function F(t) on [a, x]: $F(t) = f(x) - f(t) - (x - t)f'(t) - \frac{(x - t)^2}{2!}f''(t) - \dots - \frac{(x - t)^n}{n!}f^{(n)}(t) - A(x - t)^{n+1} Choose constant A such that F(a) = 0. Note that F(x) = 0. Since F(t) is continuous on [a, x] and differentiable on (a, x) with F(a) = F(x) = 0, by **Rolle's Theorem** there exists \xi \in (a, x) such that F'(\xi) = 0$.
Differentiating F(t) using product rule causes intermediate terms to cancel out telescopically: $F'(t) = -\frac{(x - t)^n}{n!}f^{(n+1)}(t) + (n+1)A(x - t)^n Setting F'(\xi) = 0: -\frac{(x - \xi)^n}{n!}f^{(n+1)}(\xi) + (n+1)A(x - \xi)^n = 0 \implies A = \frac{f^{(n+1)}(\xi)}{(n+1)!} Since F(a) = 0, substituting A into F(a) yields: R_n(x) = A(x - a)^{n+1} = \frac{f^{(n+1)}(\xi)}{(n+1)!}(x - a)^{n+1} \quad Q.E.D.
Methods for Mitigating Floating-Point Arithmetic Instabilities (Cancellation, Underflow, and Pivot Scaling)
1. Rewriting Formulas to Eliminate Cancellation
- Roots of Quadratic Equation: Standard formula x_1 = \frac{-b + \sqrt{b^2 - 4ac}}{2a} suffers catastrophic cancellation when b > 0 and b^2 \gg 4ac. Remedy: compute x_1 = \frac{-2c}{b + \sqrt{b^2 - 4ac}} using algebraic conjugation.
- Trigonometric Small Angles: 1 - \cos x cancels when x ≈ 0. Remedy: substitute 2\sin^2(x/2).
2. Guard Digits and Compensated Summation
Kahan's Summation Algorithm tracks small low-order lost bits in a compensation accumulator during long running sums, reducing error growth from O(n\epsilon) to O(2\epsilon).
Important Exam Points & Quick Revision
Taylor series expansion derivation and the error propagation formula for u = f(x,y,z) are core 10/15 mark exam questions. Memorize the absolute, relative, and percentage error definitions.
100% left on this page — finishing it closes the gap for Mathematical Modeling, Errors & Taylor Series.
Mathematical Modeling, Errors & Taylor Series still counts as a weak topic until you finish this note and answer its questions.
Practise this unitTest Your Understanding
Now that you've read through these notes, practice unit MCQs to identify weak points and solidify your learning before exams.