Anda di halaman 1dari 2

Fall 2013

ME-361 Numerical Methods for Engineers


Homework Assignment 1
Due: Thursday, 1 October 2013

(a) Expand the function
x
f(x) = sin
2
t | |
|
\ .
in MacLaurin series around the point x
0
= 0 including
the third non-zero term.
(b) Find the expression for the remainder.
(c) Estimate the number of terms that would be needed to guarantee six significant digit
accuracy for all x in the interval [-1,+1].
Six significant digit accuracy means that the error should be less than or equal to 0.5 10
-6
.

SOLUTION
(a) MacLaurin series:
2 3
0 0
0 0 0 0 0
(x - x ) (x - x ) x
f(x) = sin = f(x ) + (x - x ) f'(x ) + f''(x ) + f'''(x ) + ...
2 2! 3!
t | |
|
\ .
x
f(x) = sin
2
t | |
|
\ .

0
0
f(x ) = sin = 0
2
t | |
|
\ .

x
f '(x) = cos
2 2
t t | |
|
\ .

0
0
f '(x ) = cos =
2 2 2
t t t | |
|
\ .

2
x
f ''(x) = - sin
2 2
t t | | | |
| |
\ . \ .

2
0
0
f ''(x ) = - sin = 0
2 2
t t | | | |
| |
\ . \ .

3
x
f '''(x) = - cos
2 2
t t | | | |
| |
\ . \ .

3 3
0
0
f '''(x ) = - cos = -
2 2 2
t t t | | | | | |
| | |
\ . \ . \ .

Substitute:
3 5
3 5
x x
f(x) = x - + - ...
2 2 3! 2 5!
t t t | | | |
| |
\ . \ .
It is an alternating series.

(b) The remainder is:
n+1
(n+1)
x
R(x) = f ( )
(n+1)!
where n is the degree of the last term used in
the expansion, which is the same as the number of terms used. Lets replace n+1 with N. The
remainder expression becomes
N
(N)
x
R(x) = f ( )
N!
where N is an even integer, N = 2, 4,

(c)
The N
th
derivative in the remainder expression after the first non-zero term used is:
N
(N)

f ( ) = sin
2 2
t t

| | | |
| |
\ . \ .
. The value of is between minus 1 and plus 1. The maximum of

sin
2
t | |
|
\ .
occurs when = 1 . Therefore, the maximum value of the remainder occurs when
= 1 and x = 1 :
N
max
1
R(x) =
N! 2
t | |
|
\ .
. It is required that
N
6
1
0.5 10
N! 2
t

| |
s
|
\ .
. The
question is to find the value of the even-integer, N. The table below shows that 12 terms (or 6
non-zero terms) are necessary for six significant digit accuracy.

N R
max
Series at x = 1
2 1.23370055 1.570796327
4 0.25366951 0.924832229
6 0.02086348 1.004524856
8 0.00091926 0.999843101
10 2.5202E-05 1.000003543
12 4.7109E-07 0.999999944