2078 11

Numerical Methods20785 marksNumerical: Euler's method ODEEuler's method for ODE solving

Given the equation y′=3x2+1y' = 3x^2 + 1y′=3x2+1 with y(1) = 2, estimate y(2) by Euler's Method using h = 0.2.

Given the equation y′=3x2+1y' = 3x^2 + 1y′=3x2+1 with y(1) = 2, estimate y(2) by Euler's Method using h = 0.2. [5]

  • $f(x,y) = y' = 3x^2 + 1$ - $x0 = 1.0$, $y0 = 2.0$ - $h = 0.2$ - Target: $y(2)$ → requires $\frac{2-1}{0.2} = 5$ steps Euler formula: $$y{n+1} = yn + h,f(xn, yn)$$ Step 1 ($x0=1.0,\ y0=2.0$): $$f = 3(1.0)^2+1 = 4 \implies y1 = 2.0 + 0.2(4) = 2.800$$ Step 2 ($x1=1.2,\ y1=2.800$): $$f = 3(1.44)+1...
Up nextSolve the Poisson's Equation nabla2 f = 2x2 y2 over the square domain 0 leq x leq 3 and 0