Separation of Variables

M.M. Yovanovich

SEPVARDIF1.MWS

Separation of variables method applied to the one-dimensional diffusion equation. The diffusion equation in cartesian cordinates which is [Maple Math] will be separated into three sets of independent first and second-order ordinary differential equations by the substitution [Maple Math] where [Maple Math] and [Maple Math] are independent space and time functions.

> restart:

Diffusion equation in cartesian coordinates.

> PDE:= diff(U(x,t), x,x) - diff(U(x,t),t)/alpha = 0;

[Maple Math]

> U(x,t):= X(x)*tau(t);

[Maple Math]

> PDE:= PDE/U(x,t);

[Maple Math]

> ODE:= expand(PDE);

[Maple Math]

The two separated terms are functions of [Maple Math] and [Maple Math] only for all values of [Maple Math] and [Maple Math] . We can obtain three sets of independent first and second-order ordinary differential equations by setting the two terms to i) 0, ii) [Maple Math] , and iii) [Maple Math] . The three choices will be used.

Choice 1: ODEs and their Solutions.

> ode11:= X(x)*op(1, lhs(ODE)) = 0;

[Maple Math]

> ode12:= (alpha*tau(t))*op(2, lhs(ODE)) = 0;

[Maple Math]

> sol11:= subs(_C1 = A, _C2 = B, dsolve(ode11, X(x)));

[Maple Math]

> sol12:= subs(_C1 = C, dsolve(ode12, tau(t)));

[Maple Math]

One Solution of the Diffusion Equation.

> sol1Diffusion:= rhs(sol11)*rhs(sol12);

[Maple Math]

This solution is independent of time. It is the steady-state part.

Choice2: ODEs and their Solutions.

> ode21:= expand(X(x)*(op(1, lhs(ODE)) - lambda^2)) = 0;

[Maple Math]

> ode22:= - expand((alpha*t)*(op(2, lhs(ODE)) + lambda^2)) = 0;

[Maple Math]

> sol21:= subs(_C1 = A, _C2 = B, dsolve(ode21, X(x)));

[Maple Math]

> sol22:= subs(_C1 = C, dsolve(ode22, tau(t)));

[Maple Math]

A Second Solution of the Diffusion Equation.

> sol2Diffusion:= rhs(sol21)*rhs(sol22);

[Maple Math]

The second solution of the one-dimensional diffusion equation consist of the product of a periodic space function and an exponential time function which increases with increasing time. This solution is not acceptable for thermal equilibrium problems.

Choice 3: ODEs and their Solutions.

> ode31:= expand(X(x)*(op(1, lhs(ODE)) + lambda^2)) = 0;

[Maple Math]

> ode32:= - expand((alpha*tau(t))*(op(2, lhs(ODE)) - lambda^2)) = 0;

[Maple Math]

> sol31:= subs(_C1 = A, _C2 = B, dsolve(ode31, X(x)));

[Maple Math]

> sol32:= subs(_C1 = C, dsolve(ode32, tau(t)));

[Maple Math]

A Third Solution of the Diffusion Equation.

> sol3Diffusion:= rhs(sol31)*rhs(sol32);

[Maple Math]

The third solution of the one-dimensional diffusion equation consist of the product of an exponential space function and an exponential time function which decreases with increasing time. The third solution is acceptable for thermal equilibrium problems.

Summary of the three solutions of the one-dimensional diffusion equation.

> sol_Diffusion1:= subs(C = 1, sol1Diffusion);

[Maple Math]

> sol_Diffusion2:= subs(C = 1, sol2Diffusion);

[Maple Math]

Alernative form of the second solution.

> sol_Diffusion22:= (A*cosh(lambda*x) + B*sinh(lambda*x))*exp(lambda^2*alpha*t);

[Maple Math]

> sol_Diffusion3:= subs(C = 1, sol3Diffusion);

[Maple Math]

>

The constants of integration [Maple Math] and [Maple Math] and the separation constant [Maple Math] will be determined by means of the homogeneous boundary conditions of the first, second and third kinds, respectively.