HW#7
EGM6341
Spring 2009
Due:
3/26/09
Additional problem (on numerical differentiation):
A1.
Using Taylor series expansion for
f
(
x
±
2
h
) &
f
(
x
±
h
)
to derive a forth order accurate
formula for the 1
st
and 2
nd
order derivatives,
)
(
x
f
′
&
)
(
x
f
′
′
in terms of
f
(
x
+2
h
),
f
(
x
+
h
),
f
(
x
),
f
(
x

h
)
and
f
(
x
2
h
). One way you can approach it is as follows:
*
Expand, for example,
f
(
x
+2
h
) as
f
(
x
+2
h
) =
f
(
x
) +2
h
)
(
x
f
′
+ 4
!
2
2
h
)
(
x
f
′
′
+ 8
3
3!
h
)
(
x
f
′
′
′
+16
4
4!
h
(4)
( )
f
x
+…
*
You then do the same for
f
(
x
+
h
),
f
(
x

h
)
and
f
(
x
2
h
).
*
Now you will have 4 equations and you can solve for 4 unknowns:
)
(
x
f
′
,
)
(
x
f
′
′
,
)
(
x
f
′
′
′
,
and
(4)
( )
f
x
by neglecting the higher order terms. Just get the result for
)
(
x
f
′
&
)
(
x
f
′
′
.
*
Verify your result: consider f(x)=
4
x
so that the exact result should be
3
( )
4
f
x
x
f
=
&
2
( )
12
f
x
x
f
=
.
Compare your numerical results with the exact results to see if your formulae are
accurate to the order you expect.
pp. 323329
#1
Write a program to evaluate
( )
b
a
I
f
x dx
=
using the trapezoidal rule with n
subdivisions, calling the result I
n
to
a)
dx
x
I
)
exp(
2
1
0

∫
=
;
b)
dx
x
I
5
.
2
1
0
∫
=
c)
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '09
 MEI
 Numerical Analysis, Derivative, Taylor Series, Taylor series expansion

Click to edit the document details