Separation of Variables Method
M.M. Yovanovich
SEPVARWAV1.MWS
Separation of variables method applied to one-dimensional wave equation. The wave equation in cartesian coordinates which is
will be separated into three sets of independent second-order ordinary differential equations by the substitution
where
and
are independent space and time functions.
> restart:
Wave equation in cartesian coordinates.
> PDE:= diff(U(x,t), x,x) - diff(U(x,t),t,t)/c^2 = 0;
> U(x,t):= X(x)*tau(t);
> PDE:= PDE/U(x,t);
> ODE:= expand(PDE);
The two separated terms are functions of
and
only for all values of
and
. We can obtain three sets of independent second-order ordinary differential equations by setting the two terms to i) 0, ii)
, and iii)
. The three options will be used.
Option 1: ODEs and their solutions.
> ode11:= X(x)*op(1, lhs(ODE)) = 0;
> ode12:= -(c^2*tau(t))*op(2, lhs(ODE)) = 0;
> sol11:= subs(_C1 = A, _C2 = B, dsolve(ode11, X(x)));
> sol12:= subs(_C1 = A, _C2 = B, dsolve(ode12, tau(t)));
One Solution of the Wave Equation.
> sol1Wave:= rhs(sol11)*rhs(sol12);
The first solution of the wave equation is linear in space and time.
Option 2: ODEs and their Solutions.
> ode21:= expand(X(x)*(op(1, lhs(ODE)) + lambda^2)) = 0;
> ode22:= -expand((c^2*tau(t))*(op(2, lhs(ODE)) - lambda^2)) = 0;
> sol21:= subs(_C1 = A, _C2 = B, dsolve(ode21, X(x)));
> sol22:= subs(_C1 = C, _C2 = D, dsolve(ode22, tau(t)));
A Second Solution of the Wave Equation.
> sol2Wave:= rhs(sol21)*rhs(sol22);
The second solution of the wave equation consists of the product of independent periodic functions in space and time.
Option 3: ODEs and their Solutions.
> ode31:= expand(X(x)*(op(1, lhs(ODE)) - lambda^2)) = 0;
> ode32:= -expand((c^2*tau(t))*(op(2, lhs(ODE)) + lambda^2)) = 0;
> sol31:= subs(_C1 = A, _C2 = B, dsolve(ode31, X(x)));
> sol32:= subs(_C1 = C, _C2 = D, dsolve(ode32, tau(t)));
A Third Solution of the Wave Equation.
> sol3Wave:= rhs(sol31)*rhs(sol32);
>
The third solution of the one-dimensional wave equation consists of the product of two independent, non-periodic
functions in space and time.
Summary of the three solutions of the one-dimensional wave equation.
> sol_Wave1:= sol1Wave;
> sol_Wave2:= sol2Wave;
> sol_Wave3:= sol3Wave;
The third solution can also be expressed in terms of hyperbolic functions.
> sol_Wave32:= (A*cosh(lambda*x) + B*cosh(lambda*x))*(C*cosh(lambda*c*t) + D*sinh(lambda*c*t));
The constants of integration
and
will be deterined by the boundary and initial conditions of the problem. The boundary conditions must be homogeneous conditions of the first, second or third kinds, respectively.