SlideShare a Scribd company logo
1 of 27
Introduction to Numerical Methods for Differential
                   Equations
                   The Euler Method


                  Matthew Henderson

              matthew.james.henderson@gmail.com

                   21 December, 2011
Overview




1   Initial Value Problems


2   Approximate Solutions of Initial Value Problems


3   The Euler Method




    Matthew Henderson ()      Numerical Methods       21 December, 2011   2 / 15
An Initial Value Problem


Definition
An initial value problem (IVP) consists of an ordinary differential
equation along with an initial condition.




   Matthew Henderson ()       Numerical Methods         21 December, 2011   3 / 15
An Initial Value Problem


Definition
An initial value problem (IVP) consists of an ordinary differential
equation along with an initial condition.

Example
                          y = 2(x + 3) − y,        y(−1) = 3                       (1)




   Matthew Henderson ()            Numerical Methods           21 December, 2011    3 / 15
An Initial Value Problem


Definition
An initial value problem (IVP) consists of an ordinary differential
equation along with an initial condition.

Example
                          y = 2(x + 3) − y,        y(−1) = 3                       (1)

Definition
A solution is a function y(x) which satisfies both the ODE and the
initial condition.



   Matthew Henderson ()            Numerical Methods           21 December, 2011    3 / 15
The Solution


The IVP (1) has a unique solution:
                          y = 2(x + 2) + e−x−1                            (2)

Function y satisfies the ODE:
                            y = 2 − e−x−1


              2(x + 3) − y = 2(x + 3) − 2(x + 2) + e−x−1
                          = 2x + 6 − 2x − 4 − e−x−1
                          = 2 − e−x−1



   Matthew Henderson ()       Numerical Methods       21 December, 2011    4 / 15
The Solution


The IVP (1) has a unique solution:
                               y = 2(x + 2) + e−x−1                          (2)

Function y also satisfies the initial condition:

                          y(−1) = 2(−1 + 2) + e−(−1)−1
                                = 2(1) + e1−1
                                = 2 + e0
                                = 3




   Matthew Henderson ()            Numerical Methods     21 December, 2011    4 / 15
A Plot of the Solution

                                      y
                                 10
            y =2(x +2) + e−x−1
                                  8

                                  6

                                  4

                                  2

                                                                     x
       -3           -2    -1                    1    2   3

   Matthew Henderson ()          Numerical Methods       21 December, 2011   5 / 15
A Plot of the Solution?

                                    y
                               10

                                8

                                6

                                4

                                2

                                                                   x
       -3           -2    -1                  1    2   3

   Matthew Henderson ()        Numerical Methods       21 December, 2011   6 / 15
The Euler Method



Definition
Given an IVP of the form:

                          y = f(x, y),       y(a) = c




   Matthew Henderson ()         Numerical Methods       21 December, 2011   7 / 15
The Euler Method



Definition
Given an IVP of the form:

                           y = f(x, y),       y(a) = c

To find the approximate value of y(x + h) for some small value of h:

                          y(x + h) = y(x) + hf(x, y)                         (3)




   Matthew Henderson ()          Numerical Methods       21 December, 2011    7 / 15
The Euler Method


Example
Going back to our example from before:

                          y = 2(x + 3) − y,        y(−1) = 3




   Matthew Henderson ()            Numerical Methods           21 December, 2011   8 / 15
The Euler Method


Example
Going back to our example from before:

                           y = 2(x + 3) − y,        y(−1) = 3

In this case f(x, y) = 2(x + 3) − y.




    Matthew Henderson ()            Numerical Methods           21 December, 2011   8 / 15
The Euler Method


Example
Going back to our example from before:

                           y = 2(x + 3) − y,        y(−1) = 3

In this case f(x, y) = 2(x + 3) − y.
Put h = 0.4, x = −1.0 and y = 3.0 into (3):




    Matthew Henderson ()            Numerical Methods           21 December, 2011   8 / 15
The Euler Method


Example
Going back to our example from before:

                           y = 2(x + 3) − y,        y(−1) = 3

In this case f(x, y) = 2(x + 3) − y.
Put h = 0.4, x = −1.0 and y = 3.0 into (3):

               y(−1.0 + 0.4) = y(−1.0) + 0.4f(−1.0, 3.0)




    Matthew Henderson ()            Numerical Methods           21 December, 2011   8 / 15
The Euler Method


Example
Going back to our example from before:

                             y = 2(x + 3) − y,         y(−1) = 3

In this case f(x, y) = 2(x + 3) − y.
Put h = 0.4, x = −1.0 and y = 3.0 into (3):

               y(−1.0 + 0.4) = y(−1.0) + 0.4f(−1.0, 3.0)
                           y(−0.6) = 3.0 + 0.4(2(−1.0 + 3.0) − 3.0)




    Matthew Henderson ()               Numerical Methods           21 December, 2011   8 / 15
The Euler Method


Example
Going back to our example from before:

                             y = 2(x + 3) − y,         y(−1) = 3

In this case f(x, y) = 2(x + 3) − y.
Put h = 0.4, x = −1.0 and y = 3.0 into (3):

               y(−1.0 + 0.4) = y(−1.0) + 0.4f(−1.0, 3.0)
                           y(−0.6) = 3.0 + 0.4(2(−1.0 + 3.0) − 3.0)
                                    = 3.0 + 0.4(4 − 3.0)




    Matthew Henderson ()               Numerical Methods           21 December, 2011   8 / 15
The Euler Method


Example
Going back to our example from before:

                             y = 2(x + 3) − y,         y(−1) = 3

In this case f(x, y) = 2(x + 3) − y.
Put h = 0.4, x = −1.0 and y = 3.0 into (3):

               y(−1.0 + 0.4) = y(−1.0) + 0.4f(−1.0, 3.0)
                           y(−0.6) = 3.0 + 0.4(2(−1.0 + 3.0) − 3.0)
                                    = 3.0 + 0.4(4 − 3.0)
                                    = 3.4



    Matthew Henderson ()               Numerical Methods           21 December, 2011   8 / 15
The Euler Method


We can compute more values in the same way . . .
x = −0.6 and y = 3.4:

                y(−0.6 + 0.4) = 3.4 + 0.4(2(−0.6 + 3) − 3.4)
                          y(−0.2) = 3.4 + 0.4(4.8 − 3.4)
                                   = 3.96




   Matthew Henderson ()              Numerical Methods     21 December, 2011   9 / 15
The Euler Method


We can compute more values in the same way . . .
x = −0.6 and y = 3.4:

                y(−0.6 + 0.4) = 3.4 + 0.4(2(−0.6 + 3) − 3.4)
                          y(−0.2) = 3.4 + 0.4(4.8 − 3.4)
                                   = 3.96

 x = −0.2 and y = 3.96:

              y(−0.2 + 0.4) = 3.96 + 0.4(2(−0.2 + 3) − 3.96)
                          y(0.2) = bluey + 0.4(5.6 − 3.96)
                                  = 4.616



   Matthew Henderson ()              Numerical Methods       21 December, 2011   9 / 15
The Euler Method

We continue to construct a table row-by-row:

                            x        y           hf(x, y)
                          -1.0   3.000000        0.400000
                          -0.6                   0.560000
                          -0.2   3.960000        0.656000
                           0.2   4.616000        0.713600
                           0.6   5.329600        0.748160
                           1.0   6.077760        0.768896
                           1.4   6.846656        0.781338
                           1.8   7.627994        0.788803
                           2.2   8.416796        0.793281
                           2.6   9.210078        0.795969
                           3.0   10.00605        0.797581


   Matthew Henderson ()           Numerical Methods         21 December, 2011   10 / 15
The Euler Method

We continue to construct a table row-by-row:

                            x        y           hf(x, y)
                          -1.0   3.000000        0.400000
                          -0.6   3.400000        0.560000
                          -0.2   3.960000        0.656000
                           0.2   4.616000        0.713600
                           0.6   5.329600        0.748160
                           1.0   6.077760        0.768896
                           1.4   6.846656        0.781338
                           1.8   7.627994        0.788803
                           2.2   8.416796        0.793281
                           2.6   9.210078        0.795969
                           3.0   10.00605        0.797581


   Matthew Henderson ()           Numerical Methods         21 December, 2011   10 / 15
The Euler Method: Comparison
Now when we plot those values we get something that begins to look
like our exact solution, albeit only on the interval [−1, 3].
                                             y
                                       10
                  y =2(x +2) + e−x−1
                                         8

                                         6

                                         4

                                         2

                                                                          x
             -3           -2    -1                   1     2   3

   Matthew Henderson ()                Numerical Methods           21 December, 2011   11 / 15
The Euler Method: Comparison

The numbers which we computed for y are not exactly correct but the
errors involved are quite small:

                       x    y (approx)    y (exact)      Error
                     -1.0    3.000000      3.000000    0.000000
                     -0.6    3.400000      3.470320    0.070320
                     -0.2    3.960000      4.049329    0.089329
                      0.2    4.616000      4.701194    0.085194
                      0.6    5.329600      5.401896    0.072296
                      1.0    6.077760      6.135335    0.057575
                      1.4    6.846656      6.890718    0.044062
                      1.8    7.627994      7.660810    0.032816
                      2.2    8.416796      8.440762    0.023966
                      2.6    9.210078      9.227324    0.017246
                      3.0    10.00605     10.018316    0.012269

   Matthew Henderson ()            Numerical Methods              21 December, 2011   12 / 15
The Euler Method: Where does it come from?

Given an initial value problem of the form:

                           y = f(x, y),       y(a) = c

we want to find the approximate value of y(b) for some b > a. From
the definition of derivative:
                                      y(x + h) − y(x)
                          y (x) ≈
                                             h
for h > 0 given and small. So,

                                      y(x + h) − y(x)
                          f(x, y) ≈
                                             h
which gives
                          y(x + h) ≈ y(x) + hf(x, y)

   Matthew Henderson ()          Numerical Methods       21 December, 2011   13 / 15
The Euler Method: Why does it work?



                   y =2(x +2) + e−x−1     10

                                           8

                                           6

                                           4

                                           2

              -3          -2     -1                     1   2   3



   Matthew Henderson ()                 Numerical Methods       21 December, 2011   14 / 15
The End

Merry Christmas!




   Matthew Henderson ()   Numerical Methods   21 December, 2011   15 / 15

More Related Content

What's hot

Euler and improved euler method
Euler and improved euler methodEuler and improved euler method
Euler and improved euler methodSohaib Butt
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve Mukuldev Khunte
 
Maths Notes - Differential Equations
Maths Notes - Differential EquationsMaths Notes - Differential Equations
Maths Notes - Differential EquationsJames McMurray
 
Properties of bivariate and conditional Gaussian PDFs
Properties of bivariate and conditional Gaussian PDFsProperties of bivariate and conditional Gaussian PDFs
Properties of bivariate and conditional Gaussian PDFsAhmad Gomaa
 
Ordinary differential equations
Ordinary differential equationsOrdinary differential equations
Ordinary differential equationsAhmed Haider
 
Methods of variation of parameters- advance engineering mathe mathematics
Methods of variation of parameters- advance engineering mathe mathematicsMethods of variation of parameters- advance engineering mathe mathematics
Methods of variation of parameters- advance engineering mathe mathematicsKaushal Patel
 
Persamaan Differensial Biasa 2014
Persamaan Differensial Biasa 2014 Persamaan Differensial Biasa 2014
Persamaan Differensial Biasa 2014 Rani Sulvianuri
 
Sistem pertidaksamaan kuadrat 2 variabel
Sistem pertidaksamaan kuadrat 2 variabelSistem pertidaksamaan kuadrat 2 variabel
Sistem pertidaksamaan kuadrat 2 variabelAlya Titania Annisaa
 
Top Schools in delhi NCR
Top Schools in delhi NCRTop Schools in delhi NCR
Top Schools in delhi NCREdhole.com
 
introduction to differential equations
introduction to differential equationsintroduction to differential equations
introduction to differential equationsEmdadul Haque Milon
 
Week 3 [compatibility mode]
Week 3 [compatibility mode]Week 3 [compatibility mode]
Week 3 [compatibility mode]Hazrul156
 
Higher Order Differential Equation
Higher Order Differential EquationHigher Order Differential Equation
Higher Order Differential EquationShrey Patel
 
Study Material Numerical Differentiation and Integration
Study Material Numerical Differentiation and IntegrationStudy Material Numerical Differentiation and Integration
Study Material Numerical Differentiation and IntegrationMeenakshisundaram N
 

What's hot (20)

Unit vi
Unit viUnit vi
Unit vi
 
DIFFERENTIAL EQUATION
DIFFERENTIAL EQUATIONDIFFERENTIAL EQUATION
DIFFERENTIAL EQUATION
 
Euler and runge kutta method
Euler and runge kutta methodEuler and runge kutta method
Euler and runge kutta method
 
Euler and improved euler method
Euler and improved euler methodEuler and improved euler method
Euler and improved euler method
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve
 
Maths Notes - Differential Equations
Maths Notes - Differential EquationsMaths Notes - Differential Equations
Maths Notes - Differential Equations
 
Ep 5512 lecture-02
Ep 5512 lecture-02Ep 5512 lecture-02
Ep 5512 lecture-02
 
Optimal Finite Difference Grids
Optimal Finite Difference GridsOptimal Finite Difference Grids
Optimal Finite Difference Grids
 
Properties of bivariate and conditional Gaussian PDFs
Properties of bivariate and conditional Gaussian PDFsProperties of bivariate and conditional Gaussian PDFs
Properties of bivariate and conditional Gaussian PDFs
 
Ch05 2
Ch05 2Ch05 2
Ch05 2
 
Ordinary differential equations
Ordinary differential equationsOrdinary differential equations
Ordinary differential equations
 
Ch02 7
Ch02 7Ch02 7
Ch02 7
 
Methods of variation of parameters- advance engineering mathe mathematics
Methods of variation of parameters- advance engineering mathe mathematicsMethods of variation of parameters- advance engineering mathe mathematics
Methods of variation of parameters- advance engineering mathe mathematics
 
Persamaan Differensial Biasa 2014
Persamaan Differensial Biasa 2014 Persamaan Differensial Biasa 2014
Persamaan Differensial Biasa 2014
 
Sistem pertidaksamaan kuadrat 2 variabel
Sistem pertidaksamaan kuadrat 2 variabelSistem pertidaksamaan kuadrat 2 variabel
Sistem pertidaksamaan kuadrat 2 variabel
 
Top Schools in delhi NCR
Top Schools in delhi NCRTop Schools in delhi NCR
Top Schools in delhi NCR
 
introduction to differential equations
introduction to differential equationsintroduction to differential equations
introduction to differential equations
 
Week 3 [compatibility mode]
Week 3 [compatibility mode]Week 3 [compatibility mode]
Week 3 [compatibility mode]
 
Higher Order Differential Equation
Higher Order Differential EquationHigher Order Differential Equation
Higher Order Differential Equation
 
Study Material Numerical Differentiation and Integration
Study Material Numerical Differentiation and IntegrationStudy Material Numerical Differentiation and Integration
Study Material Numerical Differentiation and Integration
 

Viewers also liked

Numerical Methods
Numerical MethodsNumerical Methods
Numerical MethodsESUG
 
Higher Differential Equation
Higher Differential EquationHigher Differential Equation
Higher Differential Equationgtuautonomous
 
Eulermethod3
Eulermethod3Eulermethod3
Eulermethod3stellajoh
 
Hpcc euler
Hpcc eulerHpcc euler
Hpcc eulerrhuzefa
 
Euler method notes sb
Euler method notes sbEuler method notes sb
Euler method notes sbjanetvmiller
 
AP Calculus AB March 25, 2009
AP Calculus AB March 25, 2009AP Calculus AB March 25, 2009
AP Calculus AB March 25, 2009Darren Kuropatwa
 
Calculus II - 13
Calculus II - 13Calculus II - 13
Calculus II - 13David Mao
 
Successive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing dataSuccessive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing dataIAEME Publication
 
Perturbation methods last
Perturbation methods lastPerturbation methods last
Perturbation methods lastSabir Ahmed
 
Euler Method using MATLAB
Euler Method using MATLABEuler Method using MATLAB
Euler Method using MATLABM.Ahmed Waqas
 
Interactives Methods
Interactives MethodsInteractives Methods
Interactives MethodsUIS
 
metode euler
metode eulermetode euler
metode eulerRuth Dian
 
Recupero Crediti: fattori chiave per gestirlo al meglio
Recupero Crediti: fattori chiave per gestirlo al meglioRecupero Crediti: fattori chiave per gestirlo al meglio
Recupero Crediti: fattori chiave per gestirlo al meglioLogica Informatica Srl
 
AP Calculus AB March 26, 2009
AP Calculus AB March 26, 2009AP Calculus AB March 26, 2009
AP Calculus AB March 26, 2009Darren Kuropatwa
 
Ordinary differential equation
Ordinary differential equationOrdinary differential equation
Ordinary differential equationJUGAL BORAH
 

Viewers also liked (20)

Numerical Methods
Numerical MethodsNumerical Methods
Numerical Methods
 
Higher Differential Equation
Higher Differential EquationHigher Differential Equation
Higher Differential Equation
 
Eulermethod3
Eulermethod3Eulermethod3
Eulermethod3
 
Hpcc euler
Hpcc eulerHpcc euler
Hpcc euler
 
Day 4 examples
Day 4 examplesDay 4 examples
Day 4 examples
 
Euler method notes sb
Euler method notes sbEuler method notes sb
Euler method notes sb
 
10 09
10 0910 09
10 09
 
DLR_DG_AZIZ_2003
DLR_DG_AZIZ_2003DLR_DG_AZIZ_2003
DLR_DG_AZIZ_2003
 
AP Calculus AB March 25, 2009
AP Calculus AB March 25, 2009AP Calculus AB March 25, 2009
AP Calculus AB March 25, 2009
 
Calculus II - 13
Calculus II - 13Calculus II - 13
Calculus II - 13
 
Successive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing dataSuccessive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing data
 
Perturbation methods last
Perturbation methods lastPerturbation methods last
Perturbation methods last
 
Euler Method using MATLAB
Euler Method using MATLABEuler Method using MATLAB
Euler Method using MATLAB
 
Differential equations intro
Differential equations introDifferential equations intro
Differential equations intro
 
Interactives Methods
Interactives MethodsInteractives Methods
Interactives Methods
 
metode euler
metode eulermetode euler
metode euler
 
Recupero Crediti: fattori chiave per gestirlo al meglio
Recupero Crediti: fattori chiave per gestirlo al meglioRecupero Crediti: fattori chiave per gestirlo al meglio
Recupero Crediti: fattori chiave per gestirlo al meglio
 
Calc 6.1b
Calc 6.1bCalc 6.1b
Calc 6.1b
 
AP Calculus AB March 26, 2009
AP Calculus AB March 26, 2009AP Calculus AB March 26, 2009
AP Calculus AB March 26, 2009
 
Ordinary differential equation
Ordinary differential equationOrdinary differential equation
Ordinary differential equation
 

Similar to Introduction to Numerical Methods for Differential Equations Using the Euler Method

1.  Which of the following is the correct matrix representation .docx
1.  Which of the following is the correct matrix representation .docx1.  Which of the following is the correct matrix representation .docx
1.  Which of the following is the correct matrix representation .docxjackiewalcutt
 
A family of implicit higher order methods for the numerical integration of se...
A family of implicit higher order methods for the numerical integration of se...A family of implicit higher order methods for the numerical integration of se...
A family of implicit higher order methods for the numerical integration of se...Alexander Decker
 
Unit 1 Operation on signals
Unit 1  Operation on signalsUnit 1  Operation on signals
Unit 1 Operation on signalsDr.SHANTHI K.G
 
Algebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomialsAlgebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomialsJocelynSutanto
 
Module 2 polynomial functions
Module 2   polynomial functionsModule 2   polynomial functions
Module 2 polynomial functionsdionesioable
 
Solving Linear Equations
Solving Linear EquationsSolving Linear Equations
Solving Linear Equationstaco40
 
sim-140907230908-phpapp01.pptx
sim-140907230908-phpapp01.pptxsim-140907230908-phpapp01.pptx
sim-140907230908-phpapp01.pptxJeffreyEnriquez10
 
Digital text book
Digital text bookDigital text book
Digital text bookshareenapr5
 
Quadratic inequality
Quadratic inequalityQuadratic inequality
Quadratic inequalityBrian Mary
 

Similar to Introduction to Numerical Methods for Differential Equations Using the Euler Method (20)

Taller 2
Taller 2 Taller 2
Taller 2
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Section2 stochastic
Section2 stochasticSection2 stochastic
Section2 stochastic
 
Class 3.pdf
Class 3.pdfClass 3.pdf
Class 3.pdf
 
1.  Which of the following is the correct matrix representation .docx
1.  Which of the following is the correct matrix representation .docx1.  Which of the following is the correct matrix representation .docx
1.  Which of the following is the correct matrix representation .docx
 
Linear equations in Two variables
Linear equations in Two variablesLinear equations in Two variables
Linear equations in Two variables
 
A family of implicit higher order methods for the numerical integration of se...
A family of implicit higher order methods for the numerical integration of se...A family of implicit higher order methods for the numerical integration of se...
A family of implicit higher order methods for the numerical integration of se...
 
Unit 1 Operation on signals
Unit 1  Operation on signalsUnit 1  Operation on signals
Unit 1 Operation on signals
 
Algebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomialsAlgebra presentation on topic modulus function and polynomials
Algebra presentation on topic modulus function and polynomials
 
Module 2 polynomial functions
Module 2   polynomial functionsModule 2   polynomial functions
Module 2 polynomial functions
 
Solving Linear Equations
Solving Linear EquationsSolving Linear Equations
Solving Linear Equations
 
sim-140907230908-phpapp01.pptx
sim-140907230908-phpapp01.pptxsim-140907230908-phpapp01.pptx
sim-140907230908-phpapp01.pptx
 
Polynomial math
Polynomial mathPolynomial math
Polynomial math
 
Week 2
Week 2 Week 2
Week 2
 
Shareena p r
Shareena p r Shareena p r
Shareena p r
 
Shareena p r
Shareena p r Shareena p r
Shareena p r
 
Digital text book
Digital text bookDigital text book
Digital text book
 
Quadratic inequality
Quadratic inequalityQuadratic inequality
Quadratic inequality
 
Interpolation.pptx
Interpolation.pptxInterpolation.pptx
Interpolation.pptx
 
Factoring Trinomials
Factoring TrinomialsFactoring Trinomials
Factoring Trinomials
 

Recently uploaded

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

Introduction to Numerical Methods for Differential Equations Using the Euler Method

  • 1. Introduction to Numerical Methods for Differential Equations The Euler Method Matthew Henderson matthew.james.henderson@gmail.com 21 December, 2011
  • 2. Overview 1 Initial Value Problems 2 Approximate Solutions of Initial Value Problems 3 The Euler Method Matthew Henderson () Numerical Methods 21 December, 2011 2 / 15
  • 3. An Initial Value Problem Definition An initial value problem (IVP) consists of an ordinary differential equation along with an initial condition. Matthew Henderson () Numerical Methods 21 December, 2011 3 / 15
  • 4. An Initial Value Problem Definition An initial value problem (IVP) consists of an ordinary differential equation along with an initial condition. Example y = 2(x + 3) − y, y(−1) = 3 (1) Matthew Henderson () Numerical Methods 21 December, 2011 3 / 15
  • 5. An Initial Value Problem Definition An initial value problem (IVP) consists of an ordinary differential equation along with an initial condition. Example y = 2(x + 3) − y, y(−1) = 3 (1) Definition A solution is a function y(x) which satisfies both the ODE and the initial condition. Matthew Henderson () Numerical Methods 21 December, 2011 3 / 15
  • 6. The Solution The IVP (1) has a unique solution: y = 2(x + 2) + e−x−1 (2) Function y satisfies the ODE: y = 2 − e−x−1 2(x + 3) − y = 2(x + 3) − 2(x + 2) + e−x−1 = 2x + 6 − 2x − 4 − e−x−1 = 2 − e−x−1 Matthew Henderson () Numerical Methods 21 December, 2011 4 / 15
  • 7. The Solution The IVP (1) has a unique solution: y = 2(x + 2) + e−x−1 (2) Function y also satisfies the initial condition: y(−1) = 2(−1 + 2) + e−(−1)−1 = 2(1) + e1−1 = 2 + e0 = 3 Matthew Henderson () Numerical Methods 21 December, 2011 4 / 15
  • 8. A Plot of the Solution y 10 y =2(x +2) + e−x−1 8 6 4 2 x -3 -2 -1 1 2 3 Matthew Henderson () Numerical Methods 21 December, 2011 5 / 15
  • 9. A Plot of the Solution? y 10 8 6 4 2 x -3 -2 -1 1 2 3 Matthew Henderson () Numerical Methods 21 December, 2011 6 / 15
  • 10. The Euler Method Definition Given an IVP of the form: y = f(x, y), y(a) = c Matthew Henderson () Numerical Methods 21 December, 2011 7 / 15
  • 11. The Euler Method Definition Given an IVP of the form: y = f(x, y), y(a) = c To find the approximate value of y(x + h) for some small value of h: y(x + h) = y(x) + hf(x, y) (3) Matthew Henderson () Numerical Methods 21 December, 2011 7 / 15
  • 12. The Euler Method Example Going back to our example from before: y = 2(x + 3) − y, y(−1) = 3 Matthew Henderson () Numerical Methods 21 December, 2011 8 / 15
  • 13. The Euler Method Example Going back to our example from before: y = 2(x + 3) − y, y(−1) = 3 In this case f(x, y) = 2(x + 3) − y. Matthew Henderson () Numerical Methods 21 December, 2011 8 / 15
  • 14. The Euler Method Example Going back to our example from before: y = 2(x + 3) − y, y(−1) = 3 In this case f(x, y) = 2(x + 3) − y. Put h = 0.4, x = −1.0 and y = 3.0 into (3): Matthew Henderson () Numerical Methods 21 December, 2011 8 / 15
  • 15. The Euler Method Example Going back to our example from before: y = 2(x + 3) − y, y(−1) = 3 In this case f(x, y) = 2(x + 3) − y. Put h = 0.4, x = −1.0 and y = 3.0 into (3): y(−1.0 + 0.4) = y(−1.0) + 0.4f(−1.0, 3.0) Matthew Henderson () Numerical Methods 21 December, 2011 8 / 15
  • 16. The Euler Method Example Going back to our example from before: y = 2(x + 3) − y, y(−1) = 3 In this case f(x, y) = 2(x + 3) − y. Put h = 0.4, x = −1.0 and y = 3.0 into (3): y(−1.0 + 0.4) = y(−1.0) + 0.4f(−1.0, 3.0) y(−0.6) = 3.0 + 0.4(2(−1.0 + 3.0) − 3.0) Matthew Henderson () Numerical Methods 21 December, 2011 8 / 15
  • 17. The Euler Method Example Going back to our example from before: y = 2(x + 3) − y, y(−1) = 3 In this case f(x, y) = 2(x + 3) − y. Put h = 0.4, x = −1.0 and y = 3.0 into (3): y(−1.0 + 0.4) = y(−1.0) + 0.4f(−1.0, 3.0) y(−0.6) = 3.0 + 0.4(2(−1.0 + 3.0) − 3.0) = 3.0 + 0.4(4 − 3.0) Matthew Henderson () Numerical Methods 21 December, 2011 8 / 15
  • 18. The Euler Method Example Going back to our example from before: y = 2(x + 3) − y, y(−1) = 3 In this case f(x, y) = 2(x + 3) − y. Put h = 0.4, x = −1.0 and y = 3.0 into (3): y(−1.0 + 0.4) = y(−1.0) + 0.4f(−1.0, 3.0) y(−0.6) = 3.0 + 0.4(2(−1.0 + 3.0) − 3.0) = 3.0 + 0.4(4 − 3.0) = 3.4 Matthew Henderson () Numerical Methods 21 December, 2011 8 / 15
  • 19. The Euler Method We can compute more values in the same way . . . x = −0.6 and y = 3.4: y(−0.6 + 0.4) = 3.4 + 0.4(2(−0.6 + 3) − 3.4) y(−0.2) = 3.4 + 0.4(4.8 − 3.4) = 3.96 Matthew Henderson () Numerical Methods 21 December, 2011 9 / 15
  • 20. The Euler Method We can compute more values in the same way . . . x = −0.6 and y = 3.4: y(−0.6 + 0.4) = 3.4 + 0.4(2(−0.6 + 3) − 3.4) y(−0.2) = 3.4 + 0.4(4.8 − 3.4) = 3.96 x = −0.2 and y = 3.96: y(−0.2 + 0.4) = 3.96 + 0.4(2(−0.2 + 3) − 3.96) y(0.2) = bluey + 0.4(5.6 − 3.96) = 4.616 Matthew Henderson () Numerical Methods 21 December, 2011 9 / 15
  • 21. The Euler Method We continue to construct a table row-by-row: x y hf(x, y) -1.0 3.000000 0.400000 -0.6 0.560000 -0.2 3.960000 0.656000 0.2 4.616000 0.713600 0.6 5.329600 0.748160 1.0 6.077760 0.768896 1.4 6.846656 0.781338 1.8 7.627994 0.788803 2.2 8.416796 0.793281 2.6 9.210078 0.795969 3.0 10.00605 0.797581 Matthew Henderson () Numerical Methods 21 December, 2011 10 / 15
  • 22. The Euler Method We continue to construct a table row-by-row: x y hf(x, y) -1.0 3.000000 0.400000 -0.6 3.400000 0.560000 -0.2 3.960000 0.656000 0.2 4.616000 0.713600 0.6 5.329600 0.748160 1.0 6.077760 0.768896 1.4 6.846656 0.781338 1.8 7.627994 0.788803 2.2 8.416796 0.793281 2.6 9.210078 0.795969 3.0 10.00605 0.797581 Matthew Henderson () Numerical Methods 21 December, 2011 10 / 15
  • 23. The Euler Method: Comparison Now when we plot those values we get something that begins to look like our exact solution, albeit only on the interval [−1, 3]. y 10 y =2(x +2) + e−x−1 8 6 4 2 x -3 -2 -1 1 2 3 Matthew Henderson () Numerical Methods 21 December, 2011 11 / 15
  • 24. The Euler Method: Comparison The numbers which we computed for y are not exactly correct but the errors involved are quite small: x y (approx) y (exact) Error -1.0 3.000000 3.000000 0.000000 -0.6 3.400000 3.470320 0.070320 -0.2 3.960000 4.049329 0.089329 0.2 4.616000 4.701194 0.085194 0.6 5.329600 5.401896 0.072296 1.0 6.077760 6.135335 0.057575 1.4 6.846656 6.890718 0.044062 1.8 7.627994 7.660810 0.032816 2.2 8.416796 8.440762 0.023966 2.6 9.210078 9.227324 0.017246 3.0 10.00605 10.018316 0.012269 Matthew Henderson () Numerical Methods 21 December, 2011 12 / 15
  • 25. The Euler Method: Where does it come from? Given an initial value problem of the form: y = f(x, y), y(a) = c we want to find the approximate value of y(b) for some b > a. From the definition of derivative: y(x + h) − y(x) y (x) ≈ h for h > 0 given and small. So, y(x + h) − y(x) f(x, y) ≈ h which gives y(x + h) ≈ y(x) + hf(x, y) Matthew Henderson () Numerical Methods 21 December, 2011 13 / 15
  • 26. The Euler Method: Why does it work? y =2(x +2) + e−x−1 10 8 6 4 2 -3 -2 -1 1 2 3 Matthew Henderson () Numerical Methods 21 December, 2011 14 / 15
  • 27. The End Merry Christmas! Matthew Henderson () Numerical Methods 21 December, 2011 15 / 15