GATE 2024 ME – Question 11
In order to numerically solve the ordinary differential equation $\frac{dy}{dt} = -y$ for $t > 0$, with an initial condition $y(0) = 1$, the following scheme is employed
$$\frac{y_{n+1} - y_n}{\Delta t} = -\frac{1}{2}\left(y_{n+1} + y_n\right).$$
Here, $\Delta t$ is the time step and $y_n = y(n\Delta t)$ for $n = 0, 1, 2, \ldots$. This numerical scheme will yield a solution with non-physical oscillations for $\Delta t > h$. The value of $h$ is
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (D) $2$
Explanation
Solving for $y_{n+1}$ gives $y_{n+1}\left(1 + \frac{\Delta t}{2}\right) = y_n\left(1 - \frac{\Delta t}{2}\right)$, so $y_{n+1} = r\,y_n$ with $r = \frac{1 - \Delta t/2}{1 + \Delta t/2}$. The numerical solution oscillates in sign when $r < 0$, which happens when $\Delta t > 2$. So $h = 2$.