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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!