Part (I) Fourier Series Using Maple, Prof. Ayad Shahoot
1. FOURIER SERIES USING Maple™
18
Dr. Ayad M. Shahoot
Mergib University, Faculty of Sciences
Khoms-Libya. drshahoot@yahoo.com
باستخدام فورييه متسلسالت
Maple 18
Part I
4. Periodic Functionf (x) x 2
f ( 2 ) f ( )
f (x)
0
2
x
0
x
0
x
f(x 2 ) f(x)
x, x 0,
f (x)
x, 0 x
f(x) x, x
1, x 0,
f (x)
1, 0 x
12345678910111213141516171819202122232425262728293031
Triangular Wave
Sawtooth Wave
Rectangular Wave
periodic functions.mw
5.
n 1
f(x) cos(nx) sin(nx)
2
n
1
a f(x)cos(nx)dx
n
1
b f (x)sin(nx)dx
معــــــامالتُفوريــيه
Fourier Coefficients
12345678910111213141516171819202122232425262728293031
For any function f(x) with period 2, we can describe the f(x) in terms of an infinite
sum of sines and cosines
na0a
nb0a
na nb
6. Example 1
?
x 0
n n
n 1
a
a cos(nx) b sin(nx)
2
f (x)
f(x) x, x
12345678910111213141516171819202122232425262728293031
7. f(x) x, x
? 0
n n
n 1
a
x a cos(nx) b sin(nx)
2
n
1
b f(x) sin(nx)dx
0
1
a f(x)dx
n
1
a f(x) cos(nx)dx
Example 1
1
2
x
2
2 2
( ) ( )
2 2
1
0
n n
2
1
( 1) ( 1) 0
n
1
2
xsin(nx) cos(nx)
n n
2
xcos(nx) sin(nx)
n n
2cos(n )
n
1
x dx
12345678910111213141516171819202122232425262728293031
8. cos(n )
cos(1 ) 1
cos(2 )
cos(3 )
cos(4 )
cos(5 )
1
1
1
1
n 1
n 2
n 3
n 4
n 5
na 0
n
2
b
n
0a 0Example 1
cos(n ) n
( -1)
? 0
n n
n 1
a
x a cos(nx) b sin(nx)
2
n?
n 1
x sin(nx
2
0 0 1) )(
n
n
?
n 1
( 1)
x 2 sin(nx)
n
12345678910111213141516171819202122232425262728293031
9. n 1 to 4
1 2 3 4
? ( 1) ( 1) ( 1) ( 1)
x 2 sin(1x) sin(2x) sin(3x) sin(4x)
1 2 3 4
? 2 1
2sin(x) sin(2x) sin(3x) sin(4x)
3 2
x
Example 1 n
?
n 1
( 1)
x 2 sin(nx)
n
x
n=1to4
12345678910111213141516171819202122232425262728293031
12. x, x 0
f(x) x
x, 0 x
n
2
2
( 1) 1
n
Example 2
? 0
n n
n 1
a
x a cos(nx) b sin(nx)
2
0
0
x dx x dx
0
1
a x dx
2 2
1 ( ) ( )
2 2
n
1
a x cos(nx)dx
n
1
b x sin(nx)dx
0
1
12345678910111213141516171819202122232425262728293031
Fourier Series1.mw
13. Example 2
n
n 2
2
a ( 1) 1
n
nb 0
0a
? 0
n n
n 1
a
x a cos(nx) b sin(nx)
2
n
2
?
n 1
2
[( 1) 1]x co ( )
2 n
s nx
n
?
2
n 1
2 [( 1) 1]
x cos(nx)
2 n
12345678910111213141516171819202122232425262728293031
Fourier Series1.mw
14. n 1 to 4
? 4 4
cos(x) 0 cos(3x) 0
2 9
x
n
?
2
n 1
2 [( 1) 1]
x cos(nx)
2 n
Example 2
12345678910111213141516171819202122232425262728293031
Fourier Series1.mw
15. n 1 to
? 4 4 4
x cos(x) cos(3x) cos(5x) .... inf inity
2 9 25
Example 2
n
2
n 1
2 [( 1) 1]
x cos(nx)
2 n
12345678910111213141516171819202122232425262728293031
Fourier Series1.mw
16. Fourier sine series
الدالة كانت إذاf(x)دالة هي فورييه بمتسلسلة تمثيلها المرادفرديةفو معامالت فإن ،رييه:
الدالة كانت إذاf(x)دالة هي فورييه بمتسلسلة تمثيلها المرادزوجيةفو معامالت فإن ،رييه:
Odd and Even Functions
نظريةFourier sine series
نظريةFourier cosine series
0a 0, na 0
n
0
2
b f(x)sin(nx)dx
nb 0
0
0
2
a f (x)dx
n
0
2
a f (x)cos(nx)dx
0
n n
n 1
a
f (x) a cos(nx) b sin(nx)
2
n
n 1
f (x) cos(nx) b sin(nx)
0
0
2
n
n 1
f (x) b sin(nx)
0
n
n 1
a
f (x) a cos(nx)
2
0
n n
n 1
a
f (x) a cos(nx) b sin(nx)
2
0
n
n 1
a
f (x) a cos(nx) sin(nx)
2
0
Fourier cosine series
12345678910111213141516171819202122232425262728293031
17. 1, x 0
f (x)
1, 0 x
الدالةf(x)من إذن ،فردية دالةالنظرية:
0a 0
na 0
n
n 1
( 1) 12
f(x) sin(nx)
n
0
n
n
0
2 2 cos(nx) 2 cos(n ) 1 2
b 1 sin(nx)dx ( 1) 1
n n n n
Example 3
n
n
2
b ( 1) 1
n
n to3
n to7
n to20
n to
n
0
2
b f(x)sin(nx)dx
12345678910111213141516171819202122232425262728293031
Boxcar Function
Square Wave
Function
18.
19.
2 2
2
2 2
x 0 x
t 0
t 0
u u
a , 0 x
t x
u 0 , u 0,
u
u f x , F x
t
l
l ُتحلُهذهُالمسألةُبإستخدامُطريقةُفصلُالمتغيرات(Separation of Variables)
2
X (x) X(x) 0 2 2
T (t) a T(t) 0
1 2X x C cos x C sin x 3 4T t C cos at C sin at
k k
k 1
k a k a k
u x,t C cos t D sin t .sin x
l l l
kt 0
k 1
k
u C sin x f x
l
k
k 1t 0
u k a k
D sin x F x
t
l l
k
0
k
0
2 k x
C f x sin dx,
2 k x
D F x sin dx
k a
l
l
l l
l
،بتطبيقُالشرطينُاالبتدائيينُعلىُالحلُالعامنجدُأن:
String Vibration
u(x,t)
X(x) T(t)
k
k
where,
l
u u(x,t)
12345678910111213141516171819202122232425262728293031
20. 2 2
2
2 2
x 0 x
t 0
t 0
u u
a , 0 x ,
t x
u 0, u 0,
u
u f (x), F(x) .
t
0
l
l
أوجدتذبذبالوترالمثبتعندنهايتيهفيالنقطتينوإذاكاناالنحرافاالبتدائي
للوترعلىشكلمثلثرأسهعنذالنقطة(c,h)عتهوسراالبتدائيةتساويالصفر(F(x)=0).
x 0x l
x
o
f(x)
c
h
o
l0
hx
, 0 x c,
c
f(x)
h( x)
, c x .
c
l
l
l
تصاغهذهالمسألةعلىالنحوالتالي:
Example 1
الحـل
Dirichlet Problem
12345678910111213141516171819202122232425262728293031
21. بماأنناوجدناحلمسألةتذبذبالوترعلىالصوةر:
k k
k 1
k a k a k
u x,t C cos t D sin t .sin x
l l l
k
0
2 k x
C f x sin dx
l
l l
hx
c
h( x
, 0 x c,
f(x)
, c .
c
x
)
l
l
l
k
0
2 k x
D F x sin dx
k a
l
l
c
k
0 c
hx h( x)
c c
2 k x k x
C sin dx sin dx
l
l
ll l l
2
k 2 2
2h k c
C sin
k c( c)
l
l l
2
2 2
k 1
k a k
u x,t .cos t
2h k c
sin
k c
.sin
( )
x
c
l
l l l l
0
Example 1
12345678910111213141516171819202122232425262728293031