Improved Eulers Method Malthusian Growth Example Eulers Method MatLab Example

# Improved eulers method malthusian growth example

• 39

This preview shows page 7 - 13 out of 39 pages.

Improved Euler’s Method Malthusian Growth Example Euler’s Method - MatLab Example with f ( t, y ) Euler Error Analysis Euler’s Method 4 Euler’s Method Formula: Euler’s method is just a discrete dynamical system for approximating the solution of a continuous model Let t n +1 = t n + h Define y n = y ( t n ) The initial condition gives y ( t 0 ) = y 0 Euler’s Method is the discrete dynamical system y n +1 = y n + h f ( t n , y n ) Euler’s Method only needs the initial condition to start and the right hand side of the differential equation (the slope field ), f ( t, y ) to obtain the approximate solution Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Differe — (7/39)

Subscribe to view the full document.

Introduction Euler’s Method Improved Euler’s Method Malthusian Growth Example Euler’s Method - MatLab Example with f ( t, y ) Euler Error Analysis Malthusian Growth Example 1 Malthusian Growth Example: Consider the model dP dt = 0 . 2 P with P (0) = 50 Find the exact solution and approximate the solution with Euler’s Method for t [0 , 1] with h = 0 . 1 Solution: The exact solution is P ( t ) = 50 e 0 . 2 t Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Differe — (8/39)
Introduction Euler’s Method Improved Euler’s Method Malthusian Growth Example Euler’s Method - MatLab Example with f ( t, y ) Euler Error Analysis Malthusian Growth Example 2 Solution (cont): The Formula for Euler’s Method is P n +1 = P n + h 0 . 2 P n The initial condition P (0) = 50 implies that t 0 = 0 and P 0 = 50 Create a table for the Euler iterates t n P n t 0 = 0 P 0 = 50 t 1 = t 0 + h = 0 . 1 P 1 = P 0 + 0 . 1(0 . 2 P 0 ) = 50 + 1 = 51 t 2 = t 1 + h = 0 . 2 P 2 = P 1 + 0 . 1(0 . 2 P 1 ) = 51 + 1 . 02 = 52 . 02 t 3 = t 2 + h = 0 . 3 P 3 = P 2 + 0 . 1(0 . 2 P 2 ) = 52 . 02 + 1 . 0404 = 53 . 0604 Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Differe — (9/39)

Subscribe to view the full document.

Introduction Euler’s Method Improved Euler’s Method Malthusian Growth Example Euler’s Method - MatLab Example with f ( t, y ) Euler Error Analysis Malthusian Growth Example 3 Solution (cont): Iterations are easily continued - Below is table of the actual solution and the Euler’s method iterates t Euler Solution Actual Solution 0 50 50 0 . 1 51 51.01 0 . 2 52.02 52.041 0 . 3 53.060 53.092 0 . 4 54.122 54.164 0 . 5 55.204 55.259 0 . 6 56.308 56.375 0 . 7 57.434 57.514 0 . 8 58.583 58.676 0 . 9 59.755 59.861 1 . 0 60.950 61.070 Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Differe — (10/39)
Introduction Euler’s Method Improved Euler’s Method Malthusian Growth Example Euler’s Method - MatLab Example with f ( t, y ) Euler Error Analysis Malthusian Growth Example 4 Graph of Euler’s Method for Malthusian Growth Example 0 0.2 0.4 0.6 0.8 1 50 52 54 56 58 60 P(t) Euler’s Method - P’ = 0.2 P Euler’s Method Actual Solution Joseph M. Mahaffy, h [email protected] i Lecture Notes – Numerical Methods for Differe — (11/39)

Subscribe to view the full document.

Introduction Euler’s Method Improved Euler’s Method Malthusian Growth Example Euler’s Method - MatLab Example with f ( t, y ) Euler Error Analysis Malthusian Growth Example 5 Error Analysis and Larger Stepsize The table and the graph shows that Euler’s method is tracking the solution fairly well over the interval of the simulation The error at t = 1 is only -0.2%
• 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