Euler Method Civil Engineering Majors Authors Autar Kaw

  • Slides: 16
Download presentation
Euler Method Civil Engineering Majors Authors: Autar Kaw, Charlie Barker http: //numericalmethods. eng. usf.

Euler Method Civil Engineering Majors Authors: Autar Kaw, Charlie Barker http: //numericalmethods. eng. usf. edu Transforming Numerical Methods Education for STEM Undergraduates 3/12/2021 http: //numericalmethods. eng. usf. edu 1

Euler Method http: //numericalmethods. eng. usf. edu

Euler Method http: //numericalmethods. eng. usf. edu

Euler’s Method y True value Slope Φ x 0, y 0 y 1, Predicted

Euler’s Method y True value Slope Φ x 0, y 0 y 1, Predicted value Step size, h x Figure 1 Graphical interpretation of the first step of Euler’s method 3 lmethods. eng. usf. edu http: //numerica

Euler’s Method y True Value yi+1, Predicted value Φ yi h Step size xi

Euler’s Method y True Value yi+1, Predicted value Φ yi h Step size xi xi+1 x Figure 2. General graphical interpretation of Euler’s method 4 lmethods. eng. usf. edu http: //numerica

How to write Ordinary Differential Equation How does one write a first order differential

How to write Ordinary Differential Equation How does one write a first order differential equation in the form of Example is rewritten as In this case 5 lmethods. eng. usf. edu http: //numerica

Example A polluted lake with an initial concentration of a bacteria is 10 7

Example A polluted lake with an initial concentration of a bacteria is 10 7 parts/m 3, while the acceptable level is only 5× 106 parts/m 3. The concentration of the bacteria will reduce as fresh water enters the lake. The differential equation that governs the concentration C of the pollutant as a function of time (in weeks) is given by Find the concentration of the pollutant after 7 weeks. Take a step size of 3. 5 weeks. 6 lmethods. eng. usf. edu http: //numerica

Solution Step 1: is the approximate concentration of bacteria at 7 lmethods. eng. usf.

Solution Step 1: is the approximate concentration of bacteria at 7 lmethods. eng. usf. edu http: //numerica

Solution Cont Step 2: is the approximate concentration of bacteria at 8 lmethods. eng.

Solution Cont Step 2: is the approximate concentration of bacteria at 8 lmethods. eng. usf. edu http: //numerica

Solution Cont The exact solution of the ordinary differential equation is given by the

Solution Cont The exact solution of the ordinary differential equation is given by the solution of a non-linear equation as The solution to this nonlinear equation at t=7 weeks is 9 lmethods. eng. usf. edu http: //numerica

Comparison of Exact and Numerical Solutions Figure 3. Comparing exact and Euler’s method 10

Comparison of Exact and Numerical Solutions Figure 3. Comparing exact and Euler’s method 10 lmethods. eng. usf. edu http: //numerica

Effect of step size Table 1 Concentration of bacteria after 7 weeks as a

Effect of step size Table 1 Concentration of bacteria after 7 weeks as a function of step size Step size 7 3. 5 1. 75 0. 875 0. 4375 11 5. 8× 106 6. 241× 106 6. 4164× 106 6. 4959× 106 6. 5337× 106 770470 329470 154060 74652 36763 11. 726 5. 0144 2. 3447 1. 1362 0. 55952 lmethods. eng. usf. edu http: //numerica

Comparison with exact results Figure 4. Comparison of Euler’s method with exact solution for

Comparison with exact results Figure 4. Comparison of Euler’s method with exact solution for different step sizes 12 lmethods. eng. usf. edu http: //numerica

Effects of step size on Euler’s Method Figure 5. Effect of step size in

Effects of step size on Euler’s Method Figure 5. Effect of step size in Euler’s method. 13 lmethods. eng. usf. edu http: //numerica

Errors in Euler’s Method It can be seen that Euler’s method has large errors.

Errors in Euler’s Method It can be seen that Euler’s method has large errors. This can be illustrated using Taylor series. As you can see the first two terms of the Taylor series are the Euler’s method. The true error in the approximation is given by 14 lmethods. eng. usf. edu http: //numerica

Additional Resources For all resources on this topic such as digital audiovisual lectures, primers,

Additional Resources For all resources on this topic such as digital audiovisual lectures, primers, textbook chapters, multiple-choice tests, worksheets in MATLAB, MATHEMATICA, Math. Cad and MAPLE, blogs, related physical problems, please visit http: //numericalmethods. eng. usf. edu/topics/euler_meth od. html

THE END http: //numericalmethods. eng. usf. edu

THE END http: //numericalmethods. eng. usf. edu