# Numerical Differentiation and Integration - PowerPoint PPT Presentation

PPT – Numerical Differentiation and Integration PowerPoint presentation | free to view - id: da211-YTQyN

The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
Title:

## Numerical Differentiation and Integration

Description:

### A car laps a race track in 84 seconds. The speed of the car at each 6-second interval is determined by a radar gun. Length of the lap? ... – PowerPoint PPT presentation

Number of Views:1091
Avg rating:5.0/5.0
Slides: 24
Provided by: peter361
Category:
Transcript and Presenter's Notes

Title: Numerical Differentiation and Integration

1
Numerical Differentiation and Integration
2
Representing, manipulating functions
• Represent f(x) when it can be evaluated at any
point
• Represent f(x) when (x1,f1), (x2,f2),, (xn,fn)
are available (only)
• Interpolation - Smoothing
• Num Differentiation
• Num Integration

3
Representing, manipulating functions that can be
evaluated anywhere
Integration Not Sensitive to Round-Off Step-siz
e the less, the result is better (except for
VERY small step size)
Differentiation Sensitive to Round-Off Step-siz
e optimum
4
Numerical Differentiation of functions that can
be evaluated everywhere
Backward Divided Difference
Forward Divided Difference
Central Divided Difference
First or Higher Order
5
Taylors series
• Or, using a simpler notation,
• We assume that f and all its derivatives are
continuous between xi and xi1

6
Taylors series
• We know everything at the central point, xi.
i.e., we know fi, fi, fi, etc.
• We know nothing at other points but f(x) no
derivatives.

7
Truncation error
• If we save only the first 3 terms,
• Then the truncation error is
• Or, etr O(h3) (third order)

8
Derive forward diff. for fi
Rearranging,
9
Derive Central Diff. of f
Taylors series
substract
Divide by 2h
Sign does not matter
10
Derive central diff. for fi
Rearranging,
11
Example Numerical Derivatives (Forward Divided
Difference)
First Derivative
Second Derivative
1st order
2nd order
See more forward finite-differences In your book
12
Numerical Integration
13
Representing, manipulating functions that can be
evaluated anywhere
Integration Not Sensitive to Round-Off Step-siz
e the less, the result is better (except for
VERY small step size)
Differentiation Sensitive to Round-Off Step-siz
e optimum
14
Numerical Integration Engineering Meaning
• Determine Hydrocarbon Volume if re 3000 ft and

re
How would you calculate average porosity? How
would you calculate average water saturation? Do
you need them to get the Hydrocarbon Volume?
15
Numerical Integration(Closed Formulas)
Trapesoidal Rule
Simpsons Rule (simple)
h
h
h
16
Trapesoidal Rule (one panel)
h
17
Trapezoidal rule(n panels)
18
Repeated Simpson's 1/3 rule
weights 1 4 2 4 4 2 4 1
panel
h
h
k panels 2k intervals h ?
a
b
(k2)
(general)
19
How to program (the repeated) Simpsons 1/3 rule
• Select number of panels k (2 k will give the
total number of intervals)
• h(b-a)/(2k)
• Treat the first and last point separately
• Sum the second, fourth etc. and multiply by 4
• Sum the third, fifth etc. and multiply by 2
• Do the first and last, do not forget the h/3

20
Integration accuracy order
• Trapezoidal O(h2)
• Simpsons 1/3 rule - O(h3)

21
Richardson extrapolation
• Do calculation with h and with h/2
• Express remainder term as a power of h
• Try to extrapolate to infinitely small h

Example repeated Simpsons rule
22
Integration of a function available only at
discrete points
23
A car laps a race track in 84 seconds. The speed
of the car at each 6-second interval is
determined by a radar gun.Length of the lap?
Time, sec Speed, ft/sec