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
Question
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
Solution 1
Solution 2
The generalized Heun's method is a numerical method used to solve ordinary differential equations (ODEs). The method is based on the Euler method but includes an additional correction step to improve the accuracy of the solution.
The general form of Heun's method is:
- Predictor step: y1 = y0 + h*f(t0, y0)
- Corrector step: y2 = y0 + h/2 * (f(t0, y0) + f(t1, y1))
Given the initial value problem y'(t) = 11 + y^2, y(0) = 0, and the step size h = 1, we can apply Heun's method as follows:
Step 1: t0 = 0, y0 = 0 f(t0, y0) = 11 + (0)^2 = 11 Predictor step: y1 = 0 + 1*11 = 11 f(t1, y1) = 11 + (11)^2 = 132 Corrector step: y2 = 0 + 1/2 * (11 + 132) = 71.5
Step 2: t0 = 1, y0 = 71.5 f(t0, y0) = 11 + (71.5)^2 = 5122.25 Predictor step: y1 = 71.5 + 1*5122.25 = 5193.75 f(t1, y1) = 11 + (5193.75)^2 = 26971957.0625 Corrector step: y2 = 71.5 + 1/2 * (5122.25 + 26971957.0625) = 13486014.40625
So, the approximate value of y(2) is 13486014.40625.
Similar Questions
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].
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.
The analytic solution for the initial value problem from part (a)(ii) isy(t) =(32 t +√1 + ( 32 t)2)1/3−(32 t +√1 + ( 32 t)2)−1/3.Calculate the accuracy of the approximation obtained by the generalised Heun’s meth-ods at point t = 2.
Use Euler's method with step size 0.1 to estimate y(2.5), where y(x) is the solution of the initial-value problem y' = 3y + 2xy, y(2) = 1. (Round your answer to four decimal places.)
Consider the following population dynamics model, proposed by Pierre–FrançoisVerhulst in 1838: dydt = ry(t)(1 − y(t)K), y(0) = y0.Here, y(t) denotes the population size at time t, y0 denotes the initial population size, r denotes the growthrate, and K denotes the carrying capacity of the environment.The analytic solution for this equation isy(t) = Ky0ertK + y0(ert − 1).(a) Implement the generalised Heun’s algorithm with α = 12 (also known as the modified Euler’s method) forthis problem.Apply this algorithm to numerically solve the equation for t ∈ [0, T ], using the uniform grid t0, t1, . . . , tNwith t0 = 0, tN = T.Your code should be flexible and able to work for general r, y0, K, T and N.Your code should not use functions from Matlab Symbolic package, such as syms , diff and dsolve .Implement your program in Matlab as a single file and save it with the name q2_2106015.m
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.