Separation of Variables Method
M.M. Yovanovich
SEPVARLAP1.MWS
Separation of variables method applied to the two-dimensional Laplace equation in cartesian coordinates. The Laplace equation will be separated into three sets of independent second-order ordinary differential equations by the substitution where and are independent functions.
> restart:
Laplace equation in cartesian coordinates.
> PDE:= diff(U(x,y),x,x) + diff(U(x,y),y,y) = 0;
> U(x,y):= X(x)*Y(y);
> PDE:= PDE/U(x,y);
> 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 equal to i) , ii) , and iii) . We will examine the three choices.
Choice 1: ODEs and their Solutions.
> ode11:= X(x)*op(1,lhs(ODE)) = 0;
> ode12:= Y(y)*op(2,lhs(ODE)) = 0;
> sol11:= subs(_C1 = A, _C2 = B, dsolve(ode11, X(x)));
> sol12:= subs(_C1 = C, _C2 = D, dsolve(ode11, X(x)));
One Solution of the Laplace Equation.
> sol1Laplace:= rhs(sol11)*rhs(sol12);
Both separated ODEs have linear solutions in and respectively.
Choice 2: ODEs and their Solutions.
> ode21:= op(1,lhs(ODE)) = + lambda^2;
> ode22:= op(2,lhs(ODE)) = - lambda^2;
> sol21:= subs(_C1 = A, _C2 = B, dsolve(X(x)*ode21, X(x)));
> sol22:= subs(_C1 = C, _C2 = D, dsolve(Y(y)*ode22, Y(y)));
A Second Solution of the Laplace Equation.
> sol2Laplace:= rhs(sol21)*rhs(sol22);
The second solution of the Laplace equation consists of exponential functions in and periodic trigonometric functions in .
Choice 3: ODEs and their Solutions.
> ode31:= op(1,lhs(ODE)) = - lambda^2;
> ode32:= op(2,lhs(ODE)) = + lambda^2;
> sol31:= subs(_C1 = A, _C2 = B, dsolve(X(x)*ode31, X(x)));
> sol32:= subs(_C1 = C, _C2 = D, dsolve(Y(y)*ode32, Y(y)));
A Second Solution of the Laplace Equation.
> sol3Laplace:= rhs(sol31)*rhs(sol32);
The third solution of the Laplace equation consists of periodic trigonometric functions in and non-periodic exponential functions in .
Summary of the three solutions of the two-dimensional Laplace equation.
> sol_Laplace1:= sol1Laplace;
> sol_Laplace2:= sol2Laplace;
> sol_Laplace3:= sol3Laplace;
The constants of integration and , and the separation constant will be determined by means of the homogeneous boundary conditions of the first, second and third kinds, respectively.