Improved Eulers Method Algorithm Example Improved Eulers Method Error Order of

Improved eulers method algorithm example improved

• 10

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

Improved Euler’s Method - Algorithm Example Improved Euler’s Method Error Order of Error Example: Improved Euler’s Method 1 Example: Improved Euler’s Method: Consider the initial value problem: dy dt = y + t with y (0) = 3 The solution to this differential equation is y ( t ) = 4 e t - t - 1 Numerically solve this using Euler’s Method and Improved Euler’s Method using h = 0 . 1 Compare these numerical solutions Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Differential Equations — (29/39) Introduction Euler’s Method Improved Euler’s Method Improved Euler’s Method - Algorithm Example Improved Euler’s Method Error Order of Error Example: Improved Euler’s Method 2 Solution: Let y 0 = 3, the Euler’s formula is y n +1 = y n + h ( y n + t n ) = y n + 0 . 1( y n + t n ) The Improved Euler’s formula is ye n = y n + h ( y n + t n ) = y n + 0 . 1( y n + t n ) with y n +1 = y n + h 2 (( y n + t n ) + ( ye n + t n + h )) y n +1 = y n + 0 . 05 ( y n + ye n + 2 t n + 0 . 1) Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Different — (30/39) Introduction Euler’s Method Improved Euler’s Method Improved Euler’s Method - Algorithm Example Improved Euler’s Method Error Order of Error Example: Improved Euler’s Method 3 Solution: Below is a table of the numerical computations t Euler’s Method Improved Euler Actual 0 y 0 = 3 y 0 = 3 y (0) = 3 0 . 1 y 1 = 3 . 3 y 1 = 3 . 32 y (0 . 1) = 3 . 3207 0 . 2 y 2 = 3 . 64 y 2 = 3 . 6841 y (0 . 2) = 3 . 6856 0 . 3 y 3 = 4 . 024 y 3 = 4 . 0969 y (0 . 3) = 4 . 0994 0 . 4 y 4 = 4 . 4564 y 4 = 4 . 5636 y (0 . 4) = 4 . 5673 0 . 5 y 5 = 4 . 9420 y 5 = 5 . 0898 y (0 . 5) = 5 . 0949 0 . 6 y 6 = 5 . 4862 y 6 = 5 . 6817 y (0 . 6) = 5 . 6885 0 . 7 y 7 = 6 . 0949 y 7 = 6 . 3463 y (0 . 7) = 6 . 3550 0 . 8 y 8 = 6 . 7744 y 8 = 7 . 0912 y (0 . 8) = 7 . 1022 0 . 9 y 9 = 7 . 5318 y 9 = 7 . 9247 y (0 . 9) = 7 . 9384 1 y 10 = 8 . 3750 y 10 = 8 . 8563 y (1) = 8 . 8731 Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Differential Equations — (31/39) Introduction Euler’s Method Improved Euler’s Method Improved Euler’s Method - Algorithm Example Improved Euler’s Method Error Order of Error Example: Improved Euler’s Method 4 Graph of Solution: Actual, Euler’s and Improved Euler’s 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 0 5 10 15 20 25 30 t y ( t ) dy/dt = y + t Actual Solution Euler Solution Improved Euler The Improved Euler’s solution is very close to the actual solution Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Different — (32/39)

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 Example: Improved Euler’s Method 5 Solution: Comparison of the numerical simulations It is very clear that the Improved Euler’s method does a substantially better job of tracking the actual solution The Improved Euler’s method requires only one additional function, f ( t, y ), evaluation for this improved accuracy At t = 1, the Euler’s method has a - 5 . 6% error from the actual solution At t = 1, the Improved Euler’s method has a - 0 . 19% error from the actual solution Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Differential Equations — (33/39) Introduction Euler’s Method Improved Euler’s Method Improved Euler’s Method - Algorithm
• Fall '08
• staff

What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern