Question:

Given that \[ \frac{dy}{dx} = 2x + y, y(0) = 1 \] Using Runge-Kutta fourth order method, the value of \(y\) at \(x = 0.2\) is \underline{\hspace{2cm}} (rounded off to 3 decimal places).

Show Hint

In RK4, calculate four slopes \(k_1, k_2, k_3, k_4\). Average them as \( (k_1 + 2k_2 + 2k_3 + k_4)/6\). This balances error and yields accurate results.
Updated On: Aug 30, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

Step 1: Recall Runge-Kutta 4th order formula. \[ y_{n+1} = y_n + \frac{1}{6}(k_1 + 2k_2 + 2k_3 + k_4) \] with step size \(h\).

Step 2: Define function. \[ f(x,y) = 2x + y \] Initial values: \(x_0 = 0, \, y_0 = 1, \, h = 0.2\).

Step 3: Compute slopes. \[ k_1 = h f(x_0, y_0) = 0.2 \times (2 \cdot 0 + 1) = 0.2 \] \[ k_2 = h f(x_0 + h/2, y_0 + k_1/2) = 0.2 \times (2(0.1) + (1 + 0.1)) \] \[ = 0.2 \times (0.2 + 1.1) = 0.2 \times 1.3 = 0.26 \] \[ k_3 = h f(x_0 + h/2, y_0 + k_2/2) = 0.2 \times (2(0.1) + (1 + 0.13)) \] \[ = 0.2 \times (0.2 + 1.13) = 0.2 \times 1.33 = 0.266 \] \[ k_4 = h f(x_0 + h, y_0 + k_3) = 0.2 \times (2(0.2) + (1 + 0.266)) \] \[ = 0.2 \times (0.4 + 1.266) = 0.2 \times 1.666 = 0.333 \]

Step 4: Update solution. \[ y_1 = y_0 + \frac{1}{6}(k_1 + 2k_2 + 2k_3 + k_4) \] \[ = 1 + \frac{1}{6}(0.2 + 2(0.26) + 2(0.266) + 0.333) \] \[ = 1 + \frac{1}{6}(1.585) = 1 + 0.264 = 1.246 \] \[ \boxed{1.246} \]

Was this answer helpful?
0
0

Questions Asked in GATE AG exam

View More Questions