Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Scalar ODE Consider the following initial value problem: (a). Write out Euler\'s

ID: 3143005 • Letter: S

Question

Scalar ODE

Consider the following initial value problem:

(a). Write out Euler's method for this ODE. Compute the value of x(1.2) using Euler's method with h = 0.1.

(b). Write out the Heun's method for this ODE. Compute the value of x(1.2) using Heun's method with h = 0.1.

(c). Write out the classic 4th order Runge-Kutta method for this ODE. Compute the value of x(1.2) by this method, with h = 0.1.

(d). Write out the 2nd order Adams-Bashforth-Moulton method for this ODE. Note that this is a multi-step method. It needs 2 inital values, i.e. x0 and x1, to initiate the iterations. For the second value x1 you can use the result obtained part (b) with Heun's method. Compute the values of x(1.2) and x(1.3) using the ABM method.

NOTE: Do not use MATLAB for these computations. You may use MATLAB as a calculator only.

Explanation / Answer

a>

Hete t0 = 1

t1 = 1.1 and t2 = 1.2

and h = .1

Eulers method says :

xn+1 = xn + hf(xn, tn)

=> xn+1 = xn + h[2xn^2 + xn - 1]

now we know that x(t0) = x(1) = 1

=> x1 = x0 + .1[2*x0^2 + x0 - 1] = 1 + .1[2*1 + 1 - 1] = 1 + .1[2] = 1.2 = x(1.1)

x2 = x1 + .1[2*x1^2 + x1 - 1] = 1.2 + .1[2*1.2 + 1.2 - 1] = 1.46 = x(1.2)

=> x1