a) A second-order Runge-Kutta method, also known has Heun’s method, is derived in Sect. 8.4.5. Make a function ode_Heun(f, U_0, dt, T) (as a counterpart to ode_FE(f, U_0, dt, T) in ode_FE.py) for solving a scalar ODE problem u
= f (u, t), u(0) = U0, t ∈ (0, T ], with this method using a time step size Δt.

b) Solve the simple ODE problem u
= u, u(0) = 1, by the ode_Heun and the ode_FE function. Make a plot that compares Heun’s method and the Forward Euler method with the exact solution u(t) = et for t ∈ [0, 6]. Use a time step Δt = 0.5.

c) For the case in b), find through experimentation the largest value of Δt where the exact solution and the numerical solution by Heun’s method cannot be distinguished visually. It is of interest to see how far off the curve the Forward Euler method is when Heun’s method can be regarded as “exact” (for visual purposes).

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!