Consider the initial value problemy′(t) = cos(y), y(0) = 0.(i) Apply 4 steps of forward Euler method with the step size h = 12 to approximately findy(2). Show at least 4 decimal places in your calculations. [10 marks](ii) Apply 2 steps of Heun’s method with the step size h = 1 to approximately find y(2).Show at least 4 decimal places in your calculations.
Question
Consider the initial value problemy′(t) = cos(y), y(0) = 0.(i) Apply 4 steps of forward Euler method with the step size h = 12 to approximately findy(2). Show at least 4 decimal places in your calculations. 10 marks Apply 2 steps of Heun’s method with the step size h = 1 to approximately find y(2).Show at least 4 decimal places in your calculations.
Solution
(i) Forward Euler Method:
The Forward Euler method is a first-order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is an explicit method for solving initial value problems (IVPs), as a single step method, and is the simplest Runge–Kutta method. The Forward Euler method is based on the tangent line and the slope of the tangent line.
Given the initial value problem y′(t) = cos(y), y(0) = 0, we can apply 4 steps of the forward Euler method with the step size h = 1/2 to approximately find y(2).
Step 1: y1 = y0 + h * f(t0, y0) = 0 + 1/2 * cos(0) = 0.5
Step 2: y2 = y1 + h * f(t1, y1) = 0.5 + 1/2 * cos(0.5) = 0.5 + 0.5 * 0.8776 = 0.9388
Step 3: y3 = y2 + h * f(t2, y2) = 0.9388 + 1/2 * cos(0.9388) = 0.9388 + 0.5 * 0.5918 = 1.2347
Step 4: y4 = y3 + h * f(t3, y3) = 1.2347 + 1/2 * cos(1.2347) = 1.2347 + 0.5 * 0.3302 = 1.3998
So, y(2) ≈ 1.3998
(ii) Heun’s Method:
Heun's method is a numerical method to solve ordinary differential equations. It is an improved version of the Euler method which is both a single-step method and a two-stage method. It has the property of being a predictor-corrector type of method.
Given the same initial value problem, we can apply 2 steps of Heun’s method with the step size h = 1 to approximately find y(2).
Step 1: Predictor: y1' = y0 + h * f(t0, y0) = 0 + 1 * cos(0) = 1
Corrector: y1 = y0 + h/2 * (f(t0, y0) + f(t1, y1')) = 0 + 1/2 * (cos(0) + cos(1)) = 0.5403
Step 2: Predictor: y2' = y1 + h * f(t1, y1) = 0.5403 + 1 * cos(0.5403) = 1.4125
Corrector: y2 = y1 + h/2 * (f(t1, y1) + f(t2, y2')) = 0.5403 + 1/2 * (cos(0.5403) + cos(1.4125)) = 1.0652
So, y(2) ≈ 1.0652
Similar Questions
Apply the generalised Heun’s method from part (a)(i) to solve the initial value prob-lemy′(t) = 11 + y2 , y(0) = 0.Use 2 steps of the algorithm with the step size h = 1 to approximately find y(2).Show all calculations with at least 6 accurate decimal digits
Consider solving an initial value problemy′(t) = f (t, y), y(0) = y0.(i) Derive the equations of the general step of the generalised Heun’s method, whichevaluates the right–hand side f (t, y) at the points t = tn and t = tn + 14 h in eachinterval [tn, tn + h].
Use Euler's method with step size 0.5 to compute the approximate y-values y1, y2, y3 and y4 of the solution of the initial-value problem y' = y − 5x, y(3) = 0.y1 = y2 = y3 = y4 =
Let y = f(x) be the solution to the differential equation 𝑑𝑦𝑑𝑥=𝑓′(𝑥) with initial condition f(2) = 3. Selected values of f' are given in the table above. What is the approximation for f(2.4) if Euler’s method is used, starting at x = 2 with two steps of equal size?
Use Euler's method with step size 0.2 to estimate y(1.4), where y(x) is the solution of the initial-value problem y' = 4x − 3xy, y(1) = 0. (Round your answer to four decimal places.)y(1.4) =
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.