Handout 9 NA - For Merge

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Mohsin Raza/Handout 9 -1- Numerical Analysis CS-572

Lecture 15 &16
Initial-Value Problemsfor Ordinary Differential Equations
The motion of a swinging pendulum under certain simplifying assumptions is described by
the second-order differential equation




Well-Posed Problems
Now that we have, to some extent, taken care of the question of when initial-value problems
have unique solutions, we can move to the second important consideration when
approximating the solution to an initial-value problem. Initial-value problems obtained by
observing physical phenomena generally only approximate the true situation, so we need to
know whether small changes in the statement of the problem introduce correspondingly small
changes in the solution. This is also important because of the introduction of round-off error
when numerical methods are used. That is,
Mohsin Raza/Handout 9 -2- Numerical Analysis CS-572
Question: How do we determine whether a particular problem has the property that small
changes, or perturbations, in the statement of the problem introduce correspondingly
small changes in the solution?


The basic method involved in approximating
( )
b
a
f x dx
}
is called numerical quadrature.
let us consider formulas produced by using first and second Lagrange polynomials with
equally-spaced nodes. This gives the Trapezoidal rule and Simpsons rule,
Recall (handout 1 lecture 2)
Theorem 1.13 (Weighted mean value theorem for integrals)
Suppose
| |
, , f C a b e the Riemann integral of g exists on
| |
a , b , and
( )
g x does not
change sign on
| |
, , a b then there exists a number c in
( )
a , b , with
( ) ( ) ( ) ( )
b b
a a
f x g x dx f c g x dx =
} }

The Trapezoidal Rule
When we use the term trapezoid we mean a four-sided figure that has at least two of its sides
parallel. The European term for this figure is trapezium. To further confuse the issue, the
European word trapezoidal refers to a four-sided figure with no sides equal, and the
American word for this type of figure is trapezium.
Derivation of Trapezoidal Formula
To derive the Trapezoidal rule for approximating
( )
b
a
f x dx
}
,let
0
, x a =
1
, x b h b a = =
and use the linear Lagrange polynomial:






Mohsin Raza/Handout 9 -3- Numerical Analysis CS-572






Note
The error term for the Trapezoidal rule involves ( )
f x '' , so the rule gives the exact result
when applied to any function whose second derivative is identically zero, that is, any
polynomial of degree one or less.

Mohsin Raza/Handout 9 -4- Numerical Analysis CS-572

Class Task
Compare the Trapezoidal rule and Simpsons rule approximations to
( )
2
0
f x dx
}
when
( )
f x is

Solution


-------------------------------------------------------------------------------------------


This lesson is identical to the lecture which is presented in the Class and
this lesson is not intended as a complete set of lecture for the course: there
are many things explained in the lecture that arent in these notes.
Important for the Readers

You might also like