You are on page 1of 5

Forward Difference Approximation Central perivative Approximation

Formula Derivative
Formula:First

=f
)
f(x) slope f(x)
(f(x-
=
= =

f(x)
( errative
-

Formula:Second perivative
f(x)
=

(2f(x)
f"(x) =
+

)
f(x)

Shift
* the
to
right
Formula:Third derivative

f"(x) *xf(x) Gx((


=

xx)] =
-

f"(x) =
3f(x h) 3f(x h) + + -
-

f(x-2h)
243
Formula

()-ee
f(x

+
f"(x) =

Example:
consider the function f(x) =
x
3
Calculate
its first derivative atpointx 3 =
numeri-

cally with the fw, bw, central finite difference


third perivative formulas and using
h 1
a)Points x2, x 3,X 4
= =
= =

Formula: b)Points x 2.75, x 3, and x 3.25 h 0.25


=
= =
=

2h) 3f(x h) f(x)


23f(x compare the results with
the exact
-
+
+ +

f(x)
=

h derivative.
Third derivative

Backward Difference Approximation


Formula:

h)
f(x)
f(x- First
=

Derivative

Formula:
h) f(x)
(ef(x
+
-

f"(x) =

second derivative

Formula: Third Derivative

f(x) 3f(x
2n) 3f(x h) f(x) - -
- +
=

43
Example:

9) h 0.5X 0.5
=
=

f(x) -0.1x4 -0.15x3


=
-

0.5x2-0.25x 1.2
+

X -h 0
=
f(x -

h) =
1.2
X 0.5
=

f(x) 0.925=

+n
x 1
=

f(x h) 0.2
+ =

Forwardin-- the

Backwardnext
. - the

Central: (f(x h) -
-

2n

f((x) =

=- 1.3
Numerical Integration
E =
-
i (0.8 -
0)(-60)
2 points
⑪Trapezoidal Rule I segment
E
= 2.56

f(b) Multiple Trapezoidal Rule (Segments)

-
Fat-b-a-
·

Ifc) f(a)
(b a)
-

..
-b -

A t(b1 b2)(h)
= +
A b

n segmentwidth/step size
(b a)(f(a) f(b))
-
=

A
= -
+

n #of
=

segments
~ Formula for Trapezoidal Rule h
1 #of points
- -

n
=
+

-n -

Example I

f(x) 0.2 +
=

25x -200 x
2
675x3 -900x4
+
A

Xo
XI I

X2
n
2
=

+ 400x5

from 0-0.8
h
a 50 0.4
=

ab =

f(a) 0.2
=
f(b) 0.232
=

0 f(x0) 0.2
HifXo
a
= =
=

A I(0.8 0)(0.2 0.232)


=
-

= 9th
x 0.4
=

f(x) 2.456 =

A 0.1728=
AztXz a = 2h 0.8
+ =

f(x2) 0.232
=


stop na
nareach na UL
E
=
-1112 (b a) I "(x) -

X At (0.4)) 456) (0.4)(-2.456)


= +

j"x
N(X)
=
A2

AT 1.0688
=

Alternative Formula:
summation
First Derivative
f((x) 0
=

25
+ -

400x 2025x2 +
At = 2 [f(x) 2
+

daween]+f(xn)]
[
-

3600x3 2000x4 +

f"(x) 0-400 + 4050x-10800x2


=

At -4[0.2 +
=
2 [2.456] 0.232]
+

+ 8080x3 AT 1.0688 =

xox-18800x25
f"(x) Example
=

Find the total distance traveled using


trapezoidal rule.

f"(x) -
=

60
t(s) ~ (m(s) Find the total distance traveled using
0 O trapezoidal rule on the first
segment&
16.42 simpson's 13 rue
remaining
E
on the seg-
27.8 ments.

35.68 t(s) ~ (m(s)


0 O
n
ba 0
= 16.42

E
=

=
2
27.8
35.68
AT = [0
=

2(16.42 27.8)
+
+

35.68]
+

At 124.12
=
Segment
First (Trapezoidal Rule)
A I(b a)(f(a) f(b))
=
-
+

At
=

h( fx) h((x2) h + +

A I(2 0)(0 16.42)


+
= -

(fx3) A 16.42
=

2)
e
6.42)) e
At = -

(Simpson's
Remaining segments 13 Rule)
A
z(16.42 4(27.8) 35.68)
=
+ +

At 124.12=

A 108.8666667
=

points

3

Simpson's 1/ Rule 2 segments


AT 16.42 108.866667
= +

-
Formula:
AT 125.2866667
=

A [f(x) 4f(x) +
=

f(x2)] Multiple Simpson's 113 Rule


a xib 0.2 + 25x -200x2 675x3 -900x4
f(x)
+
=

XO X2
400x5
+

f(x) 0.2 25x


= +
-200x2 675x3 -900x4 +
from 0-0.8
+ 400x5

From:0-0.8 h =
=

=0 0.2
=

n f(x)
50
Xo 0
0.4 0.2
=
=
=

x1 0.2
=

f(x)=1.288

Xo 0 =
f(X0) 0.2
= x2 0.4
=
f(x2) 2.456
=

Xi 0.4 =

f(x) 2.456
=
x3 0.6 =

f(x3) 3.464
=

X2 0.8 =

f(x2) 0.232
=

X4 0.8 =

f(x4) 0.232
=

A 84[2 4(2.450) 0.232]


=
+
+

A1
=

-> [0.2
=
4(1.288) 2.452]
+ +

A1 0.5205333333
A 1.3675
=
Az = [2.456 4(3.464) 0.232]
=
+ +

A2 1. 102933333
=

T 1.623466667
A
=

At 1.6235
=

perived Formula:

At =
[f(X0) 4
+

[2,849] 2
+

[2]
+ f(Xn)

AT -[0.2
=

4[1.288 3.464] 2[2.456]


+
+ +

0.232]
AT 1.623466667
=

At =1.6235
4
points
⑥ Simpson's 318 Rule
3 segments

A n()[f(x0) 3[f(x)
= +

f(x2)]
+

+ f(x3)]

f(x) 0.2 +
= 25x -200x2 675x3 -900x4 +

400x5
+

from
8-058 h
b4 =
=

h 0.2666666667
=

Xo 0
=

f(x) 0.2
=

X1 0.2666666667f(x)
=

1.43272428
=

x2 0.5333333334
=

f(x2) 3.487176955
=

x3 0.8000000001
=

f(x) 0.2319999977
=

A (0.2666666667)(5)[0.2 3 [1.432
=
+

72428 3.487176955] 0.2319999977]


+ +

A 1.519/7037
=

You might also like