2079 11

Numerical Method20795 marksNumerical: Runge-Kutta 4th orderRunge-Kutta methods

Solve the following differential equation for 0 leq x leq 1 taking h = 0.5 using Runge Kutta 4th order method.

Solve the following differential equation for $0 \leq x \leq 1$ taking $h = 0.5$ using Runge Kutta 4th order method.

$$y'(x) + y = 3x \quad \text{with} \quad y(0) = 2$$

[5]

  • ODE: $y'(x) + y = 3x \Rightarrow y' = f(x,y) = 3x - y$ - Initial condition: $y(0) = 2$ - Step size: $h = 0.5$ - Interval: $0 \le x \le 1$ - Number of steps: 2 (from $x=0$ to $x=1$) $$k1 = h,f(xn, yn), \quad k2 = h,f\left(xn+\tfrac{h}{2}, yn+\tfrac{k1}{2}\right)$$ $$k3 = h,f\left(xn+\tfrac{h}...
Up nextSolve the Poisson's equation nabla2 f = 3x2y over the square domain 0 leq x leq 3, 0 leq y