2075 11

Numerical Method20755 marksNumerical: RK4 method ODERunge-Kutta methods

From the following differential equation estimate y(1) using RK 4th order method. [Take h = 0.5]

From the following differential equation estimate y(1) using RK 4th order method.

$$\frac{dy}{dx} + 2x^2y = 4 \quad \text{with} \quad y(0) = 1$$

[Take $h = 0.5$] [5]

  • ODE: $\dfrac{dy}{dx} + 2x^2 y = 4 \Rightarrow \dfrac{dy}{dx} = 4 - 2x^2 y = f(x,y)$ - Initial condition: $x0 = 0,\ y0 = 1$ - Step size: $h = 0.5$ - Target: $y(1)$ → requires 2 steps ($0 \to 0.5 \to 1.0$) RK4 formulas: $$y{n+1} = yn + \tfrac{h}{6}(k1 + 2k2 + 2k3 + k4)$$ $$k1 = f(0, 1) = 4 - 2(0)...
Up nextSolve the Poisson's equation over the square domain 0 leq x leq 1.5, 0 leq y leq 1.5 with