Lecture 20 Ordinary Differential Equations IVP - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

Lecture 20 Ordinary Differential Equations IVP

Description:

Choose (c1, c2, x1, x2) such that the method yields 'exact integral' for f(x) ... We will normally truncate the Taylor series, when the contribution of the last ... – PowerPoint PPT presentation

Number of Views:72
Avg rating:3.0/5.0
Slides: 34
Provided by: San59
Category:

less

Transcript and Presenter's Notes

Title: Lecture 20 Ordinary Differential Equations IVP


1
Lecture 20 - Ordinary Differential Equations -
IVP
  • CVEN 302
  • July 24, 2002

2
Lectures Goals
Integration Methods (cont.)
  • Gaussian Quadrature
  • Taylor Series Method
  • Euler and Modified Euler Methods
  • Runge-Kutta Method
  • Multistep Method
  • Adam Bashforth
  • Adam Moulton Method
  • Predictor-Corrector Method
  • Stability

ODE Methods
3
Gaussian Quadratures
  • Newton-Cotes Formulae
  • use evenly-spaced functional values
  • Gaussian Quadratures
  • select functional values at non-uniformly
    distributed points to achieve higher accuracy
  • change of variables so that the interval of
    integration is -1,1
  • Gauss-Legendre formulae

4
Gaussian Quadrature on -1, 1
x2
x1
-1
1
  • Choose (c1, c2, x1, x2) such that the method
    yields exact integral for f(x) x0, x1, x2, x3

5
Gaussian Quadrature on -1, 1
  • Exact integral for f x0, x1, x2, x3
  • Four equations for four unknowns

6
Gaussian Quadrature on -1, 1
  • Choose (c1, c2, c3, x1, x2, x3) such that the
    method yields exact integral for f(x) x0, x1,
    x2, x3,x4, x5

7
Gaussian Quadrature on -1, 1
8
Gaussian Quadrature on -1, 1
  • Exact integral for f x0, x1, x2, x3, x4, x5

9
Gaussian Quadrature on a, b
  • Coordinate transformation from a,b to -1,1

t2
t1
a
b
10
Example Gaussian Quadrature
  • Evaluate
  • Coordinate transformation
  • Two-point formula

11
Example Gaussian Quadrature
  • Three-point formula
  • Four-point formula

12
End of Exam 2
13
Taylor Series Method
The Taylor series method is a straight forward
adaptation of classic calculus to develop the
solution as an infinite series. The catch is
that a computer usually can not be programmed to
construct the terms and one does not know how
many terms should be used. The method is not
strictly a numerical method but is use in
conjunction with numerical schemes.
14
Taylor Series Method
Consider
The initial conditions is
The analytical solution
15
Taylor Series Method
From the Taylor series expansion The step size
is defined as Using the initial condition, the
higher order derivatives of the equation can be
obtained.
16
Taylor Series Method
The higher order derivatives can be found with
the initial condition, y(0) 1, and the equation

17
Taylor Series Method
From the Taylor series expansion Plug in the
initial conditions Resulting in the equation
18
Taylor Series Example
The results
19
Taylor Series Example
Note that the last set of terms, you start to
lose accuracy for the 4th order All we know is
that it is in the range of 0lt x ltDh
20
Taylor Series Method
Numerical analysis is an art. The number of
terms, we chose is a mater of judgment and
experience. We will normally truncate the Taylor
series, when the contribution of the last term is
negligible to the number of decimal places to
which we are working.
21
Taylor Series Method
Taylor series applicable to higher order
equations, but one needs more initial
conditions The initial conditions are
22
Taylor Series Method
We can use the initial conditions to get the
higher derivative, however it will become more
complicated. The higher order terms can be
calculated from previous values and they are
difficult to calculate.
23
Euler Method
As you can see the Taylor series method is a bit
awkward to apply as the derivatives become more
complex. There are errors in finding the
derivatives. One thing about the Taylor series,
is that the error is small when the Dh is small
and only a few terms are need for good accuracy.
24
Euler Method
The Euler method may be though of as extreme of
the idea for a Taylor series having a small error
when Dh is extremely small. The Euler method is
a first-order Taylor series with each step having
an upgrade of the derivative and y term changed.

25
Euler Method
The Euler method can have the algorithm, where
the coefficients are upgraded each time step.
The first derivative and the initial y values
are update each iteration.
26
Eulers MethodFirst-order Taylor Method
Straight line approximation
y0
x0
x1
x2
x3
h
h
h
27
Eulers Method Example
Consider The initial condition is The step
size is The analytical solution is
28
Eulers Method Example
The algorithm has a loop using the initial
conditions and definition of the derivative The
derivative is calculated as The next y value is
calculated Take the next step
29
Eulers Method Example
The results
30
Eulers Method Example
31
Eulers Method
  • The trouble with this method is
  • Lack of accuracy
  • Small step size

Note for the simple Euler method, we use the
slope at the beginning of the interval , to
determine the increment to the function, but this
is always wrong. If the the slope is constant,
the solution is linear.
32
Summary
  • Gaussian Quadrature
  • Taylor Series Expansion
  • Euler Method

33
Homework
  • Check the Homework webpage
Write a Comment
User Comments (0)
About PowerShow.com