Introduction

The wave equation is a linear second order partial differential equation that describes the propagation of waves . In its two - dimensional form, it contains a time variable
(t)
, two spatial variables
(x,y)
and a function of these variables, u, that describes the displacement of a medium through which waves are propagating over time . That the wave equation is linear implies that its solution can consist of the sum of any number of solutions . This is observed in nature as the superposition principle wherein waves add constructively and destructively when occupying the same space . Using Fourier series to model wave behavior in a two - dimensional membrane is, then, appropriate in that the sums of sines and cosines can be used to approximate the total displacement of the membrane over its surface area . The solution of the two - dimensional wave equation for a rectangular membrane that is fixed at its boundaries can be found through separation of variables and the application of both boundary conditions and initial conditions, and expressed as a double Fourier series . From the solution, the behavior of the membrane as waves propagate through it can then be explored by introducing an initial displacement and/or initial velocity in its surface .

2D Wave Equation in Cartesian Coordinates

The wave equation for a two - dimensional rectangular membrane with boundary and initial conditions is expressed as
u
tt

2
c
(
u
xx
+uyy)0≤x≤
L
x
, 0≤y≤
L
y
(PDE)​
u(0,y,t)u(
L
x
,y,t)0, t≥0
(BC)​
u(x,0,t)u(x,
L
y
,t)0, t≥0
(BC)​
u(x,y,0)f(x,y),
u
t
(x,y)g(x)0≤x≤
L
x
, 0≤y≤
L
y
(IC)
where u(x, y, 0) and u t (x, y, 0) are the initial displacement and velocity of a membrane fixed at its edges. c is the propagation velocity of the wave, or the square root of the tension per length of the membrane dividedby its surface density
T
ρ
while
L
x
and
L
y
are the lengths of the membrane in the
x
and
y
directions,respectively.This model assumes no external forces or damping.

Solving the Wave Equation

We set
f(x,y)x*y(1-x)(1-y)
and
g(x)0
,
c4
,
L1
for the above problem.
Using the method separation of variables we will try to find the general solution of the problem .
Let assume a solution in the form
u(x,y,t)X(x)Y(y)T(t)
so that substitution into the partial differential equation (PDE) results in
′′
T
(t)X(X)Y(y)
2
c
[T(t)
′′
X
(x)Y(y)+T(t)X(x)
′′
Y
(y)]
It follows that when rearranged,
′′
T
(t)
2
c
T(t)

′′
X
(x)
X(x)
+
′′
Y
(y)
Y(y)
the left side is dependent only upon
t
while the right is dependent upon
x
and
y
. If both sides are equal to one another with any
t,x
or
y,
they must also be equal to some constant. We choose
-
2
λ
, so that the independent variables,
T,X
and
Y
can ultimately be expressed in terms of sines and cosines. With
′′
T
(t)
2
c
T(t)

′′
X
(x)
X(x)
+
′′
Y
(y)
Y(y)
-
2
λ
the
T
terms form the second order differential constant coefficient homogeneous equation
T(t)
k
1
cos(cλt)+
k
2
sin(cλt)(1)
From Equation
(1)
, the
X
and
Y
terms can also be set to constants such that
′′
X
(x)
X(x)
-
2
λ
-
′′
Y
(y)
Y(y)
-
2
λ
+
′′
Y
(y)
Y(y)
-
2
ν
(2)
′′
Y
(x)
Y(x)
-
2
λ
-
′′
X
(y)
X(y)
-
2
λ
+
′′
X
(y)
X(y)
-
2
μ
(3)
Solving for
X
and
Y
in a similar manner as was applied to
T
gives
X(x)
a
1
cos(νx)+
a
2
sin(νx)
and
Y(x)
b
1
cos(μx)+
b
2
sin(μx)
Substituting the solutions for
T,X
and Y into
u(x,y,t)T(t)X(x)Y(y)
results in
u(x,y,t)[
k
1
cos(cλt)+
k
2
sin(cλt)]·[
a
1
cos(νx)+
a
2
sin(νx)]·[
b
1
cos(μx)+
b
2
sin(μx)]
The boundary conditions (BC) which must be satisfied are then applied to
X(x)
and
Y(y)
to find
ν
and
μ
.
Beginning with the boundaries in the
X
dimension at
x0
and
x
L
x
where
u(0,y,t)u(
L
x
,y,t)0
, we have
X(0)
a
1
cos(0)+
a
2
sin(0)
a
1
0
X(x)
a
2
sin(νx)
X(
L
x
)
a
2
sin(ν
L
x
0)
If
a
2
is chosen to equal
0
, then we arrive at a trivial solution with
u(x,y,t)0.
Because a trivial solution is not desired,
X(
L
x
)0
when the argument of the sine function is some integer multiple of
π
(namely,
ν
L
x
nπ
) so that
ν
nπ
L
x
. A similar result is found in applying the
Y
dimension boundary conditions to
Y(y),
where
b
1
0
and
μ
mπ
L
y
. Combining Equations
(1),(2)
and
(3)
leads to
′′
X
(x)
X(x)
+
′′
Y
(y)
Y(y)
-
2
ν
-
2
μ
-
2
λ
λ
2
ν
+
2
μ
Because all three variables are functions of n and m, they can now be expressed as
ν
n

nπ
L
x
,
μ
m

mπ
L
y
and
λ
nm

2
v
n
+
2
μ
m
Then using the initial conditions for the case
f(x,y)x*y(1-x)(1-y)
and
g(x,y)0
(the initial velocity equals to zero)
u(x,y,t)=
∞
∑
n=1
∞
∑
m=1
a
nm
sin
nπx
L
sin
mπy
L
cos
cπ
L
2
n
+
2
m
t
a
nm
=
4
2
L
L
∫
0
L
∫
0
sin
nπx
L
sin
mπy
L
f(x,y)xy,n,m⩾1
Running the following code on Mathematica will produce the solution of the problem
In[]:=
Clear["Global`*"]​​c=4;​​L=1;
(*Definitionoffunctionsf(x,y)andg(x,y)*)​​f[x_,y_]:=x*y(1-x)*(1-y)​​g[x_,y_]:=0​​μ[n_]=(n*π)^2;​​κ[m_]=(m*π)^2;​​λ[n_,m_]=μ[n]+κ[m];​​ω[n_,m_]=c*Sqrt[λ[n,m]]//Simplify​​U[n_,m_]=Sin[(n*π*x)/L]*Sin[(m*π*y)/L]
Out[]=
4
2
m
+
2
n
π
Out[]=
Sin[nπx]Sin[mπy]
(*ComputationoftheFouriercoefficients*)​​A[n_,m_]=4/L^2
L
∫
0
L
∫
0
f[x,y]*U[n,m]xy
Out[]=
4(-2+2Cos[mπ]+mπSin[mπ])(-2+2Cos[nπ]+nπSin[nπ])
3
m
3
n
6
π
In[]:=
B[n_,m_]=4/(L^2*ω[n,m])
L
∫
0
L
∫
0
g[x,y]*U[n,m]xy
Out[]=
0

The general solution of our problem

u1[x,y,t]=(A[n,m]*Cos[ω[n,m]*t]+B[n,m]*Sin[ω[n,m]*t])*Sin[(n*π*x)/L]*Sin[(m*π*y)/L]
Out[]=
1
3
m
3
n
6
π
4Cos4
2
m
+
2
n
πt(-2+2Cos[mπ]+mπSin[mπ])(-2+2Cos[nπ]+nπSin[nπ])Sin[nπx]Sin[mπy]
u[x_,y_,t_,l_,k_]:=
l
∑
n=1
k
∑
m=1
16(-1+
m
(-1)
)(-1+
n
(-1)
)Cos
2
m
+
2
n
πtSin
nπx
L
Sin
mπy
L

3
m
3
n
6
π

We calculate the partial sum (k,l)=(1,1),(2,1),(2,2),(3,3)

u[x,y,t,1,1]//TraditionalForm​​u[x,y,t,1,2]//TraditionalForm​​u[x,y,t,2,2]//TraditionalForm​​u[x,y,t,3,3]//TraditionalForm
Out[]//TraditionalForm=
64cos(
2
πt)sin(πx)sin(πy)
6
π
Out[]//TraditionalForm=
64cos(
2
πt)sin(πx)sin(πy)
6
π
Out[]//TraditionalForm=
64cos(
2
πt)sin(πx)sin(πy)
6
π
Out[]//TraditionalForm=
64cos(
2
πt)sin(πx)sin(πy)
6
π
+
64cos(
10
πt)sin(3πx)sin(πy)
27
6
π
+
64cos(
10
πt)sin(πx)sin(3πy)
27
6
π
+
64cos(3
2
πt)sin(3πx)sin(3πy)
729
6
π

We plot snapshots for the last case

In[]:=
graphs=Table[ParametricPlot3D[{x,y,u[x,y,t,3,3]},{x,0,2},{y,0,3},Axes->False,Boxed->False,BoxRatios->{1,1,1},ImageSize->600,BoundaryStyle->Directive[Red,Thick],ColorFunction->"MintColors",PlotRange->All],{t,0,2,1/4}];​​p1=Partition[graphs,3];​​Show[GraphicsGrid[p1]]
Out[]=

We create a three - dimensional graph

2D Wave Equation in Polar Coordinates

Now we will try to solve another problem with different initial condition
Using the method separation of variables we will try to find the general solution of the problem.
So the general solution of the boundary value problem is the following
Running the following code on Mathematica will produce the solution of the problem

We calculate the first ten terms and the coefficients

We plot some snapshots of the solution

We create a three - dimensional graph

Helmholtz problem in circular disk

The following expression
Now we create the 3D graphics

Solving Helmholtz Equation in 2D for Circular Disk with DEigensystem, NDEigensystem

Compute the first 4 eigenfunctions for a circular membrane with the edges clamped:
◼
  • DEigensystem
  • ◼
  • NDEigensystem
  • Nonlinear Schrödinger equation

    Numerical Solution

    3D visualization

    Problem 2

    CITE THIS NOTEBOOK

    A lecture on the wave equation in two dimensions​
    by Athanasios Paraskevopoulos​
    Wolfram Community, STAFF PICKS, May 28 2023
    ​https://community.wolfram.com/groups/-/m/t/2926708