Вы находитесь на странице: 1из 11

NumericalDifferentiation&Integration 09102017

Numerical Differentiation

Forward Difference O(h)

Taylor expansion of f(x+h):

Backward difference: O(h)

Central difference: O(h2 )


ESO208A:AbhijeetSwain

ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 1
NumericalDifferentiation&Integration 09102017

Numerical Differentiation: Richardson Extrapolation


Richardsons extrapolation can be viewed as a general procedure for
improving the accuracy of approximations when the structure of the error is
known.

Taylor expansions:

ESO208A:AbhijeetSwain

General Term for: O( )

2
2
4 1

ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 2
NumericalDifferentiation&Integration 09102017

Forward Difference O :


. . .
2! 3!


. .
2! 3!

. . . .

2
2 . 2 . . .
2

. O

ESO208A:AbhijeetSwain

Forward Difference:
Error Order

Backward Difference:

Central Difference:

ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 3
NumericalDifferentiation&Integration 09102017

Q2) The velocity of an object, travelling along a straight line, was measured at various
times as follows:

Time (min) 0 1 2 3 4 5 6 7 8 9 10
Velocity 0.00 0.65 1.72 3.48 6.39 11.18 19.09 32.12 53.60 89.02 147.41
(cm/min)

Estimate the acceleration at 5 minutes using:


(i) forward difference, O(h2), with h=1 min,
(ii) backward difference, O(h2), with h=1 min, and
(iii) central difference O(h2) with h=1, 2, and 3 min. Use Richardson extrapolation to
obtain an O(h6) estimate from the three central difference estimates.

3 f i 4 f i 1 f i 2 3 f i 4 f i 1 f i 2 f f
f i f i f i i 1 i 1
2h 2h 2h

ESO208A:AbhijeetSwain

Numerical Integration

Newton-Cotes Formula that states if


one can approximate the integrand as an
nth order polynomial, then the integral
of that function is approximated by the
integral of that (n)th order polynomial.

b b

f ( x ) fn( x )
a a

ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 4
NumericalDifferentiation&Integration 09102017

Rectangle rule Mid-point rule

ESO208A:AbhijeetSwain

Trapezoidal rule

f (a) f (b)
b

f ( x)dx (b a)
a
2

ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 5
NumericalDifferentiation&Integration 09102017

Multiple segment Trapezoidal rule

ba
The integral I can be broken into h integrals as: h
n
b ah a 2h a ( n 1 ) h b

f ( x )dx f ( x )dx f ( x )dx ... f ( x )dx f ( x )dx


a a ah a ( n 2 )h a ( n 1 )h

ba n 1
f ( a ) 2 f ( a ih ) f ( b )
2n i 1

h n 1
b

f ( x) dx f ( a ) 2 f ( xi ) f (b)
a
2 i 1
ESO208A:AbhijeetSwain

Simpsons 1/3rd Rule


b b
I f ( x )dx f 2 ( x )dx
a a

f 2 ( x ) a0 a1 x a2 x 2

b
ba ab ba
f 2 ( x ) dx f (a ) 4 f f (b ) h
a
6 2 2

b
h ab
f 2 ( x )dx f ( a ) 4 f f ( b )
a 3 2
ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 6
NumericalDifferentiation&Integration 09102017

Multiple Segment Simpsons 1/3rd Rule


b x2 x4
f ( x )dx f ( x )dx f ( x )dx .....
a x0 x2

xn 2 xn
.... f ( x )dx f ( x )dx
xn 4 xn 2

Apply Simpsons 1/3rd Rule over each interval,

f ( x0 ) 4 f ( x1 ) f ( x2 ) f ( x2 ) 4 f ( x3 ) f ( x4 )
b

f ( x)dx ( x
a
2 x0 )
6 ... ( x4 x2 )
6 ...

f ( xn 4 ) 4 f ( x n 3 ) f ( xn 2 ) f ( xn 2 ) 4 f ( xn 1 ) f ( xn )
( xn 2 xn 4 ) ( xn xn 2 )
6 6

b n 1 n2

h
f ( x)dx f ( x0 ) 4 f ( xi ) 2 f ( xi ) f ( xn )
3 i 1 i 2


a
i odd i even
ESO208A:AbhijeetSwain

Simpsons 3/8 Rule


f 3 ( x) a0 a1 x a2 x 2 a3 x 3
x0 a
1 x0 x02 x03 a0 f x0 b a 2a b
x1 a h a
1 x1 x12 x13 a1 f x1 3 3

2b 2a a 2b
1 x2 x22 x23 a2 f x2 x2 a 2 h a
3

3

1 x3 x32 x33 a3 f x3 x3 a 3h a
3b 3a
b

3

Method 2: Using Lagrange interpolation

f 3 x
x x1 x x2 x x3 f x x x0 x x2 x x3 f x
x0 x1 x0 x2 x0 x3 0
x1 x0 x1 x2 x1 x3 1


x x0 x x1 x x3 f x x x0 x x1 x x2 f x
x2 x0 x2 x1 x2 x3 3
x3 x0 x3 x1 x3 x2 3

ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 7
NumericalDifferentiation&Integration 09102017

Simpsons 3/8 Rule


3h
I f x0 3 f x1 3 f x2 f x3
8

Multi-Segment Simpsons 3/8 Rule


3h n2 n 1 n 3
I 0
f x 3 f xi 3 f xi 2 f xi f xn
8 i 1, 4, 7,.. i 2,5,8,.. i 3, 6,9,..

ESO208A:AbhijeetSwain

Romberg Integration Rule


Romberg Integration is an extrapolation formula of the Trapezoidal
Rule for integration. It provides a better approximation of the integral
by reducing the True Error.

The true error in a multiple segment Trapezoidal Rule with n segments for
an integral I, is given by:

n

b b b a 3 f i
Et f ( x) dx f1 ( x)dx i 1

12n
2
a a
n

1 C
Et 2 Et 2 TV I n
n n
ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 8
NumericalDifferentiation&Integration 09102017

Applying Richardsons Extrapolation :

C C I 2n I n
TV I n TV I 2 n TV I 2 n
n2 ( 2n) 2 3

ESO208A:AbhijeetSwain

Gauss Quadrature Integration


Previously, the Trapezoidal Rule was developed by the method
of undetermined coefficients.
b

f ( x)dx c f (a) c
a
1 2 f (b)

ba ba
f (a) f (b)
2 2
The two-point Gauss Quadrature Rule is an extension of the
Trapezoidal Rule approximation where the arguments of the
function are not predetermined as a and b but as unknowns
x1 and x2. In the two-point Gauss Quadrature Rule, the integral is
approximated as

b
I f ( x )dx c1 f ( x1 ) c 2 f ( x 2 )
a

ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 9
NumericalDifferentiation&Integration 09102017

b
x4
f ( x )dx a0 a1 x a 2 x a3 x dx
b b
x2 x3
2 3
a0 x a1 a 2 a3
a a 2 3 4 a

b2 a2 b3 a3 b4 a4
a0 b a a1 a 2 a3
2 3 4
It follows that:

f ( x )dx c1 a0 a1 x1 a 2 x1 a3 x1 c2 a0 a1 x2 a 2 x2 a3 x2
b
2 3 2 3

Since the constants a0, a1, a2, a3 are arbitrary

b2 a2
b a c1 c2 c1 x1 c2 x2
2

b3 a 3 b4 a4
c1 x1 c2 x2
2 2
c1 x1 c 2 x 2
3 3
3 4
ESO208A:AbhijeetSwain

The previous four simultaneous nonlinear Equations


have only one acceptable solution,

b a 1 b a ba
x1 c1
2 3 2 2

b a 1 b a ba
x2 c2
2 3 2 2

Hence Two-Point Gaussian Quadrature Rule:


b

f (x)dx c f x c f x
a
1 1 2 2

ba ba 1 ba ba ba 1 ba
f f
2 2 3 2 2 2 3 2
ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 10
NumericalDifferentiation&Integration 09102017

Three-point Gauss Quadrature

f ( x)dx c f ( x ) c
a
1 1 2 f ( x2 ) c3 f ( x3 )

a0 a1 x a 2 x a3 x a 4 x a5 x dx
b
2 3 4 5

ESO208A:AbhijeetSwain

Tutor(ESO208A):AbhijeetSwain,
SeniorResearchScholar,CivilEngineering
Department,IITKanpur. 11

Вам также может понравиться