0% found this document useful (0 votes)
184 views20 pages

C04-Defferentiation and Integration

This document discusses numerical differentiation and integration techniques. It introduces Taylor series approximations to calculate derivatives and integrals numerically. Specific techniques covered include forward and backward finite differences, central differences, Trapezoidal and Simpson's rules for numerical integration, and Gaussian quadrature. Readings are assigned on multi-point differentiation formulas, Newton-Cotes integration formulas, and transforming functions for Gaussian quadrature. Examples are provided to demonstrate the techniques.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views20 pages

C04-Defferentiation and Integration

This document discusses numerical differentiation and integration techniques. It introduces Taylor series approximations to calculate derivatives and integrals numerically. Specific techniques covered include forward and backward finite differences, central differences, Trapezoidal and Simpson's rules for numerical integration, and Gaussian quadrature. Readings are assigned on multi-point differentiation formulas, Newton-Cotes integration formulas, and transforming functions for Gaussian quadrature. Examples are provided to demonstrate the techniques.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 20

5/5/2012 by Adam Pamudji R 1

Numerical Differentiation
5/5/2012 by Adam Pamudji R 2
First Order Derivative
First Order Taylor Series for x closed to x
0
( ) ( )
( )
( )
0
0 1
0
0 0 0 1
) (
) ( '
) ( ' ) (
x x
x f x P
x f
x x x f x f x P

~
+ ~
5/5/2012 by Adam Pamudji R 3
graphical explanation
( ) ( )
( )
( )
0
0 1
0
0 0 0 1
) (
) ( '
) ( ' ) (
x x
x f x P
x f
x x x f x f x P

~
+ ~
x
0 x>x
0
x<x
0
forward difference
backward difference
) ( '
0
x f
) (
0
x f
( ) x P x f
1
) ( ~ ( ) x P x f
1
) ( ~
( )
( )
0
0
0
) (
) ( '
x x
x f x f
x f

~
5/5/2012 by Adam Pamudji R 4
( )
h
x f h x f
x f
) (
) ( '
0 0
0
+
~
If x = x
0
+ h, then for forward difference we have
If x = x
0
- h, then for backward difference we have
( ) ( )
h
h x f x f
h
x f h x f
x f

=


~
0 0 0 0
0
) ( ) (
) ( '
5/5/2012 by Adam Pamudji R 5
First Order Derivative
Second Order Taylor Series for x closed to x
0
( ) ( )
( )
( )
( )
( ) ( )
( ) ( )
h
h x f h x f
x f
x f h h x f h x f
h x f
h x f x f h x f
h x f
h x f x f h x f
x x x f
x x x f x f x P
2
) ( '
0 ) ( ' 2 0
2
) ( ' '
) ( ' ) (
2
) ( ' '
) ( ' ) (
! 2
) ( ' '
) ( ' ) (
0 0
0
0 0 0
2
0
0 0 0
2
0
0 0 0
2
0 0
0 0 0 2
+
~
+ + ~ +
+ ~
+ + ~ +

+ + ~
5/5/2012 by Adam Pamudji R 6
graphical explanation
( )
h
h x f h x f
x f
2
) (
) ( '
0 0
0
+
~
x
0
x
0
-h
central difference
) ( '
0
x f
) (
0
x f
) (
0
h x f + ) (
0
h x f
x
0
+h
5/5/2012 by Adam Pamudji R 7
Reading Assignment
Please read page 146 to 150 section 4.1
for another approach
Find about:
The three point formulas
The five point formulas

5/5/2012 by Adam Pamudji R 8
Second Order Derivative
Second Order Taylor Series for x closed to x
0
( )
( )
( ) ( )
( ) ( )
2
0 0 0
0
2
0 0 0 0
2
0
0 0 0
2
0
0 0 0
) ( 2
) ( ' '
) ( ' ' 0 ) ( 2
2
) ( ' '
) ( ' ) (
2
) ( ' '
) ( ' ) (
h
h x f x f h x f
x f
h x f x f h x f h x f
h x f
h x f x f h x f
h x f
h x f x f h x f
+ +
~
+ + ~ + +
+ ~
+ + ~ +
5/5/2012 by Adam Pamudji R 9
Differentiation from interpolation
function
The use of polynomials in approximation
problems allow us to find the derivative
and integral from that functions.
Read page 145 and 146

5/5/2012 by Adam Pamudji R 10
Differentiation and Integration
( ) ( )
( ) ( )
( ) ( )
} }
~
~
~
dx x f dx x P
x f x P
x f x P
n
n
n
' '
5/5/2012 by Adam Pamudji R 11
Differentiation
( ) ( ) ( )
( ) ( ) ( ) x L
dx
d
x f
x L x f
dx
d
x P
i n
n
i
i
n
i
i n i n
,
0
0
,
'


=
=
=
|
.
|

\
|
=
5/5/2012 by Adam Pamudji R 12
Differentiation
( )
( )
( )
( ) ( )
( )
( )
[
[
[
=
=
=
=
=
=
=
=
=
|
|
|
|
.
|

\
|

=
n
i j
j
n
i l
j l
l
l
n
i j
j
j i
i n
n
i j
j
j i
j
i n
x x
x x
x L
dx
d
x x
x x
x L
0 0
0
,
0
,
1
5/5/2012 by Adam Pamudji R 13
Numerical Integration
We can use the
interpolation function
to approximate an
integral
( ) ( )
( ) ( )
} }
~
~
dx x P dx x f
x P x f
n
n
( ) ( ) ( )
( ) ( ) ( )dx x L x f
dx x L x f dx x P
b
a
i n
n
i
i
b
a
n
i
i n i
b x
a x
n
}

}

}
=
=
=
=
=
|
.
|

\
|
=
,
0
0
,
5/5/2012 by Adam Pamudji R 14
Numerical Integration
For the first and second Lagrange
polynomials with equally spaced nodes
Trapezoidal rule
Simpsons rule
Read page 163 to 165
Learn about closed and open Newton-
Cotes formulas (p 168 to p 173)
5/5/2012 by Adam Pamudji R 15
Trapezoidal rule
For function f(x)
between x
0
=a and
x
1
=b
h = x
1
x
0


| | ) ( ' '
12
) ( ) (
2
) (
3
1 0
f
h
x f x f
h
dx x f
b
a
+ =
}
a=x
0
b=x
1
f
P
1
x
y
5/5/2012 by Adam Pamudji R 16
Simpson rule
| |
) (
90
) ( ) ( 4 ) (
3
) (
) 4 (
5
2 1 0
f
h
x f x f x f
h
dx x f
b
a

+ + =
}
For function f(x)
between x
0
=a and
x
2
=b
a=x
0
b=x
2
f
P
1
x
y
x
1
5/5/2012 by Adam Pamudji R 17
Closed and Open Newton-Cotes
Closed N-C
Trapezoidal rule
Simpsons rule
Simpsons three-eight rule
Open N-C
Midpoint rules: n=0
n=1
n=2
a=x
-1
b=x
1
f
P
1
x
y
x
0
5/5/2012 by Adam Pamudji R 18
Examples
See the excel file
5/5/2012 by Adam Pamudji R 19
Numerical Integration
Gaussian Quadrature
For a given known function
Optimizing accuracy by selecting best position
of nodes.
By using a standard tabulated coeff and node
positions, it is necessary to transform linearly
the function to an interval [-1,1]
5/5/2012 by Adam Pamudji R 20
Gauss Quadrature
Read page 198 to 204
Example file

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy