Example Improved Eulers Method Error Order of Error Improved Eulers Method

Example improved eulers method error order of error

This preview shows page 9 - 10 out of 10 pages.

Example Improved Euler’s Method Error Order of Error Improved Euler’s Method Error Improved Euler’s Method Error Showed earlier that Euler’s method had a local truncation error of O ( h 2 ) with global error being O ( h ) Similar Taylor expansions (in two variables) give the local truncation error for the Improved Euler’s method as O ( h 3 ) For Improved Euler’s method , the global truncation error is O ( h 2 ) From a practical perspective, these results imply: With Euler’s method , the reduction of the stepsize by a factor of 0.1 gains one digit of accuracy With Improved Euler’s method , the reduction of the stepsize by a factor of 0.1 gains two digits of accuracy This is a significant improvement at only the cost of one additional function evaluation per step Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Different — (34/39) Introduction Euler’s Method Improved Euler’s Method Improved Euler’s Method - Algorithm Example Improved Euler’s Method Error Order of Error Numerical Example 1 Numerical Example: Consider the IVP dy dt = 2 e - 0 . 1 t - sin( y ) , y (0) = 3 , which has no exact solution, so must solve numerically Solve this problem with Euler’s method and Improved Euler’s method Show differences with different stepsizes for t [0 , 5] Show the order of convergence by halving the stepsize twice Graph the solution and compare to solution from ode23 in MatLab, closely approximating the exact solution Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Differential Equations — (35/39) Introduction Euler’s Method Improved Euler’s Method Improved Euler’s Method - Algorithm Example Improved Euler’s Method Error Order of Error Numerical Example 2 Numerical Solution for dy dt = 2 e - 0 . 1 t - sin( y ) , y (0) = 3 Used MatLab’s ode45 to obtain an accurate numerical solution to compare Euler’s method and Improved Euler’s method with stepsizes h = 0 . 2, h = 0 . 1, and h = 0 . 05 “Actual” Euler Im Eul Euler Im Eul Euler Im Eul t n h = 0 . 2 h = 0 . 2 h = 0 . 1 h = 0 . 1 h = 0 . 05 h = 0 . 05 0 3 3 3 3 3 3 3 1 5.5415 5.4455 5.5206 5.4981 5.5361 5.5209 5.5401 2 7.1032 7.1718 7.0881 7.1368 7.0995 7.1199 7.1023 3 7.753 7.836 7.743 7.7939 7.7505 7.7734 7.7524 4 8.1774 8.2818 8.167 8.2288 8.1748 8.2029 8.1768 5 8.5941 8.7558 8.5774 8.6737 8.5899 8.6336 8.5931 1 . 88% - 0 . 194% 0 . 926% - 0 . 0489% 0 . 460% - 0 . 0116% Last row shows percent error between the different approximations and the accurate solution Joseph M. Mahaffy, h jmahaffy[email protected] i Lecture Notes – Numerical Methods for Different — (36/39)
Image of page 9

Subscribe to view the full document.

Introduction Euler’s Method Improved Euler’s Method Improved Euler’s Method - Algorithm Example Improved Euler’s Method Error Order of Error Numerical Example 3 Error of Numerical Solutions Observe that the Improved Euler’s method with stepsize h = 0 . 2 is more accurate at t = 5 than Euler’s method with stepsize h = 0 . 05 With Euler’s method the error cuts in half with halving of the stepsize With the Improved Euler’s method the errors cuts in quarter with halving of the stepsize Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Differential Equations — (37/39) Introduction Euler’s Method Improved Euler’s Method Improved Euler’s Method - Algorithm Example
Image of page 10
  • Fall '08
  • staff

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes