NM
BCA-5004: Unit V
Differential Equations
🏠
Subject: BCA-5004 ⭐ RK4 & Picard 10-Mark Questions Day 5 Priority

Unit V: Numerical Solution of ODEs

Initial Value Problems, Euler's Method, Modified Euler's Method, Picard's Successive Approximations, and Runge-Kutta 4th Order Method (RK4).

1. Initial Value Problems & Method Classifications
⭐ CSJMU PYQs: 2024–25, 2021, 2018 (Single-step vs Multi-step methods, Local vs Global error)
🎯 Learning Objectives:
  • Define an Initial Value Problem (IVP) of first order: $\frac{dy}{dx} = f(x, y)$ subject to $y(x_0) = y_0$.
  • Distinguish Single-Step methods (Euler, RK4) from Multi-Step Predictor-Corrector methods (Milne, Adams).
  • Contrast Local Truncation Error $O(h^{p+1})$ with Global Accumulated Error $O(h^p)$.
💡 Conceptual Intuition: Why Do Numerical ODE Solvers Exist When We Know Calculus?
In basic calculus, you learn to solve simple differential equations like $\frac{dy}{dx} = 2x \implies y = x^2 + C$. But in real-world aerodynamics, robotics, and financial modeling, equations like $\frac{dy}{dx} = x^2 + \sin(xy)$ have no closed-form analytical solution! We cannot find a neat mathematical formula.
Numerical methods march along the curve step-by-step ($x_0 \to x_1 \to x_2 \dots$), computing the slope at each instant to trace out the exact numerical trajectory with extraordinary accuracy!
Evaluation Parameter Single-Step Methods (Euler, Modified Euler, RK4) Multi-Step Methods (Milne-Simpson, Adams-Bashforth)
Information Required Computes $y_{n+1}$ using information strictly from the single immediately preceding point $(x_n, y_n)$. Computes $y_{n+1}$ using information from several preceding historical points: $(x_n, y_n), (x_{n-1}, y_{n-1}), \dots, (x_{n-3}, y_{n-3})$.
Self-Starting Ability Self-starting; can begin immediately with only the single initial condition $(x_0, y_0)$. Cannot self-start; requires a single-step method (like RK4) to generate the first 3 or 4 starting points!
Step Size Changing Very easy to dynamically double or halve step size $h$ adaptively. Extremely difficult to change step size $h$ midway without re-starting.
Function Evaluations Requires multiple slope evaluations per step (e.g. RK4 requires 4 function evaluations per step). Requires fewer new function evaluations per step because past values are reused from memory.
2. Taylor's Series Method for ODEs
⭐ CSJMU PYQs: 2024–25, 2022, 2019 (Taylor series method derivation and 10-mark solved problem)

Taylor's series expresses the solution $y(x)$ in the neighborhood of $x_0$ as an infinite power series expansion:

Taylor Series Expansion Formula:
$$y(x) = y_0 + (x - x_0) y_0' + \frac{(x - x_0)^2}{2!} y_0'' + \frac{(x - x_0)^3}{3!} y_0''' + \frac{(x - x_0)^4}{4!} y_0^{(iv)} + \dots$$ where higher derivatives are obtained by successive implicit differentiation of $y' = f(x, y)$ with respect to $x$: $$y'' = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y} y', \quad y''' = \frac{d}{dx}(y''), \quad \dots$$
📝 Master Solved University Problem (Taylor Series):
Solve $\frac{dy}{dx} = x^2 + y$ with initial condition $y(0) = 1$. Use Taylor's series up to the fourth-degree term to compute $y(0.1)$ correct to 4 decimal places.
Step 1: Compute Derivatives at $(x_0, y_0) = (0, 1)$:
• $y' = x^2 + y \implies y_0' = 0^2 + 1 = \mathbf{1}$
• $y'' = \frac{d}{dx}(x^2 + y) = 2x + y' \implies y_0'' = 2(0) + 1 = \mathbf{1}$
• $y''' = \frac{d}{dx}(2x + y') = 2 + y'' \implies y_0''' = 2 + 1 = \mathbf{3}$
• $y^{(iv)} = \frac{d}{dx}(2 + y'') = y''' \implies y_0^{(iv)} = \mathbf{3}$
Step 2: Construct Taylor Polynomial ($x_0 = 0$):
$$y(x) = 1 + x(1) + \frac{x^2}{2}(1) + \frac{x^3}{6}(3) + \frac{x^4}{24}(3)$$ $$y(x) = 1 + x + \frac{x^2}{2} + \frac{x^3}{2} + \frac{x^4}{8}$$
Step 3: Evaluate at $x = 0.1$:
$$y(0.1) = 1 + 0.1 + \frac{0.01}{2} + \frac{0.001}{2} + \frac{0.0001}{8}$$ $$y(0.1) = 1 + 0.1 + 0.005 + 0.0005 + 0.0000125 = \mathbf{1.1055}$$
3. Euler's Method & Modified Euler's (Heun's) Method
⭐ CSJMU PYQs: 2025–26, 2023–24, 2020, 2017 (Modified Euler derivation, predictor-corrector algorithm & numerical)
⚡ Essential Pass Content
1. Standard Euler's Method (First Order, $O(h)$ Global Error):
$$y_{n+1} = y_n + h \cdot f(x_n, y_n)$$ Limitation: Approximates curve by tangent at the start of interval. Error grows linearly with step size $h$.

2. Modified Euler's (Heun's) Predictor-Corrector Method (Second Order, $O(h^2)$ Global Error):
• Predictor Step: Predicts preliminary value $y_{n+1}^*$ using standard Euler:
$$y_{n+1}^* = y_n + h \cdot f(x_n, y_n)$$ • Corrector Step: Refines value using average of slopes at interval endpoints (Trapezoidal slope):
$$y_{n+1} = y_n + \frac{h}{2} \Big[ f(x_n, y_n) + f\big(x_{n+1}, y_{n+1}^*\big) \Big]$$
📝 Master Solved University Problem (Modified Euler):
Solve $\frac{dy}{dx} = x + y$ with $y(0) = 1$. Find $y(0.1)$ using Modified Euler's method with step size $h = 0.1$.
Given: $f(x, y) = x + y$, $x_0 = 0, y_0 = 1, h = 0.1 \implies x_1 = 0.1$.
Step 1: Predictor Step (Standard Euler):
$$f(x_0, y_0) = 0 + 1 = 1$$ $$y_1^* = y_0 + h \cdot f(x_0, y_0) = 1 + (0.1)(1) = \mathbf{1.1000}$$
Step 2: Corrector Step:
Evaluate slope at predicted endpoint: $f(x_1, y_1^*) = f(0.1, 1.10) = 0.1 + 1.10 = \mathbf{1.2000}$
Compute average slope and corrected $y_1$:
$$y_1 = y_0 + \frac{h}{2} \Big[ f(x_0, y_0) + f(x_1, y_1^*) \Big] = 1 + \frac{0.1}{2} [1.0000 + 1.2000]$$ $$y_1 = 1 + 0.05 \times 2.2000 = 1 + 0.1100 = \mathbf{1.1100}$$ Notice: Pure Euler gave $1.1000$, whereas Modified Euler gives $1.1100$ (much closer to the true analytical value $1.11034$!).
4. Picard's Method of Successive Approximations
⭐ CSJMU PYQs: 2024–25, 2022, 2018 (Derivation and successive integral approximations)
⚡ Essential Pass Content

Picard's method transforms the differential equation $\frac{dy}{dx} = f(x, y)$ into an equivalent Volterra Integral Equation:

Picard's Iterative Integral Scheme:
$$y^{(k+1)}(x) = y_0 + \int_{x_0}^x f\Big(t, y^{(k)}(t)\Big) \, dt$$ Starting with the 0th approximation: $y^{(0)}(x) = y_0$ (constant).
📝 Master Solved University Problem (Picard's Method):
Given $\frac{dy}{dx} = x + y^2$ with $y(0) = 1$, obtain the first two successive approximations.
Initial Starting Values: $x_0 = 0, y_0 = 1$. Let $y^{(0)}(x) = 1$.
First Approximation $y^{(1)}(x)$:
$$y^{(1)}(x) = 1 + \int_0^x \Big[ t + (y^{(0)})^2 \Big] dt = 1 + \int_0^x (t + 1^2) dt = 1 + \left[ \frac{t^2}{2} + t \right]_0^x = \mathbf{1 + x + \frac{x^2}{2}}$$
Second Approximation $y^{(2)}(x)$:
Substitute $y^{(1)}(t) = 1 + t + \frac{t^2}{2}$ into $f(t, y) = t + y^2$:
$$(y^{(1)})^2 = \left(1 + t + \frac{t^2}{2}\right)^2 = 1 + 2t + 2t^2 + t^3 + \frac{t^4}{4}$$ $$y^{(2)}(x) = 1 + \int_0^x \left[ t + 1 + 2t + 2t^2 + t^3 + \frac{t^4}{4} \right] dt = 1 + \int_0^x \left( 1 + 3t + 2t^2 + t^3 + \frac{t^4}{4} \right) dt$$ $$y^{(2)}(x) = 1 + \left[ t + \frac{3t^2}{2} + \frac{2t^3}{3} + \frac{t^4}{4} + \frac{t^5}{20} \right]_0^x = \mathbf{1 + x + \frac{3x^2}{2} + \frac{2x^3}{3} + \frac{x^4}{4} + \frac{x^5}{20}}$$
5. Runge-Kutta 4th Order Method (RK4)
⭐ CSJMU PYQs: 2025–26, 2023–24, 2021, 2019, 2015 (Repeatedly asked for 10 marks — Highest Examination Weightage!)
⚡ Essential Pass Content
The RK4 Mathematical Formulas:
$$\begin{aligned} k_1 &= h \cdot f(x_0, y_0) \\ k_2 &= h \cdot f\left( x_0 + \frac{h}{2}, y_0 + \frac{k_1}{2} \right) \\ k_3 &= h \cdot f\left( x_0 + \frac{h}{2}, y_0 + \frac{k_2}{2} \right) \\ k_4 &= h \cdot f( x_0 + h, y_0 + k_3 ) \\ \Delta y &= \frac{1}{6} \Big( k_1 + 2k_2 + 2k_3 + k_4 \Big) \\ y(x_0 + h) &= y_0 + \Delta y \end{aligned}$$ Why RK4 is Supreme: It achieves fourth-order accuracy ($O(h^4)$ global error) matching Taylor series through $h^4$, without requiring any analytical differentiation! The weighting $(1:2:2:1)/6$ is identical to Simpson's $1/3$ rule!
📝 Master Solved University Problem (5-Decimal Precision):
Apply the Runge-Kutta 4th Order method to find $y(0.1)$ given: $$\frac{dy}{dx} = x + y, \quad y(0) = 1, \quad \text{with step size } h = 0.1$$

Step-by-Step Numerical Calculations:

Given Parameters:
$f(x, y) = x + y$, initial values $x_0 = 0, y_0 = 1$, step size $h = 0.1$.
Step 1: Calculate $k_1$ (Slope at left boundary):
$$k_1 = h \cdot f(x_0, y_0) = 0.1 \times (0 + 1) = \mathbf{0.10000}$$
Step 2: Calculate $k_2$ (First trial slope at midpoint):
$$x_0 + \frac{h}{2} = 0 + 0.05 = 0.05$$ $$y_0 + \frac{k_1}{2} = 1 + \frac{0.10000}{2} = 1.05$$ $$k_2 = h \cdot f(0.05, 1.05) = 0.1 \times (0.05 + 1.05) = 0.1 \times 1.10 = \mathbf{0.11000}$$
Step 3: Calculate $k_3$ (Second trial slope at midpoint):
$$x_0 + \frac{h}{2} = 0.05$$ $$y_0 + \frac{k_2}{2} = 1 + \frac{0.11000}{2} = 1.055$$ $$k_3 = h \cdot f(0.05, 1.055) = 0.1 \times (0.05 + 1.055) = 0.1 \times 1.105 = \mathbf{0.11050}$$
Step 4: Calculate $k_4$ (Slope at right boundary):
$$x_0 + h = 0 + 0.1 = 0.1$$ $$y_0 + k_3 = 1 + 0.11050 = 1.11050$$ $$k_4 = h \cdot f(0.1, 1.11050) = 0.1 \times (0.1 + 1.11050) = 0.1 \times 1.21050 = \mathbf{0.12105}$$
Step 5: Weighted Average Increment $\Delta y$:
$$\Delta y = \frac{1}{6} \Big[ k_1 + 2k_2 + 2k_3 + k_4 \Big]$$ $$\Delta y = \frac{1}{6} \Big[ 0.10000 + 2(0.11000) + 2(0.11050) + 0.12105 \Big]$$ $$\Delta y = \frac{1}{6} \Big[ 0.10000 + 0.22000 + 0.22100 + 0.12105 \Big] = \frac{0.66205}{6} = \mathbf{0.11034}$$
Step 6: Compute Final Value $y(0.1)$:
$$y(0.1) = y_0 + \Delta y = 1 + 0.11034 = \mathbf{1.11034}$$ Exact Analytical Verification: Analytical solution of $\frac{dy}{dx} - y = x$ via integrating factor is $y = 2e^x - x - 1$.
For $x = 0.1$: $y = 2e^{0.1} - 0.1 - 1 = 2(1.1051709) - 1.1 = 2.2103418 - 1.1 = \mathbf{1.1103418}$!
The RK4 result matches the exact analytical answer to 5 full decimal places!

Runge-Kutta 2nd Order Method (RK-2)

Formulas:
$$k_1 = h \cdot f(x_0, y_0)$$ $$k_2 = h \cdot f(x_0 + h, y_0 + k_1)$$ $$y(x_0 + h) = y_0 + \frac{1}{2}(k_1 + k_2)$$ Note: The Runge-Kutta 2nd order method is mathematically equivalent to Heun's (Modified Euler) method and has a global truncation error of $O(h^2)$.

Multi-Step Predictor-Corrector Methods: Milne's & Adams-Bashforth

While single-step methods like RK4 compute $y_{n+1}$ purely from $(x_n, y_n)$, Multi-step Methods achieve high efficiency by using past historical points $(x_{n-3}, x_{n-2}, x_{n-1}, x_n)$ to extrapolate forward.

Milne-Simpson Predictor-Corrector Method:
• Milne's Predictor Formula (Open Quadrature): $$\mathbf{y_{n+1}^{(P)} = y_{n-3} + \frac{4h}{3}\left[2y_{n-2}' - y_{n-1}' + 2y_n'\right]}$$ • Milne's Corrector Formula (Simpson's 1/3 Quadrature): $$\mathbf{y_{n+1}^{(C)} = y_{n-1} + \frac{h}{3}\left[y_{n-1}' + 4y_n' + y_{n+1}'^{(P)}\right]}$$ • Truncation errors: $E_P = \frac{14}{45} h^5 y^{(5)}(\xi), \quad E_C = -\frac{1}{90} h^5 y^{(5)}(\xi)$.
6. Comprehensive Comparison Matrix of ODE Solvers
Method Order of Accuracy Global Error Analytical Derivatives Needed? Self-Starting? Primary Limitation
Euler's Method 1st Order $O(h)$ No Yes Very inaccurate; requires tiny $h$, causing round-off errors.
Modified Euler 2nd Order $O(h^2)$ No Yes Requires two function evaluations per step.
Taylor Series $p$-th Order $O(h^p)$ Yes (repeated $y'', y''', \dots$) Yes Analytical derivatives become impossible for complex $f(x, y)$.
Picard's Method Analytical Series Truncation error No (requires symbolic integration) Yes Fails when $\int f(t, y) dt$ cannot be integrated in closed form.
Runge-Kutta 4th (RK4) 4th Order $O(h^4)$ No (only evaluations of $f$) Yes Computationally heavy (4 function evaluations per step).
7. Exam Answer Blueprint & Pitfalls to Avoid
How to Score Full 10 Marks on "Runge-Kutta 4th Order Method":
  1. Formulas First (2 Marks): Write all four slope equations ($k_1, k_2, k_3, k_4$) and $\Delta y = \frac{1}{6}(k_1 + 2k_2 + 2k_3 + k_4)$ clearly before plugging in numbers.
  2. Step-by-Step Values (5 Marks): Calculate each $k_i$ on a separate labeled line. Keep at least 4 to 5 decimal places to avoid premature rounding error.
  3. Weighted Sum (2 Marks): Show $k_1 + 2k_2 + 2k_3 + k_4$ addition explicitly before dividing by 6.
  4. Final Addition (1 Mark): Clearly write $y(x_1) = y_0 + \Delta y$ with boxed final answer.
⚠️ Common Exam Pitfalls:
• Forgetting to multiply by $h$: Remember $k_i = h \cdot f(\dots)$. Leaving out the $h$ factor makes your slope 10 times too large ($h = 0.1$) and ruins the entire calculation!
• Using $k_1$ instead of $k_2$ when calculating $k_3$: Notice: $k_3 = h f(x_0 + \frac{h}{2}, y_0 + \frac{\mathbf{k_2}}{2})$. Accidentally reusing $k_1$ is the most frequent student error!
📝 Unit V Exam Mastery MCQ Quiz (10 Questions)

Answer all 10 questions to test your mastery of ODE numerical solvers, Picard approximations, and RK4 coefficients.