SlideShare ist ein Scribd-Unternehmen logo
1 von 51
NUMERICAL DIFFERENTIATION
The derivative of f (x) at x0 is:

f ′( x 0 ) =

Limit
h→ 0

f ( x0 + h) − f ( x0 )
h

An approximation to this is:

f ( x0 + h) − f ( x0 )
f ′( x 0 ) ≈
h

for small values of h.

Forward Difference
Formula
Let f ( x ) = ln x and x0 = 1.8
Find an approximate value for f ′(1.8)

h

f (1.8)

f (1.8 + h)

0.1 0.5877867 0.6418539

f (1.8 + h) − f (1.8)
h
0.5406720

0.01 0.5877867 0.5933268

0.5540100

0.001 0.5877867 0.5883421

0.5554000

The exact value of

f ′(1.8) = 0.55 5
Assume that a function goes through three points:

( x0 , f ( x0 ) ) , ( x1 , f ( x1 ) ) and ( x2 , f ( x2 ) ) .
f ( x) ≈ P( x)
P ( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 ) + L2 ( x ) f ( x2 )
Lagrange Interpolating Polynomial
P ( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 ) + L2 ( x ) f ( x 2 )

( x − x1 )( x − x2 )
P( x) =
f ( x0 )
( x0 − x1 )( x0 − x2 )
( x − x0 )( x − x2 )
+
f ( x1 )
( x1 − x0 )( x1 − x2 )
( x − x0 )( x − x1 )
+
f ( x2 )
( x2 − x0 )( x2 − x1 )
f ′( x ) ≈ P ′( x )

2 x − x1 − x2
P ′( x ) =
f ( x0 )
( x0 − x1 )( x0 − x2 )
2 x − x0 − x2
+
f ( x1 )
( x1 − x0 )( x1 − x2 )
2 x − x0 − x1
+
f ( x2 )
( x2 − x0 )( x2 − x1 )
If the points are equally spaced, i.e.,

x1 = x0 + h and x 2 = x0 + 2h
2 x0 − ( x0 + h) − ( x0 + 2h)
P ′( x0 ) =
f ( x0 )
{ x0 − ( x0 + h)}{ x0 − ( x0 + 2h)}
2 x0 − x0 − ( x0 + 2h)
+
f ( x1 )
{ ( x0 + h) − x0 }{ ( x0 + h) − ( x0 + 2h)}
2 x0 − x0 − ( x0 + h)
+
f ( x2 )
{ ( x0 + 2h) − x0 }{ ( x0 + 2h) − ( x0 + h)}
− 3h
− 2h
−h
P ′( x 0 ) =
f ( x0 ) +
f ( x1 ) + 2 f ( x 2 )
2
2
2h
−h
2h
1
{ − 3 f ( x0 ) + 4 f ( x1 ) − f ( x2 ) }
P ′( x0 ) =
2h
Three-point formula:

1
{ − 3 f ( x0 ) + 4 f ( x0 + h) − f ( x0 + 2h) }
f ′( x0 ) ≈
2h
If the points are equally spaced with x0 in the middle:

x1 = x0 − h and x 2 = x0 + h

2 x0 − ( x0 − h) − ( x0 + h)
P ′( x0 ) =
f ( x0 )
{ x0 − ( x0 − h)}{ ( x0 − ( x0 + h)}
2 x0 − x0 − ( x0 + h)
+
f ( x1 )
{ ( x0 − h) − x0 }{ ( x0 − h) − ( x0 + h)}
2 x0 − x0 − ( x0 − h)
+
f ( x2 )
{ ( x0 + h) − x0 }{ ( x0 + h) − ( x0 − h)}
0
−h
h
P ′( x 0 ) =
f ( x0 ) + 2 f ( x1 ) + 2 f ( x 2 )
2
−h
2h
2h
Another Three-point formula:

1
{ f ( x0 + h) − f ( x0 − h) }
f ′( x0 ) ≈
2h
Alternate approach (Error estimate)
Take Taylor series expansion of f(x+h) about x:
2

3

h ( 2)
h ( 3)
f ( x + h) = f ( x ) + hf ′( x ) +
f ( x) +
f ( x) + 
2
3!
h2 ( 2 )
h3 ( 3 )
f ( x + h) − f ( x ) = hf ′( x ) +
f ( x) +
f ( x) + 
2
3!
f ( x + h) − f ( x )
h ( 2)
h2 ( 3 )
= f ′( x ) + f ( x ) +
f ( x) + 
h
2
3!
.............. (1)
f ( x + h) − f ( x )
= f ′( x ) + O ( h)
h
f ( x + h) − f ( x )
f ′( x ) =
− O ( h)
h
f ( x + h) − f ( x )
f ′( x ) ≈
h

Forward Difference
Formula

h ( 2)
h2 ( 3 )
O ( h) = f ( x ) +
f ( x) +
2
3!
4h 2 ( 2 )
8h 3 ( 3 )
f ( x + 2h) = f ( x ) + 2hf ′( x ) +
f ( x) +
f ( x) + 
2
3!
4h 2 ( 2 )
8h 3 ( 3 )
f ( x + 2h) − f ( x ) = 2hf ′( x ) +
f ( x) +
f ( x) + 
2
3!
f ( x + 2h ) − f ( x )
2h ( 2 )
4h 2 ( 3 )
= f ′( x ) +
f ( x) +
f ( x) + 
2h
2
3!
................. (2)
f ( x + h) − f ( x )
h ( 2)
h ( 3)
= f ′( x ) + f ( x ) +
f ( x) + 
h
2
3!
.............. (1)
2

f ( x + 2h ) − f ( x )
2h ( 2 )
4h 2 ( 3 )
= f ′( x ) +
f ( x) +
f ( x) + 
2h
2
3!
................. (2)

2 X Eqn. (1) – Eqn. (2)
f ( x + h) − f ( x ) f ( x + 2h) − f ( x )
2
−
h
2h
2 h2 ( 3 )
6 h3 ( 4 )
= f ′( x ) −
f ( x) −
f ( x) − 
3!
4!
− f ( x + 2 h) + 4 f ( x + h) − 3 f ( x )
2h
2
3
2h ( 3 )
6h ( 4 )
′( x ) −
= f
f ( x) −
f ( x) − 
3!
4!
= f ′ ( x ) + O h2

( )
− f ( x + 2h ) + 4 f ( x + h ) − 3 f ( x )
= f ′( x ) + O h2
2h

( )

− f ( x + 2h ) + 4 f ( x + h ) − 3 f ( x )
f ′( x ) =
− O h2
2h

( )

− f ( x + 2h ) + 4 f ( x + h ) − 3 f ( x )
f ′( x ) ≈
2h
Three-point Formula

( )

2 h2 ( 3 )
6 h3 ( 4 )
O h2 = −
f ( x) −
f ( x) − 
3!
4!
The Second Three-point Formula
Take Taylor series expansion of f(x+h) about x:

h2 ( 2 )
h3 ( 3 )
f ( x + h) = f ( x ) + hf ′( x ) +
f ( x) +
f ( x) +
2
3!
Take Taylor series expansion of f(x-h) about x:
2

3

h ( 2)
h ( 3)
f ( x − h) = f ( x ) − hf ′( x ) +
f ( x) −
f ( x) + 
2
3!
Subtract one expression from another

2h 3 ( 3 )
2h 6 ( 6 )
f ( x + h) − f ( x − h) = 2hf ′( x ) +
f ( x) +
f ( x) + 
3!
6!
2h 3 ( 3 )
2h 6 ( 6 )
f ( x + h) − f ( x − h) = 2hf ′( x ) +
f ( x) +
f ( x) + 
3!
6!

f ( x + h) − f ( x − h)
h2 ( 3)
h5 ( 6 )
= f ′( x ) +
f ( x) +
f ( x) + 
2h
3!
6!
f ( x + h) − f ( x − h) h 2 ( 3 )
h5 ( 6 )
f ′( x ) =
−
f ( x) −
f ( x) − 
2h
3!
6!
f ′( x ) =

f ( x + h ) − f ( x − h)
+ O h2
2h

( )

( )

h2 ( 3)
h5 ( 6 )
O h2 = −
f ( x) −
f ( x) − 
3!
6!

f ( x + h) − f ( x − h )
f ′( x ) ≈
2h

Second Three-point Formula
Summary of Errors

f ( x + h) − f ( x )
f ′( x ) ≈
h
Error term

Forward Difference
Formula

h ( 2)
h2 ( 3 )
O ( h) = f ( x ) +
f ( x) +
2
3!
Summary of Errors continued
First Three-point Formula

− f ( x + 2h ) + 4 f ( x + h ) − 3 f ( x )
f ′( x ) ≈
2h

( )

2 h2 ( 3 )
6 h3 ( 4 )
Error term O h2 = −
f ( x) −
f ( x) − 
3!
4!
Summary of Errors continued
Second Three-point Formula

f ( x + h) − f ( x − h )
f ′( x ) ≈
2h

( )

h2 ( 3)
h5 ( 6 )
O h2 = −
f ( x) −
f ( x) − 
Error term
3!
6!
Example:

f ( x ) = xe

x

Find the approximate value of

x

f ( x)

1.9

12.703199

2.0

14.778112

2.1
2.2

17.148957
19.855030

f ′( 2 )

with

h = 0.1
Using the Forward Difference formula:

1
f ′ ( x0 ) ≈ { f ( x0 + h ) − f ( x0 ) }
h

1
f ′ ( 2) ≈
{ f ( 2.1) − f ( 2 ) }
0.1
1
=
{ 17.148957 − 14.778112}
0.1
= 23.708450
Using the 1st Three-point formula:

1
{ − 3 f ( x0 ) + 4 f ( x0 + h) − f ( x0 + 2h) }
f ′( x0 ) ≈
2h

1
[ − 3 f ( 2) + 4 f ( 2.1) − f ( 2.2)]
f ′( 2 ) ≈
2 × 0.1
1
[ − 3 × 14.778112 + 4 × 17.148957
=
0.2
− 19.855030 ]
= 22.032310
Using the 2nd Three-point formula:

1
{ f ( x0 + h) − f ( x0 − h) }
f ′( x0 ) ≈
2h

1
[ f ( 2.1) − f (1.9)]
f ′( 2 ) ≈
2 × 0.1
1
[ 17.148957 − 12.703199
=
0.2
= 22.228790
The exact value of

f ′( 2 ) is : 22.167168

]
Comparison of the results with h = 0.1
The exact value of f ′ ( 2 ) is 22.167168
Formula

f ′ ( 2)

Error

Forward Difference

23.708450

1.541282

1st Three-point

22.032310

0.134858

2nd Three-point

22.228790

0.061622
Second-order Derivative

h2 ( 2 )
h3 ( 3 )
f ( x + h) = f ( x ) + hf ′( x ) +
f ( x) +
f ( x) + 
2
3!
2

3

h ( 2)
h ( 3)
f ( x − h) = f ( x ) − hf ′( x ) +
f ( x) −
f ( x) + 
2
3!
Add these two equations.

2h 2 ( 2 )
2h4 ( 4 )
f ( x + h) + f ( x − h) = 2 f ( x ) +
f ( x) +
f ( x) + 
2
4!
2h2 ( 2 )
2 h4 ( 4 )
f ( x + h) − 2 f ( x ) + f ( x − h) =
f ( x) +
f ( x) +
2
4!
f ( x + h) − 2 f ( x ) + f ( x − h)
2h ( 4 )
( 2)
= f ( x) +
f ( x) + 
2
h
4!
2

f ( x + h ) − 2 f ( x ) + f ( x − h ) 2h 2 ( 4 )
f ( 2) ( x ) =
−
f ( x) + 
2
h
4!
f

( 2)

f ( x + h) − 2 f ( x ) + f ( x − h)
( x) ≈
h2
NUMERICAL INTEGRATION
b

∫ f ( x )dx =
a

area under the curve f(x) between

x = a to x = b.

In many cases a mathematical expression for f(x) is
unknown and in some cases even if f(x) is known its
complex form makes it difficult to perform the integration.
y
f(b)

f(x)

f(a)

x 0 =a

x 0 =b

x
y

f(b)
f(x)
f(a)

x 0 =a

x 0 =b

x
Area of the trapezoid
The length of the two parallel sides of the trapezoid
are: f(a) and f(b)
The height is b-a
b

∫
a

b−a
[ f ( a ) + f ( b )]
f ( x )dx ≈
2
h
= [ f ( a ) + f ( b )]
2
Simpson’s Rule:

∫

x2

x0

x2

f ( x )dx ≈ ∫ P ( x )dx
x0

x1 = x0 + h and x 2 = x0 + 2h
∫

x2
x0

P ( x ) dx =

∫
+
∫
+

x2
x0

x2

x0

∫

x2
x0

( x − x1 )( x − x2 )
f ( x0 ) dx
( x0 − x1 )( x0 − x2 )

( x − x0 )( x − x2 )
f ( x1 ) dx
( x1 − x0 )( x1 − x2 )

( x − x0 )( x − x1 )
f ( x2 ) dx
( x2 − x0 )( x2 − x1 )
∫

x2

x0

x2

f ( x )dx ≈ ∫ P ( x )dx
x0

h
= [ f ( x0 ) + 4 f ( x1 ) + f ( x 2 )]
3
y

f(b)
f(x)
f(a)

x 0 =a

x 0 =b

x
y

f(b)
f(x)
f(a)

x 0 =a

x 0 =b

x
y

f(b)
f(x)
f(a)

x 0 =a

x 0 =b

x
y

f(b)
f(x)
f(a)

x 0 =a

x 0 =b

x
Composite Numerical Integration
Riemann Sum
The area under the curve is subdivided into n
subintervals. Each subinterval is treated as a
rectangle. The area of all subintervals are added
to determine the area under the curve.
There are several variations of Riemann sum as
applied to composite integration.
∆ xIn Left Riemann
= ( b − a) / n
sum,
x1 = a the left-

x2
x3

side sample of
= afunction is
the + ∆ x
used as the
= a + 2∆the
x
height of
individual
M
rectangle.

xi = a + ( i − 1) ∆ x

∫

b
a

n

f ( x ) dx ≈ ∑ f ( xi ) ∆ x
i =1
∆x = ( b − a) / n

In Right Riemann
sum, the right-side
x1 = a + ∆ x
sample of the
x2 = a is used
function+ 2∆ x as
the height of the
x3 = a + 3∆ x
individual rectangle.

M
xi = a + i∆ x
n

∫ f ( x ) dx ≈ ∑ f ( x ) ∆ x
b

a

i =1

i
In the ) / n
∆ x = ( b − aMidpoint
Rule, the sample at
x1 = the (middle1of ∆ x / 2 )
a + 2 ×1 − ) ( the
x2 =subinterval1is( used 2 )
a + ( 2× 2 − ) ∆x /
as the height of the
x3 = individual 1) ( ∆ x / 2 )
a + ( 2×3−
M rectangle.

xi = a + ( 2 × i − 1) ( ∆ x / 2 )
n

∫ f ( x ) dx ≈ ∑ f ( x ) ∆ x
b

a

i =1

i
Composite Trapezoidal Rule:
Divide the interval into n subintervals and apply
Trapezoidal Rule in each subinterval.
b

∫
a


h
f ( x )dx ≈  f ( a ) + 2∑ f ( x k ) + f (b )
2
k =1

n −1

where

b−a
h=
and x k = a + kh for k = 0, 1, 2, ... , n
n
π

Find

∫ sin (x)dx
0

by dividing the interval into 20 subintervals.

n = 20
b−a π
h=
=
n
20
kπ
x k = a + kh =
, k = 0, 1, 2, ....., 20
20
π


h
∫ sin( x )dx ≈ 2  f ( a ) + 2∑ f ( xk ) + f (b)
k =1


0
n −1

19

π 
 kπ 
=
sin( 0 ) + 2∑ sin 20  + sin( π ) 
40 
 
k =1


= 1.995886
Composite Simpson’s Rule:
Divide the interval into n subintervals and apply
Simpson’s Rule on each consecutive pair of subinterval.
Note that n must be even.

b

∫
a

h
f ( x )dx ≈  f ( a ) + 2
3
n/ 2

+ 4∑
k =1

( n / 2 ) −1

∑ f (x
k =1

2k

)


f ( x 2 k −1 ) + f (b )

where

b−a
h=
and x k = a + kh for k = 0, 1, 2, ... , n
n
π

Find

∫ sin (x)dx
0

by dividing the interval into 20 subintervals.

b−a π
n = 20
h=
=
n
20
kπ
x k = a + kh =
, k = 0, 1, 2, ....., 20
20
π

9
π 
 2kπ 
∫ sin( x )dx ≈ 60 sin( 0) + 2∑ sin 20 


k =1

0


 ( 2k − 1)π 
+ 4∑ sin
 + sin( π)
20 

k =1

= 2.000006
10

Weitere ähnliche Inhalte

Was ist angesagt?

Finite difference method
Finite difference methodFinite difference method
Finite difference methodDivyansh Verma
 
Interpolation In Numerical Methods.
 Interpolation In Numerical Methods. Interpolation In Numerical Methods.
Interpolation In Numerical Methods.Abu Kaisar
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve Mukuldev Khunte
 
Runge-Kutta methods with examples
Runge-Kutta methods with examplesRunge-Kutta methods with examples
Runge-Kutta methods with examplesSajjad Hossain
 
Applied numerical methods lec11
Applied numerical methods lec11Applied numerical methods lec11
Applied numerical methods lec11Yasser Ahmed
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Asad Ali
 
Euler and improved euler method
Euler and improved euler methodEuler and improved euler method
Euler and improved euler methodSohaib Butt
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series IntroductionRizwan Kazi
 
Gaussian Quadrature Formula
Gaussian Quadrature FormulaGaussian Quadrature Formula
Gaussian Quadrature FormulaDhaval Shukla
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equationsZunAib Ali
 
Differential equations of first order
Differential equations of first orderDifferential equations of first order
Differential equations of first ordervishalgohel12195
 
Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Asad Ali
 
INVERSION OF MATRIX BY GAUSS ELIMINATION METHOD
INVERSION OF MATRIX BY GAUSS ELIMINATION METHODINVERSION OF MATRIX BY GAUSS ELIMINATION METHOD
INVERSION OF MATRIX BY GAUSS ELIMINATION METHODreach2arkaELECTRICAL
 
Newtons Divided Difference Formulation
Newtons Divided Difference FormulationNewtons Divided Difference Formulation
Newtons Divided Difference FormulationSohaib H. Khan
 
Numerical Analysis and Its application to Boundary Value Problems
Numerical Analysis and Its application to Boundary Value ProblemsNumerical Analysis and Its application to Boundary Value Problems
Numerical Analysis and Its application to Boundary Value ProblemsGobinda Debnath
 
Gauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan methodGauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan methodNaimesh Bhavsar
 

Was ist angesagt? (20)

Finite difference method
Finite difference methodFinite difference method
Finite difference method
 
Interpolation In Numerical Methods.
 Interpolation In Numerical Methods. Interpolation In Numerical Methods.
Interpolation In Numerical Methods.
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve
 
Runge-Kutta methods with examples
Runge-Kutta methods with examplesRunge-Kutta methods with examples
Runge-Kutta methods with examples
 
Applied numerical methods lec11
Applied numerical methods lec11Applied numerical methods lec11
Applied numerical methods lec11
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2
 
Euler and improved euler method
Euler and improved euler methodEuler and improved euler method
Euler and improved euler method
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series Introduction
 
Gaussian Quadrature Formula
Gaussian Quadrature FormulaGaussian Quadrature Formula
Gaussian Quadrature Formula
 
Laplace
LaplaceLaplace
Laplace
 
Taylor series
Taylor seriesTaylor series
Taylor series
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
 
Differential equations of first order
Differential equations of first orderDifferential equations of first order
Differential equations of first order
 
Derivatives
DerivativesDerivatives
Derivatives
 
Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)
 
INVERSION OF MATRIX BY GAUSS ELIMINATION METHOD
INVERSION OF MATRIX BY GAUSS ELIMINATION METHODINVERSION OF MATRIX BY GAUSS ELIMINATION METHOD
INVERSION OF MATRIX BY GAUSS ELIMINATION METHOD
 
Newtons Divided Difference Formulation
Newtons Divided Difference FormulationNewtons Divided Difference Formulation
Newtons Divided Difference Formulation
 
Runge Kutta Method
Runge Kutta MethodRunge Kutta Method
Runge Kutta Method
 
Numerical Analysis and Its application to Boundary Value Problems
Numerical Analysis and Its application to Boundary Value ProblemsNumerical Analysis and Its application to Boundary Value Problems
Numerical Analysis and Its application to Boundary Value Problems
 
Gauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan methodGauss elimination & Gauss Jordan method
Gauss elimination & Gauss Jordan method
 

Andere mochten auch

Local linear approximation
Local linear approximationLocal linear approximation
Local linear approximationTarun Gehlot
 
Applications of set theory
Applications of  set theoryApplications of  set theory
Applications of set theoryTarun Gehlot
 
Error analysis statistics
Error analysis   statisticsError analysis   statistics
Error analysis statisticsTarun Gehlot
 
09 numerical differentiation
09 numerical differentiation09 numerical differentiation
09 numerical differentiationMohammad Tawfik
 
08 numerical integration 2
08 numerical integration 208 numerical integration 2
08 numerical integration 2Mohammad Tawfik
 
08 numerical integration
08 numerical integration08 numerical integration
08 numerical integrationMohammad Tawfik
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 
Complex Variable & Numerical Method
Complex Variable & Numerical MethodComplex Variable & Numerical Method
Complex Variable & Numerical MethodNeel Patel
 
Applied numerical methods lec10
Applied numerical methods lec10Applied numerical methods lec10
Applied numerical methods lec10Yasser Ahmed
 
YOGA ASANA (RAJEEV TYAGI)
YOGA ASANA (RAJEEV TYAGI)YOGA ASANA (RAJEEV TYAGI)
YOGA ASANA (RAJEEV TYAGI)Yashika Gupta
 
Top 5 pontoon boat reviews 2017
Top 5 pontoon boat reviews 2017Top 5 pontoon boat reviews 2017
Top 5 pontoon boat reviews 2017Rose L. Rayner
 
Effectiveness of an innovative mHealth intervention to improve coverage of pr...
Effectiveness of an innovative mHealth intervention to improve coverage of pr...Effectiveness of an innovative mHealth intervention to improve coverage of pr...
Effectiveness of an innovative mHealth intervention to improve coverage of pr...POSHAN
 
ExpoPrint Latin America 2018: The Largest Printing Event in Latin America
ExpoPrint Latin America 2018:  The Largest Printing Event in Latin AmericaExpoPrint Latin America 2018:  The Largest Printing Event in Latin America
ExpoPrint Latin America 2018: The Largest Printing Event in Latin AmericaDepo Consulting
 
YOGA asana by TARUN SHARMA
YOGA asana by TARUN SHARMAYOGA asana by TARUN SHARMA
YOGA asana by TARUN SHARMARAJAT KUMAR
 
basic concepts of Functions
basic concepts of Functionsbasic concepts of Functions
basic concepts of FunctionsTarun Gehlot
 
Theories of change and logic models
Theories of change and logic modelsTheories of change and logic models
Theories of change and logic modelsTarun Gehlot
 

Andere mochten auch (20)

Local linear approximation
Local linear approximationLocal linear approximation
Local linear approximation
 
Applications of set theory
Applications of  set theoryApplications of  set theory
Applications of set theory
 
Error analysis statistics
Error analysis   statisticsError analysis   statistics
Error analysis statistics
 
03 open methods
03 open methods03 open methods
03 open methods
 
09 numerical differentiation
09 numerical differentiation09 numerical differentiation
09 numerical differentiation
 
Chapter07
Chapter07Chapter07
Chapter07
 
08 numerical integration 2
08 numerical integration 208 numerical integration 2
08 numerical integration 2
 
1519 differentiation-integration-02
1519 differentiation-integration-021519 differentiation-integration-02
1519 differentiation-integration-02
 
08 numerical integration
08 numerical integration08 numerical integration
08 numerical integration
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 
Complex Variable & Numerical Method
Complex Variable & Numerical MethodComplex Variable & Numerical Method
Complex Variable & Numerical Method
 
Applied numerical methods lec10
Applied numerical methods lec10Applied numerical methods lec10
Applied numerical methods lec10
 
YOGA ASANA (RAJEEV TYAGI)
YOGA ASANA (RAJEEV TYAGI)YOGA ASANA (RAJEEV TYAGI)
YOGA ASANA (RAJEEV TYAGI)
 
Top 5 pontoon boat reviews 2017
Top 5 pontoon boat reviews 2017Top 5 pontoon boat reviews 2017
Top 5 pontoon boat reviews 2017
 
Effectiveness of an innovative mHealth intervention to improve coverage of pr...
Effectiveness of an innovative mHealth intervention to improve coverage of pr...Effectiveness of an innovative mHealth intervention to improve coverage of pr...
Effectiveness of an innovative mHealth intervention to improve coverage of pr...
 
ExpoPrint Latin America 2018: The Largest Printing Event in Latin America
ExpoPrint Latin America 2018:  The Largest Printing Event in Latin AmericaExpoPrint Latin America 2018:  The Largest Printing Event in Latin America
ExpoPrint Latin America 2018: The Largest Printing Event in Latin America
 
YOGA asana by TARUN SHARMA
YOGA asana by TARUN SHARMAYOGA asana by TARUN SHARMA
YOGA asana by TARUN SHARMA
 
Better banyumas bisa
Better banyumas bisaBetter banyumas bisa
Better banyumas bisa
 
basic concepts of Functions
basic concepts of Functionsbasic concepts of Functions
basic concepts of Functions
 
Theories of change and logic models
Theories of change and logic modelsTheories of change and logic models
Theories of change and logic models
 

Ähnlich wie Numerical differentiation integration

functions limits and continuity
functions limits and continuityfunctions limits and continuity
functions limits and continuityPume Ananda
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functionsTarun Gehlot
 
chap 2 Ex#1.1
chap 2 Ex#1.1chap 2 Ex#1.1
chap 2 Ex#1.1Ans Ali
 
Modul 3 quadratic function
Modul 3 quadratic functionModul 3 quadratic function
Modul 3 quadratic functionHafidz Mukhtar
 
Differential Calculus
Differential Calculus Differential Calculus
Differential Calculus OlooPundit
 
Topic: Fourier Series ( Periodic Function to change of interval)
Topic: Fourier Series ( Periodic Function to  change of interval)Topic: Fourier Series ( Periodic Function to  change of interval)
Topic: Fourier Series ( Periodic Function to change of interval)Abhishek Choksi
 
Differential calculus
Differential calculusDifferential calculus
Differential calculusChit Laplana
 
Sbma 4603 numerical methods Assignment
Sbma 4603 numerical methods AssignmentSbma 4603 numerical methods Assignment
Sbma 4603 numerical methods AssignmentSaidatina Khadijah
 
Solutions Manual for Calculus Early Transcendentals 10th Edition by Anton
Solutions Manual for Calculus Early Transcendentals 10th Edition by AntonSolutions Manual for Calculus Early Transcendentals 10th Edition by Anton
Solutions Manual for Calculus Early Transcendentals 10th Edition by AntonPamelaew
 
Combined Functions
Combined FunctionsCombined Functions
Combined FunctionsJoviBerbz
 
01 derivadas
01   derivadas01   derivadas
01 derivadasklorofila
 
MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)hasnulslides
 

Ähnlich wie Numerical differentiation integration (20)

Functions limits and continuity
Functions limits and continuityFunctions limits and continuity
Functions limits and continuity
 
functions limits and continuity
functions limits and continuityfunctions limits and continuity
functions limits and continuity
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functions
 
Numerical Methods and Analysis
Numerical Methods and AnalysisNumerical Methods and Analysis
Numerical Methods and Analysis
 
Differntiation
 Differntiation Differntiation
Differntiation
 
chap 2 Ex#1.1
chap 2 Ex#1.1chap 2 Ex#1.1
chap 2 Ex#1.1
 
Modul 3 quadratic function
Modul 3 quadratic functionModul 3 quadratic function
Modul 3 quadratic function
 
Differential Calculus
Differential Calculus Differential Calculus
Differential Calculus
 
Parabola
ParabolaParabola
Parabola
 
Topic: Fourier Series ( Periodic Function to change of interval)
Topic: Fourier Series ( Periodic Function to  change of interval)Topic: Fourier Series ( Periodic Function to  change of interval)
Topic: Fourier Series ( Periodic Function to change of interval)
 
Differential calculus
Differential calculusDifferential calculus
Differential calculus
 
Vertex
VertexVertex
Vertex
 
Sbma 4603 numerical methods Assignment
Sbma 4603 numerical methods AssignmentSbma 4603 numerical methods Assignment
Sbma 4603 numerical methods Assignment
 
Chapter 5 assignment
Chapter 5 assignmentChapter 5 assignment
Chapter 5 assignment
 
Solutions Manual for Calculus Early Transcendentals 10th Edition by Anton
Solutions Manual for Calculus Early Transcendentals 10th Edition by AntonSolutions Manual for Calculus Early Transcendentals 10th Edition by Anton
Solutions Manual for Calculus Early Transcendentals 10th Edition by Anton
 
Combined Functions
Combined FunctionsCombined Functions
Combined Functions
 
01 derivadas
01   derivadas01   derivadas
01 derivadas
 
MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)
 

Mehr von Tarun Gehlot

Materials 11-01228
Materials 11-01228Materials 11-01228
Materials 11-01228Tarun Gehlot
 
Continuity and end_behavior
Continuity and  end_behaviorContinuity and  end_behavior
Continuity and end_behaviorTarun Gehlot
 
Continuity of functions by graph (exercises with detailed solutions)
Continuity of functions by graph   (exercises with detailed solutions)Continuity of functions by graph   (exercises with detailed solutions)
Continuity of functions by graph (exercises with detailed solutions)Tarun Gehlot
 
Factoring by the trial and-error method
Factoring by the trial and-error methodFactoring by the trial and-error method
Factoring by the trial and-error methodTarun Gehlot
 
Introduction to finite element analysis
Introduction to finite element analysisIntroduction to finite element analysis
Introduction to finite element analysisTarun Gehlot
 
Finite elements : basis functions
Finite elements : basis functionsFinite elements : basis functions
Finite elements : basis functionsTarun Gehlot
 
Finite elements for 2‐d problems
Finite elements  for 2‐d problemsFinite elements  for 2‐d problems
Finite elements for 2‐d problemsTarun Gehlot
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabTarun Gehlot
 
Linear approximations and_differentials
Linear approximations and_differentialsLinear approximations and_differentials
Linear approximations and_differentialsTarun Gehlot
 
Propeties of-triangles
Propeties of-trianglesPropeties of-triangles
Propeties of-trianglesTarun Gehlot
 
Gaussian quadratures
Gaussian quadraturesGaussian quadratures
Gaussian quadraturesTarun Gehlot
 
Basics of set theory
Basics of set theoryBasics of set theory
Basics of set theoryTarun Gehlot
 
Numerical integration
Numerical integrationNumerical integration
Numerical integrationTarun Gehlot
 
Miscellneous functions
Miscellneous  functionsMiscellneous  functions
Miscellneous functionsTarun Gehlot
 
Dependent v. independent variables
Dependent v. independent variablesDependent v. independent variables
Dependent v. independent variablesTarun Gehlot
 
Intervals of validity
Intervals of validityIntervals of validity
Intervals of validityTarun Gehlot
 
Modelling with first order differential equations
Modelling with first order differential equationsModelling with first order differential equations
Modelling with first order differential equationsTarun Gehlot
 
Review taylor series
Review taylor seriesReview taylor series
Review taylor seriesTarun Gehlot
 

Mehr von Tarun Gehlot (20)

Materials 11-01228
Materials 11-01228Materials 11-01228
Materials 11-01228
 
Binary relations
Binary relationsBinary relations
Binary relations
 
Continuity and end_behavior
Continuity and  end_behaviorContinuity and  end_behavior
Continuity and end_behavior
 
Continuity of functions by graph (exercises with detailed solutions)
Continuity of functions by graph   (exercises with detailed solutions)Continuity of functions by graph   (exercises with detailed solutions)
Continuity of functions by graph (exercises with detailed solutions)
 
Factoring by the trial and-error method
Factoring by the trial and-error methodFactoring by the trial and-error method
Factoring by the trial and-error method
 
Introduction to finite element analysis
Introduction to finite element analysisIntroduction to finite element analysis
Introduction to finite element analysis
 
Finite elements : basis functions
Finite elements : basis functionsFinite elements : basis functions
Finite elements : basis functions
 
Finite elements for 2‐d problems
Finite elements  for 2‐d problemsFinite elements  for 2‐d problems
Finite elements for 2‐d problems
 
Matlab commands
Matlab commandsMatlab commands
Matlab commands
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Linear approximations and_differentials
Linear approximations and_differentialsLinear approximations and_differentials
Linear approximations and_differentials
 
Propeties of-triangles
Propeties of-trianglesPropeties of-triangles
Propeties of-triangles
 
Gaussian quadratures
Gaussian quadraturesGaussian quadratures
Gaussian quadratures
 
Basics of set theory
Basics of set theoryBasics of set theory
Basics of set theory
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Miscellneous functions
Miscellneous  functionsMiscellneous  functions
Miscellneous functions
 
Dependent v. independent variables
Dependent v. independent variablesDependent v. independent variables
Dependent v. independent variables
 
Intervals of validity
Intervals of validityIntervals of validity
Intervals of validity
 
Modelling with first order differential equations
Modelling with first order differential equationsModelling with first order differential equations
Modelling with first order differential equations
 
Review taylor series
Review taylor seriesReview taylor series
Review taylor series
 

Kürzlich hochgeladen

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Kürzlich hochgeladen (20)

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

Numerical differentiation integration

  • 1.
  • 2. NUMERICAL DIFFERENTIATION The derivative of f (x) at x0 is: f ′( x 0 ) = Limit h→ 0 f ( x0 + h) − f ( x0 ) h An approximation to this is: f ( x0 + h) − f ( x0 ) f ′( x 0 ) ≈ h for small values of h. Forward Difference Formula
  • 3. Let f ( x ) = ln x and x0 = 1.8 Find an approximate value for f ′(1.8) h f (1.8) f (1.8 + h) 0.1 0.5877867 0.6418539 f (1.8 + h) − f (1.8) h 0.5406720 0.01 0.5877867 0.5933268 0.5540100 0.001 0.5877867 0.5883421 0.5554000 The exact value of f ′(1.8) = 0.55 5
  • 4. Assume that a function goes through three points: ( x0 , f ( x0 ) ) , ( x1 , f ( x1 ) ) and ( x2 , f ( x2 ) ) . f ( x) ≈ P( x) P ( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 ) + L2 ( x ) f ( x2 ) Lagrange Interpolating Polynomial
  • 5. P ( x ) = L0 ( x ) f ( x0 ) + L1 ( x ) f ( x1 ) + L2 ( x ) f ( x 2 ) ( x − x1 )( x − x2 ) P( x) = f ( x0 ) ( x0 − x1 )( x0 − x2 ) ( x − x0 )( x − x2 ) + f ( x1 ) ( x1 − x0 )( x1 − x2 ) ( x − x0 )( x − x1 ) + f ( x2 ) ( x2 − x0 )( x2 − x1 )
  • 6. f ′( x ) ≈ P ′( x ) 2 x − x1 − x2 P ′( x ) = f ( x0 ) ( x0 − x1 )( x0 − x2 ) 2 x − x0 − x2 + f ( x1 ) ( x1 − x0 )( x1 − x2 ) 2 x − x0 − x1 + f ( x2 ) ( x2 − x0 )( x2 − x1 )
  • 7. If the points are equally spaced, i.e., x1 = x0 + h and x 2 = x0 + 2h 2 x0 − ( x0 + h) − ( x0 + 2h) P ′( x0 ) = f ( x0 ) { x0 − ( x0 + h)}{ x0 − ( x0 + 2h)} 2 x0 − x0 − ( x0 + 2h) + f ( x1 ) { ( x0 + h) − x0 }{ ( x0 + h) − ( x0 + 2h)} 2 x0 − x0 − ( x0 + h) + f ( x2 ) { ( x0 + 2h) − x0 }{ ( x0 + 2h) − ( x0 + h)}
  • 8. − 3h − 2h −h P ′( x 0 ) = f ( x0 ) + f ( x1 ) + 2 f ( x 2 ) 2 2 2h −h 2h 1 { − 3 f ( x0 ) + 4 f ( x1 ) − f ( x2 ) } P ′( x0 ) = 2h Three-point formula: 1 { − 3 f ( x0 ) + 4 f ( x0 + h) − f ( x0 + 2h) } f ′( x0 ) ≈ 2h
  • 9. If the points are equally spaced with x0 in the middle: x1 = x0 − h and x 2 = x0 + h 2 x0 − ( x0 − h) − ( x0 + h) P ′( x0 ) = f ( x0 ) { x0 − ( x0 − h)}{ ( x0 − ( x0 + h)} 2 x0 − x0 − ( x0 + h) + f ( x1 ) { ( x0 − h) − x0 }{ ( x0 − h) − ( x0 + h)} 2 x0 − x0 − ( x0 − h) + f ( x2 ) { ( x0 + h) − x0 }{ ( x0 + h) − ( x0 − h)}
  • 10. 0 −h h P ′( x 0 ) = f ( x0 ) + 2 f ( x1 ) + 2 f ( x 2 ) 2 −h 2h 2h Another Three-point formula: 1 { f ( x0 + h) − f ( x0 − h) } f ′( x0 ) ≈ 2h
  • 11. Alternate approach (Error estimate) Take Taylor series expansion of f(x+h) about x: 2 3 h ( 2) h ( 3) f ( x + h) = f ( x ) + hf ′( x ) + f ( x) + f ( x) +  2 3! h2 ( 2 ) h3 ( 3 ) f ( x + h) − f ( x ) = hf ′( x ) + f ( x) + f ( x) +  2 3! f ( x + h) − f ( x ) h ( 2) h2 ( 3 ) = f ′( x ) + f ( x ) + f ( x) +  h 2 3! .............. (1)
  • 12. f ( x + h) − f ( x ) = f ′( x ) + O ( h) h f ( x + h) − f ( x ) f ′( x ) = − O ( h) h f ( x + h) − f ( x ) f ′( x ) ≈ h Forward Difference Formula h ( 2) h2 ( 3 ) O ( h) = f ( x ) + f ( x) + 2 3!
  • 13. 4h 2 ( 2 ) 8h 3 ( 3 ) f ( x + 2h) = f ( x ) + 2hf ′( x ) + f ( x) + f ( x) +  2 3! 4h 2 ( 2 ) 8h 3 ( 3 ) f ( x + 2h) − f ( x ) = 2hf ′( x ) + f ( x) + f ( x) +  2 3! f ( x + 2h ) − f ( x ) 2h ( 2 ) 4h 2 ( 3 ) = f ′( x ) + f ( x) + f ( x) +  2h 2 3! ................. (2)
  • 14. f ( x + h) − f ( x ) h ( 2) h ( 3) = f ′( x ) + f ( x ) + f ( x) +  h 2 3! .............. (1) 2 f ( x + 2h ) − f ( x ) 2h ( 2 ) 4h 2 ( 3 ) = f ′( x ) + f ( x) + f ( x) +  2h 2 3! ................. (2) 2 X Eqn. (1) – Eqn. (2)
  • 15. f ( x + h) − f ( x ) f ( x + 2h) − f ( x ) 2 − h 2h 2 h2 ( 3 ) 6 h3 ( 4 ) = f ′( x ) − f ( x) − f ( x) −  3! 4! − f ( x + 2 h) + 4 f ( x + h) − 3 f ( x ) 2h 2 3 2h ( 3 ) 6h ( 4 ) ′( x ) − = f f ( x) − f ( x) −  3! 4! = f ′ ( x ) + O h2 ( )
  • 16. − f ( x + 2h ) + 4 f ( x + h ) − 3 f ( x ) = f ′( x ) + O h2 2h ( ) − f ( x + 2h ) + 4 f ( x + h ) − 3 f ( x ) f ′( x ) = − O h2 2h ( ) − f ( x + 2h ) + 4 f ( x + h ) − 3 f ( x ) f ′( x ) ≈ 2h Three-point Formula ( ) 2 h2 ( 3 ) 6 h3 ( 4 ) O h2 = − f ( x) − f ( x) −  3! 4!
  • 17. The Second Three-point Formula Take Taylor series expansion of f(x+h) about x: h2 ( 2 ) h3 ( 3 ) f ( x + h) = f ( x ) + hf ′( x ) + f ( x) + f ( x) + 2 3! Take Taylor series expansion of f(x-h) about x: 2 3 h ( 2) h ( 3) f ( x − h) = f ( x ) − hf ′( x ) + f ( x) − f ( x) +  2 3! Subtract one expression from another 2h 3 ( 3 ) 2h 6 ( 6 ) f ( x + h) − f ( x − h) = 2hf ′( x ) + f ( x) + f ( x) +  3! 6!
  • 18. 2h 3 ( 3 ) 2h 6 ( 6 ) f ( x + h) − f ( x − h) = 2hf ′( x ) + f ( x) + f ( x) +  3! 6! f ( x + h) − f ( x − h) h2 ( 3) h5 ( 6 ) = f ′( x ) + f ( x) + f ( x) +  2h 3! 6! f ( x + h) − f ( x − h) h 2 ( 3 ) h5 ( 6 ) f ′( x ) = − f ( x) − f ( x) −  2h 3! 6!
  • 19. f ′( x ) = f ( x + h ) − f ( x − h) + O h2 2h ( ) ( ) h2 ( 3) h5 ( 6 ) O h2 = − f ( x) − f ( x) −  3! 6! f ( x + h) − f ( x − h ) f ′( x ) ≈ 2h Second Three-point Formula
  • 20. Summary of Errors f ( x + h) − f ( x ) f ′( x ) ≈ h Error term Forward Difference Formula h ( 2) h2 ( 3 ) O ( h) = f ( x ) + f ( x) + 2 3!
  • 21. Summary of Errors continued First Three-point Formula − f ( x + 2h ) + 4 f ( x + h ) − 3 f ( x ) f ′( x ) ≈ 2h ( ) 2 h2 ( 3 ) 6 h3 ( 4 ) Error term O h2 = − f ( x) − f ( x) −  3! 4!
  • 22. Summary of Errors continued Second Three-point Formula f ( x + h) − f ( x − h ) f ′( x ) ≈ 2h ( ) h2 ( 3) h5 ( 6 ) O h2 = − f ( x) − f ( x) −  Error term 3! 6!
  • 23. Example: f ( x ) = xe x Find the approximate value of x f ( x) 1.9 12.703199 2.0 14.778112 2.1 2.2 17.148957 19.855030 f ′( 2 ) with h = 0.1
  • 24. Using the Forward Difference formula: 1 f ′ ( x0 ) ≈ { f ( x0 + h ) − f ( x0 ) } h 1 f ′ ( 2) ≈ { f ( 2.1) − f ( 2 ) } 0.1 1 = { 17.148957 − 14.778112} 0.1 = 23.708450
  • 25. Using the 1st Three-point formula: 1 { − 3 f ( x0 ) + 4 f ( x0 + h) − f ( x0 + 2h) } f ′( x0 ) ≈ 2h 1 [ − 3 f ( 2) + 4 f ( 2.1) − f ( 2.2)] f ′( 2 ) ≈ 2 × 0.1 1 [ − 3 × 14.778112 + 4 × 17.148957 = 0.2 − 19.855030 ] = 22.032310
  • 26. Using the 2nd Three-point formula: 1 { f ( x0 + h) − f ( x0 − h) } f ′( x0 ) ≈ 2h 1 [ f ( 2.1) − f (1.9)] f ′( 2 ) ≈ 2 × 0.1 1 [ 17.148957 − 12.703199 = 0.2 = 22.228790 The exact value of f ′( 2 ) is : 22.167168 ]
  • 27. Comparison of the results with h = 0.1 The exact value of f ′ ( 2 ) is 22.167168 Formula f ′ ( 2) Error Forward Difference 23.708450 1.541282 1st Three-point 22.032310 0.134858 2nd Three-point 22.228790 0.061622
  • 28. Second-order Derivative h2 ( 2 ) h3 ( 3 ) f ( x + h) = f ( x ) + hf ′( x ) + f ( x) + f ( x) +  2 3! 2 3 h ( 2) h ( 3) f ( x − h) = f ( x ) − hf ′( x ) + f ( x) − f ( x) +  2 3! Add these two equations. 2h 2 ( 2 ) 2h4 ( 4 ) f ( x + h) + f ( x − h) = 2 f ( x ) + f ( x) + f ( x) +  2 4! 2h2 ( 2 ) 2 h4 ( 4 ) f ( x + h) − 2 f ( x ) + f ( x − h) = f ( x) + f ( x) + 2 4!
  • 29. f ( x + h) − 2 f ( x ) + f ( x − h) 2h ( 4 ) ( 2) = f ( x) + f ( x) +  2 h 4! 2 f ( x + h ) − 2 f ( x ) + f ( x − h ) 2h 2 ( 4 ) f ( 2) ( x ) = − f ( x) +  2 h 4! f ( 2) f ( x + h) − 2 f ( x ) + f ( x − h) ( x) ≈ h2
  • 30. NUMERICAL INTEGRATION b ∫ f ( x )dx = a area under the curve f(x) between x = a to x = b. In many cases a mathematical expression for f(x) is unknown and in some cases even if f(x) is known its complex form makes it difficult to perform the integration.
  • 33. Area of the trapezoid The length of the two parallel sides of the trapezoid are: f(a) and f(b) The height is b-a b ∫ a b−a [ f ( a ) + f ( b )] f ( x )dx ≈ 2 h = [ f ( a ) + f ( b )] 2
  • 34. Simpson’s Rule: ∫ x2 x0 x2 f ( x )dx ≈ ∫ P ( x )dx x0 x1 = x0 + h and x 2 = x0 + 2h
  • 35. ∫ x2 x0 P ( x ) dx = ∫ + ∫ + x2 x0 x2 x0 ∫ x2 x0 ( x − x1 )( x − x2 ) f ( x0 ) dx ( x0 − x1 )( x0 − x2 ) ( x − x0 )( x − x2 ) f ( x1 ) dx ( x1 − x0 )( x1 − x2 ) ( x − x0 )( x − x1 ) f ( x2 ) dx ( x2 − x0 )( x2 − x1 )
  • 36. ∫ x2 x0 x2 f ( x )dx ≈ ∫ P ( x )dx x0 h = [ f ( x0 ) + 4 f ( x1 ) + f ( x 2 )] 3
  • 42. Riemann Sum The area under the curve is subdivided into n subintervals. Each subinterval is treated as a rectangle. The area of all subintervals are added to determine the area under the curve. There are several variations of Riemann sum as applied to composite integration.
  • 43. ∆ xIn Left Riemann = ( b − a) / n sum, x1 = a the left- x2 x3 side sample of = afunction is the + ∆ x used as the = a + 2∆the x height of individual M rectangle. xi = a + ( i − 1) ∆ x ∫ b a n f ( x ) dx ≈ ∑ f ( xi ) ∆ x i =1
  • 44. ∆x = ( b − a) / n In Right Riemann sum, the right-side x1 = a + ∆ x sample of the x2 = a is used function+ 2∆ x as the height of the x3 = a + 3∆ x individual rectangle. M xi = a + i∆ x n ∫ f ( x ) dx ≈ ∑ f ( x ) ∆ x b a i =1 i
  • 45. In the ) / n ∆ x = ( b − aMidpoint Rule, the sample at x1 = the (middle1of ∆ x / 2 ) a + 2 ×1 − ) ( the x2 =subinterval1is( used 2 ) a + ( 2× 2 − ) ∆x / as the height of the x3 = individual 1) ( ∆ x / 2 ) a + ( 2×3− M rectangle. xi = a + ( 2 × i − 1) ( ∆ x / 2 ) n ∫ f ( x ) dx ≈ ∑ f ( x ) ∆ x b a i =1 i
  • 46. Composite Trapezoidal Rule: Divide the interval into n subintervals and apply Trapezoidal Rule in each subinterval. b ∫ a  h f ( x )dx ≈  f ( a ) + 2∑ f ( x k ) + f (b ) 2 k =1  n −1 where b−a h= and x k = a + kh for k = 0, 1, 2, ... , n n
  • 47. π Find ∫ sin (x)dx 0 by dividing the interval into 20 subintervals. n = 20 b−a π h= = n 20 kπ x k = a + kh = , k = 0, 1, 2, ....., 20 20
  • 48. π  h ∫ sin( x )dx ≈ 2  f ( a ) + 2∑ f ( xk ) + f (b) k =1   0 n −1 19  π   kπ  = sin( 0 ) + 2∑ sin 20  + sin( π )  40    k =1  = 1.995886
  • 49. Composite Simpson’s Rule: Divide the interval into n subintervals and apply Simpson’s Rule on each consecutive pair of subinterval. Note that n must be even. b ∫ a h f ( x )dx ≈  f ( a ) + 2 3 n/ 2 + 4∑ k =1 ( n / 2 ) −1 ∑ f (x k =1 2k )  f ( x 2 k −1 ) + f (b ) 
  • 50. where b−a h= and x k = a + kh for k = 0, 1, 2, ... , n n π Find ∫ sin (x)dx 0 by dividing the interval into 20 subintervals. b−a π n = 20 h= = n 20 kπ x k = a + kh = , k = 0, 1, 2, ....., 20 20
  • 51. π 9 π   2kπ  ∫ sin( x )dx ≈ 60 sin( 0) + 2∑ sin 20    k =1  0   ( 2k − 1)π  + 4∑ sin  + sin( π) 20   k =1  = 2.000006 10