Question: Use Euler's method to solve for d y d x = c o s x in the range 0 x 0 . 5 using a

Use Euler's method to solve for
dydx=cosx
in the range 0x0.5 using a step size h of 0.1. Use the initial condition y(0)=0. Compare the numerical approximation against the true solution using the relative error. How does the error change as you go from 0 to 0.5?
2. Repeat problem 1 using Heun's Method. Compare your relative errors against those you found in Problem 1. Which method gives better approximations?
Use Euler's method to solve for d y d x = c o s x

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 Programming Questions!