#17 (10/25/2023)

Diffusion equation

The diffusion equation is a parabolic partial differential equation and is exemplified by the following system (after setting all the physical constants as unity):

2 u(x,t)

x2
= u(x, t)

t
.
(1)
We assume that u(x, t) can be expressed by Fourier sine series as
u(x, t) =

n=1 
un(t) sin n πx,
(2)
except that the Fourier coefficient, un, is a function of t. Note that sin n πx was chosen as the interval is [0, 1] instead of [−π, π]. The both sides of Equation (1) can be expressed in the Fourier domain as
2 u

x2
=


n=1 
−(n π)2 un(t) sin n πx,
(3)
u

t
=


n=1 
d un(t)

d t
sin n πx.
(4)
from which it follows
d un(t)

d t
= −(nπ)2 un(t),
(5)
which can be solved as
un(t) = An e−(n π)2 t.
(6)
where An is an integral constant yet determined.
Equation (1) with Equation (6) yields
u(x, t) =

n=1 
An e−(nπ)2 t sin n πx.
(7)
Substituting the initial condition at t = 0 into Equation (7) yields
f(x) =

n=1 
An  sin n πx,
(8)
which implies that the unknown coefficient, An, is the Fourier sine coefficient of f(x) as1
An = 2
1

0 
f(x) sin n πx dx.
(9)
Example

2 u

x2
=
u

t
,
(10)
u = 0    
at
    x = 0, 1
u=1    
at
    t = 0

An
=
2
1

0 
1 ×sin n πx dx
=
2 (1−cos(n π))

n π
=
2 (1−(−1)n)

nπ
.
(11)

u(x, t)
=


n=1 
An en2 π2 t sin n πx
=


n=1 
2 (1−(−1)n)

nπ
en2 π2 t sin nπx.
(12)
Here is how the temperature decays.

Period other than 2π

If the period of f(x) is 2l over [−ll] instead of 2π, it is necessary to change the scaling from x to πx/l as

f(x)
=


m=−∞ 
cm exp
i m πx

l

,
(13)
cm
=
1

2l

l

l 
f(x) exp
i m πx

l

dx.
(14)

Fourier integral (infinite periodicity)

It can be shown that Fourier integrals are derived as a limiting case of Fourier series by letting l (periodicity) tend to ∞. By combining Eq.(13) with Eq.(14), f(x) can be expressed as

f(x)
=


m=−∞ 

1

2l

l

l 
f(y) exp
imπy

l

dy
exp
imπx

l

=
1

2l

l

l 



m=−∞ 
exp
imπ(xy)

l


f(y) dy
=
1



l

l 





m=−∞ 

π

l

exp(im [(π)/(l)] (xy))

I(x, y)
 
f(y) dy
=
1



l

l 
I(x, y) f(y) dy,
(15)
where

I(x, y)
=


m=−∞ 

π

l

exp
im π

l
 (xy)
=


m=−∞ 
(∆ω)ei  m  ∆ω  (xy)
=


m=−∞ 
(∆ω) em ∆ω  z
=
∆ω{…+ ez ∆ω+1 +exp(z ∆ω) +exp(2z ∆ω) + …}
 ∼ 



−∞ 
ez  ω dω
=



−∞ 
ei  (xy)  ω dω,
(16)
where ∆ω = π/l and z = i  (xy) were used.
By combining Eq.(15) with Eq.(16) and exchange the order of integrals, one obtains

f(x)
=
1





−∞ 




−∞ 
ei x ω eiyω dω
f(y) dy
=



−∞ 
1






−∞ 
f(y) ei y ω dy
ei x ω dω
=



−∞ 
F(ω) ei x ω dω,
(17)
where

F(ω) ≡ 1





−∞ 
f(y) ei y ω dy.
(18)
So the (non-periodic) function, f(x) can be expressed as

f(x) =


−∞ 
F(ω) eiωx dω,
(19)
where

F(ω) = 1





−∞ 
f(x) eiωx dx.
(20)

Fourier series
Fourier integrals
f(x) =

−∞ 
cm ei m x
f(x) =


−∞ 
F(ω) ei ωx dω
cm = 1



π

−π 
f(x) ei m x dx
F(ω) = 1





−∞ 
f(x)eiωx dx
(21)
prism.jpg
Example 1: Rectangular pulse.
recpulse.jpg

F(ω)
=
1





−∞ 
f(x)eiωx dx
=
1



1

−1 
eiωx dx
=
sin ω

πω
.
(22)
So
f(x)
=



−∞ 
sin ω

πω
eiωx dω
=
2

π



0 
sin ω

ω
cos ωx dω.
(23)
By substituting x=0, one obtains
1 = 2

π



0 
sin ω

ω
dω,
(24)
or



0 
sin ω

ω
dω = π

2
.
(25)
sinwoverw.jpg
The figure above shows the Fourier transform of f(x). It is seen that f(x) contains frequencies from the entire interval but the largest contribution is ω = 0.
Example 2: Error function
f(x) = ex2/2.
gaussian.jpg

F(ω)
=
1

2 π



−∞ 
ex2/2 ei ωx dx
=
1

2 π



−∞ 
exp
1

2
(x + i ω)2 ω2

2

dx
=
1

2 π
e−ω2/2


−∞ 
exp
1

2
(x + i ω)2
dx
=
1

2 π
e−ω2/2


−∞ 
exp
1

2
x2
dx
=
1




2 π
e−ω2/2.
(26)
Note that the Fourier integral of the error function is also an error function.
Example 3: White color
f(x) = δ(x).

F(ω) = 1

2 π



−∞ 
δ(x) ei ωx dx = 1

2 π
.
Example 4: Diffusion equation

u

t
=
2 u

x2
,     (−∞ < x < ∞, 0 < t < ∞)
(27)
u(x,0)
=
f(x)     (−∞ < x < ∞)
(28)
Assume that the solution, u(x, t), is expressed by the Fourier integral as

u(x, t) =


−∞ 
U(ω, t) ei ωx dω.
(29)
Noting that
u

t
=



−∞ 
dU

dt
ei ωx dω,
(30)
2 u

x2
=



−∞ 
(− ω2) U ei ωx dω,
(31)
it follows
dU

dt
= (− ω2) U,
(32)
which can be solved as
U(ω, t) = Aω e−ω2 t.
(33)
Thus, Equation (29) becomes

u(x, t) =


−∞ 
Aω e−ω2 t ei ωx dω.
(34)
From the initial condition, it follows

f(x) =


−∞ 
Aω ei ωx dω,
(35)
which implies that Aω is the Fourier transform of f(x) as

Aω
=
1





−∞ 
f(x) eiωx dx.
(36)
If the initial temperature is the Dirac delta function with a peak at x=0 at t=0,

f(x) = δ(x),
(37)

Aω
=
1





−∞ 
δ(x) eiωx dx
=
1


.
(38)
Hence, Equation (29) becomes

u(x, t)
=
1





−∞ 
exp(−tω2) eiωx dω
=
1





−∞ 
exp( −t(ω− ix

2t
)2 x2

4t
) dω
=
1


exp(− x2

4t
)


−∞ 
exp( −t(ω− ix

2t
)2) dω
=
1


exp(− x2

4t
)


−∞ 
exp( −tω2) dω
=
1


exp(− x2

4t
)   ⎛


π

t
 
=
exp(− x2

4t
)

2


πt
.
(39)
Here is how the temperature decays:
It is seen that a pulse initially at x=0 propagates to x=±∞ instantly at any small t which is the nature (and flaw) of the diffusion equation.


Footnotes:

1 Multiply sin m πx from both sides of Equation (8) and integrate the result from −π to π to get

1

0 
f(x) sin m πx d x
=


n=1 
An
1

0 
sin n πx sin m πx dx
(40)
=




Am × 1

2
,
m = n
0,
mn
Hence,
Am = 2
1

0 
f(x) sin m πx.



File translated from TEX by TTH, version 4.03.
On 11 Nov 2023, 19:43.