The Wave equation

advertisement
2001/02: Lecture 9. Partial differential equations





The wave equation;
Laplace equation;
Diffusion equation;
Non-linear reaction diffusion equation;
Boundary conditions.
The wave equation
2
 2u ( x, t )
2  u ( x, t )
- one dimensional wave equation.

c
t 2
x 2
The variable t has the significance of time, the variable x is the spatial variable.
Unknown function u(x,t) depends both of x and t. For example, in case of vibrating
string the function u(x,t) means the string deviation from equilibrium in the point x at
the moment t.
2
 2u ( x, y, t )
 2u ( x, y, t ) 
2   u ( x, y, t )

 - two dimensional wave equation.

c


t 2
x 2
y 2


 2u( x, y, t )  2u( x, y, t )
denotes the Laplacian of u (in one

x 2
y 2
 2u ( x, t )
dimensional space u 
) and the general form of the wave equation is
x 2
 2u
 c 2 u .
t 2
The symbol u 
This differential equation occurs in such diverse fields of study as electromagnetic
theory, hydrodynamic theory, acoustics and so on.
Consider the wave equation for the vibrating string in more details.
Applying the 2d Newton’s law to the portion of the string between points x and
x  x we get the equation
 2u(( x  x) / 2, t )
 u( x  x, t ) u( x, t ) 
and dividing by the x and
m
 kx  

2
t
x
x 

taking the limit x  0 we obtain the wave equation
2
 2u ( x, t )
2  u ( x, t )

c
(1)
t 2
x 2
If both ends of the string are fixed then the boundary conditions are
u (0, t )  0, u (1, t )  0
and the initial conditions are
u ( x,0)
u ( x,0)  f ( x),
 g ( x), 0  x  1 .
t
1
In case of infinite string    x  , t  0 the wave equation with initial conditions
u ( x,0)
u ( x,0)  f ( x),
 g ( x),    x  
t
has solution (D’Alembert’s solution):
x  ct
1
1
u( x, t )  [ f ( x  ct )  f ( x  ct )] 
g ( s)ds .
2
2c x ct
The diffusion (or heat) equation
In the Lecture 7 we considered the stationary temperature distribution of the
homogeneous rod (i.e. the distribution which does not changes with time).
The equation for this distribution is
ku ( x )  r ( x )  0 .
Now we consider the temperature distribution u ( x, t ) , which depends on the point x
of the rod and time t.
u( x, t )
 2 u ( x, t )
k
 r( x ) ,
t
x 2
In case of diffusion equation r(x)=0.
Initial temperature distribution u ( x,0)  f ( x) .
If the function f(x) is so-called delta function (at initial moment we have the heat
source at one point with coordinate  ) then the homogeneous (r(x)=0) heat equation
u( x, t )
 2 u( x, t )
k
t
x 2
has the solution
u ( x, t ) 
e
 ( x  ) 2
4 kt
4kt
This is so-called fundamental solution.
.
Non-linear reaction diffusion equation
u ( x, t )
 2 u ( x, t )
 D1
 f (u, v)
t
x 2
v( x, t )
 2 v ( x, t )
 D2
 g (u, v)
t
x 2
here u ( x, t ), v( x, t ) are concentrations of some chemicals (populations) at point x at
the moment t. D1 , D2 are the diffusion coefficients, f (u, v), g (u, v) are functions (nonlinear) describing the reaction or interaction between chemicals (populations).
2
Example. The Brusselator (chemical reaction system with two components) on the
unit interval
u ( x, t )
 2 u ( x, t )
 D1
 C  ( B  1)u  u 2 v
2
t
x
2
v( x, t )
 v ( x, t )
 D2
 Bu  u 2 v
t
x 2
x  [0,1]; D1 , D2 , B, C  0
u (0, t )  u (1, t )  C , v(0, t )  v(1, t )  B / C
Laplace’s equation
u  0
u ( x, y ) 
 2u  2u

 0.
x 2 y 2
u ( x, y , z ) 
 2u  2u  2u


 0.
x 2 y 2 z 2
Poisson’s equation
u  f
 2u  2u
u ( x, y ) 

 f ( x, y ).
x 2 y 2
 2u  2u  2u


 f ( x, y, z ).
x 2 y 2 z 2
In the electrostatics, if u is electric potential at some point of the plane or the space
then the Poissoin’s equation describes the distribution of the potential u due to a
collection of stationary charges, the function f is the charge density. In a region that is
free of charges, f=0 and Poisson’s equation reduces to Laplace’s equation.
Laplace’s equation plays an important role in potential theory (magnetic potential,
gravitational potential, velocity potential in hydrodynamics etc.). For this reason it is
often called the potential equation, and functions satisfying it are called potential
functions as well as harmonic functions.
u ( x, y , z ) 
Boundary value problem for the Laplace’s equation:
u  0, 0  x   , 0  y  
u (0, y )  g ( y ), u ( , y )  h( y ), 0  y   ,
u ( x,0)  p ( x), u ( x,  )  q ( x), 0  x   .
Continuity conditions at four vertexes.
3
Example.
u  0, 0  x   , 0  y  
u(0, y )  u( , y )  0, 0  y   ,
u( x,0)  f ( x ), u ( x,  )  0, 0  x   .
Method of separation of variables:
u ( x, y )  X ( x)Y ( y )
u xx  X Y , u yy  XY ,
X Y  XY   0
X 
Y 

 k.
X
Y
Two-point boundary-value problem:
X   kX  0, X (0)  X ( )  0
k  n 2 , X n ( x)  sin nx, n  1,2,3,...
Yn  n 2Yn  0, Yn ( )  0, n  1,2,3,...
Yn ( y )  an sinh( n )  bn cosh( n ),
an sinh( n )  bn cosh( n )  0,
bn cosh( n )
sinh( n )
bn
Yn ( y ) 
sinh( n(  y )),
sinh( n )
bn
u n ( x, y ) 
sin( nx) sinh( n(  y )), n  1,2,3,...
sinh( n )
an  
un ( x,0)  bn sin nx  f ( x).
A square-integrable function f(x) (odd function) can be represented by the series

f ( x )   a n sin nx
n 1
where an 
u ( x, y) 
2


 f ( s) sin( ns)ds ,
n  1,2,3,...
0

sin( nx) sinh(( n(  y))

0 f (s) sin( ns)ds .
 1
sinh( n )
2

4
 bn  an

Finite difference methods
The heat (diffusion) equation
u( x, t )
 2 u ( x, t )
R
T
D
, 0  x  R, 0  t  T , h  ,   ,
2
t
x
K
N
n
uk  u( k  h, n   ), k  0,1,2,..., K , n  0,1,2,..., N .
Boundary conditions
u (0, t )  a(t ), u (0, R)  b(t ),
u0n  u (0, n  )  a(n  ), u Kn  u ( R, n  )  b(n  ), n  0,1,2,..., N .
Initial conditions
u ( x,0)  f ( x),
uk0  u (k  h, 0)  f (k  h), k  0,1,2,..., K .
Explicit form of finite-difference approximation
The simplest difference equations are:
ukn1  ukn
u n  2ukn  ukn1
 D k 1
, k  1,2,..., K  1, n  0,1,2,..., N  1.

h2
t
n+1
n
k-1
u kn1 
k k+1
x
D n
2 D
D
u k 1  (1  2 )u kn  2 u kn1 .
2
h
h
h
(1)
This explicit form of the finite-difference approximation is stable iff
D
 1 / 2.
h2
D
 1 / 2 then the method (1) is unstable.
h2
Let u ( x,0)  eisx and we consider the heat equation for infinite spatial case
If
   x   . Using Fourie method of separation of variables u( x, t )  eisxet  eisxt
5
u kn  u (kh, n )  e iskh nt .
Substitution into (1) gives
e t ukn  qu kn e ish  (1  2q)  cukn e ish , here q 
D
,
h2
e t  qe ish  (1  2q)  ce ish , let   e  
  1  2q  2q cos( sh), ukn  
n
1  4q    1 .
If cos( sh )  1 then for q  1 / 2
  1 and   1. It means that u kn grows infinitely when   0 .
So, we found that for some particular case the explicit form is unstable if q>1/2.
It is possible to prove that for any initial conditions the explicit form for numerical
solution of the diffusion equation is stable if q<1/2.
Implicit form of finite-difference approximation
ukn1  ukn

D
ukn11  2ukn1  ukn11
, k  1,2,..., K  1, n  0,1,2,..., N  1.
h2
t
n+1
n
k-1

k k+1
x
D n1
2 D
D
uk 1  (1  2 )ukn1  2 ukn11  ukn , k  1,2,..., K  1.
2
h
h
h
Solving this system of linear equations sequentially for n=1,2,…N-1 we will find
solution.
An advantage of the implicit form is that there are no constraints on the values of h
and  .
6
The Wave equation
2
 2 u ( x, t )
R
T
2  u ( x, t )

c
, 0  x  R, 0  t  T , h  ,   ,
2
2
t
x
K
N
n
u k  u (k  h, n   ), k  0,1,..., K , n  0,1,2,..., N .
Boundary conditions
u (0, t )  a(t ), u (0, R)  b(t ),
u0n  u (0, n   )  a(n   ), u Kn  u ( R, n   )  b(n   ), n  0,1,2,..., N .
Initial conditions
u ( x,0)
u ( x,0)  f ( x),
 g ( x),
t
u k0  u k1
0
u k  u (k  h, 0)  f (k  h),
 g (k  h)  u k1  u k0  g (k  h), k  0,1,2,..., K .

Explicit form of finite-difference approximation
The simplest difference equations are:
n
n
n
ukn 1  2ukn  ukn 1
2 uk 1  2uk  uk 1
c
, k  1,2,..., L  1, n  0,1,2,..., N  1.
2
h2
t
n+1
n
n-1
k-1
u
n 1
k
k k+1
x
c 2 n
 2 u k 1  2u kn  u kn1  2u kn  u kn1
h


ukn1  qukn1  (2  2q)ukn  qukn1  ukn1 , q 
c 2 2
, k  1,2,..., K  1, n  0,1,..., N  1,
h2
q  1 / 2 - stability!!!
7
Potential Equation
 2u  2u

 0.
x 2 y 2
ukn1  2ukn  ukn1 ukn1  2ukn  ukn1

 0.
h2
h2
1
u kn  (u kn1  u kn1  u kn1  u kn1 ) .
4
8
Download