Question: 3. Create functions that will solve a single ODE by the second-order Taylor series (TS) and the Heun method (HM). Apply your two functions to

3. Create functions that will solve a single ODE by the second-order Taylor series (TS) and the Heun method (HM). Apply your two functions to the following ODE: dy --10y tz ; y(0) = 3. dt Each function should have the form: [tOut, yout] = funcName(fODE, EStart, yStart, tEnd, tStep), where fODE defines a function that describes the ODE;tStart and tEnd are the beginning and ending time, respectively; and yStart is the value of y at t = tStart. Run ode15s to solve the ODE to obtain an accurate base-case result over the time interval [0, 10). Then call your separate functions for TS and HM from the main script to find the largest time-steps tStep (accurate to 1 sf) for each that maintain accuracy and stability. [25 marks] 3. Create functions that will solve a single ODE by the second-order Taylor series (TS) and the Heun method (HM). Apply your two functions to the following ODE: dy --10y tz ; y(0) = 3. dt Each function should have the form: [tOut, yout] = funcName(fODE, EStart, yStart, tEnd, tStep), where fODE defines a function that describes the ODE;tStart and tEnd are the beginning and ending time, respectively; and yStart is the value of y at t = tStart. Run ode15s to solve the ODE to obtain an accurate base-case result over the time interval [0, 10). Then call your separate functions for TS and HM from the main script to find the largest time-steps tStep (accurate to 1 sf) for each that maintain accuracy and stability. [25 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
