Professional Documents
Culture Documents
Lec 23 Derivatives(3)
Lec 23 Derivatives(3)
Lec 23 Derivatives(3)
on
Modeling and Simulation
∆y f ( xi + ∆x) − f ( xi )
=
∆x ∆x
dy f ( xi + ∆x) − f ( xi )
= ∆x lim 0
dx ∆x
b
I = ∫ f ( x)dx
a
2
Numerical Differentiation
We known from Calculus the derivative forms a slope at a point.
Let us see that:
f(xi+∆x)
∆y
f(xi)
x
∆x
Numerical Differentiation
f(xi+∆x)
∆y
f(xi)
x
∆x
Numerical Differentiation
f(xi+∆x)
∆y
f(xi)
x
∆x
Numerical Differentiation
f(xi+∆x)
f(xi) ∆y
x
∆x
Numerical Differentiation
f(xi+∆x)
∆y
f(xi)
x
∆x
Numerical Differentiation
∆y f ( xi + ∆x) − f ( xi )
Finally, we can =
∆x ∆x
see that the
dy f ( xi + ∆x) − f ( xi )
derivative forms = ∆x lim 0
a slope at a point. dx ∆x
f(xi)
xi x
Methods for Differentiation and Integration
h ∆x o
Backward Difference Formula
• Similarly, the backward difference formula is obtained by
starting with function :
1
[ f ( x o ) − f ( x o + h )] = ∇f ( x o )
h ∇x o
Estimate first and second derivatives at x = 0.2 and 0.3 using central
difference form.
df
=
1
[ f ( x = 0.3) − f ( x = 0.1)]
dx x = 0.2 2h
df (5.8 − 2.1)
= = 18.5 gm/cm
dx x = 0.2 2(0.1)
•Similarly at x = 0.3,
df
=
1
[ f ( x = 0.4) − f ( x = 0.2)]
dx x = 0.3 2h
df (7.2 − 4.3)
= = 14.5gm/cm
dx x = 0.3 2(0.1)
Example 1: Derivative
and the second derivative at x = 0.2 is given as:
d2 f 1
= [ f ( x = 0.1) − 2 f ( x = 0.2 ) + f ( x = 0.3)]
dx 2 x = 0.2
h 2
d2 f
=
1
[2.1 − 2.0 × 4.3 + 5.8] = −70.
dx 2 x = 0.2
(0.1) 2
d2 f
=
1
[ f ( x = 0.2) − 2 f ( x = 0.3) + f ( x = 0.4)] = −10.
dx 2 x = 0.3
h 2
f ′( x) = 10 x 4 − 8 x 3 − 15 x 2 + 10
b
I = ∫ f ( x)dx
a
b
g b − g a = ∫ f ( x )dx
a
Numerical Integration
Area under the curve
f(x)
• When many
sufficiently small
strips are added
we can generate
the area under the
curve from x = a
a b x
to x = b.
b
Strips = 1
g b − g a = ∫ f ( x )dx
a
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 2
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 3
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 4
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 5
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 7
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 9
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 10
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 11
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 12
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 13
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 15
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 16
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a
Strips = 17
Numerical Integration
• When many
sufficiently small
strips are added
f(x)
we can generate
the area under the
curve from x = a
to x = b.
b
g b − g a = ∫ f ( x )dx a b x
a