Page 275 - Numerical Analysis Using MATLAB and Excel
P. 275
Chapter 6 Fourier, Taylor, and Maclaurin Series
1
⎞
⎞
-------t –
C = ------ ∫ – 0 π ⎛ ⎝ – 2A 1 e – jnt t d + ∫ 0 π ⎛ ⎝ 2A 1 e – jnt t d
-------t –
⎠
⎠
2π
π
n
π
Integrating and rearranging terms we get
1 4A 4A ⎛ e jnπ – e – jnπ e jnπ + e – jnπ ⎞ 2A e jnπ – e – jnπ
⋅
⋅
C = ------ – --------- + --------- nπ ---------------------------- + ---------------------------- ⎠ – ------- ----------------------------
2 ⎝
n
2π
n
j2
j2
2
2
n π
n π
4A ⎛ nπ ⎞
= -------------- – 1 + nπsin nπ + cos nπ – ------ sin nπ
2 2⎝
2n π 2 ⎠
and since sin nπ = 0 for all integer ,
n
2A
–
C = ----------- cos( nπ 1 )
n
2 2
n π
4A
–
For n = even , C = 0 and for n = odd , cos nπ = – 1 , and C = -----------
n
n
2 2
n π
Also, by inspection, the DC component C = 0 . Then,
0
4A ⎛ 1 – j3ωt – jωt jωt 1 j3ωt ⎞
-
ft() = – ------- … + --e + e + e + ---e + … ⎠
2 ⎝
π 9 9
The coefficients of the terms e – j3ωt and e – jωt are positive because all coefficients of C n are
real. This is to be expected since ft() is an even function. It also has half−wave symmetry and
thus C = 0 for n = even as we’ve found.
n
7.
n ()
f 0 ()
fx() = f0() + f' 0()x + f'' 0() 2 … + -----------------x n
------------x +
2! n!
a. fx() = e – x , f0() = , 1 f' x() = e – – x , f' 0() = – , 1 f'' x() = e – x , f'' 0() = , 1 f''' x() = e – – x ,
f''' 0() = – 1 , and so on. Therefore,
x 2 x 3
f x() = 1x + ----- – ----- + …
–
n
3!
2!
MATLAB displays the same result.
x=sym('x'); fn=taylor(exp(−x)); pretty(fn)
2 3 4 5
1 - x + 1/2 x - 1/6 x + 1/24 x - 1/120 x
6−58 Numerical Analysis Using MATLAB® and Excel®, Third Edition
Copyright © Orchard Publications