Partial Differential Equations: Separation of Variable Solutions
Partial Differential Equations: Separation of Variable Solutions
Partial Differential Equations: Separation of Variable Solutions
2 = t x2
I.C.: B.C. 1: B.C. 2:
for t > 0 at t = 0 at x = 0 at x = L
for 0 < x < L for 0 < x < L for t > 0 for t > 0
= o
=0 x =0
in which o is assumed to be a constant. To solve this problem by separation of variables, you would assume that:
= T (t ) X ( x)
(5)
where, as indicated in the above equation, the function T depends only on t and the function X depends only on x. If this hypothesis is not correct, then the solution will fail during the procedure. The procedure for solving a partial differential equation using separation of variables will be presented by solving Eq. (1) for the restricting conditions (1 initial condition and 2 boundary conditions) listed as Eqs. (2) - (4). Separating the Partial Differential Equation of n Independent Variables into n Ordinary Differential Equations
Begin by differentiating Eq. (5) to obtain the terms required in the differential equation (i.e., Eq. (1)):
dT =X t dt 2 d2X =T x2 dx 2
(6) (7)
These are substituted into the differential equation and restricting conditions. For this problem (i.e., Eqs. (1) (4)), this yields:
dT d2X =T dt d x2
(8)
Importantly, the left-hand side of Eq. (9) is a function of only t, and the right hand side of Eq. (9) is a function of only x. Since Eq. (9) must be satisfied for all values of x and t, one must conclude that each side of Eq. (9) must be equal to the same constant value. So that we can define this constant with an unambiguous sign, we will choose the constant to be 2, where the sign (either plus or minus) will be chosen consistent with the physics of the problem. Thus, Eq. (9) gives: 1 dT 1 d 2 X = = 2 T d t X dx 2 which can be divided into two separate ordinary differential equations:
1 dT = 2 T dt 1 d2X = 2 2 X dx (11) (12)
(10)
in which the sign on 2 (either positive or negative) must be the same in both equations. The procedure for choosing the sign on 2 will be discussed later.
Separating the Restricting Conditions
= T X = o dX =T =0 dx x =TX=0
or or dX =0 dx X=0
at t = 0 at x = 0 at x = L
If the sign on 2 is chosen to be negative, then Eqs. (11) and (12) become:
1 dT = 2 T dt
d2X + 2 X = 0 dx 2
(16) (17)
(18)
X = A sin( x) + B cos( x)
(19)
where I, A, and B are constants of integration. For the choice of a negative sign on 2, X is periodic in x and T decreases exponentially in time. For many physical problems, the time dependence is most significant at short times and it decreases in importance as time becomes large. Thus, an exponentially decreasing time dependence is often physically reasonable. In addition, for the separation of variable solution to work, one function of the independent variables (i.e., either T or X) must produce periodic functions. In this case, the function X(x) is periodic (i.e., it consists of sine and cosine functions). If the sign on 2 is chosen to be positive, then Eqs. (11) and (12) become: 1 dT = 2 T dt
d2X 2 X = 0 2 dx
(20) (21)
(22) (23)
where I, A, and B are constants of integration. For the choice a positive sign on 2, X is not periodic in x and T increases exponentially in time. For many physical problems, this time dependence is not reasonable. Just as important, a solution by separation of variables is not possible for this choice of sign on 2, since neither the T or X functions are periodic. Based on these results, we will choose the sign on 2 to be negative. Consequently, the functions for X and T are defined by Eqs. (18) and (19).
Finding the Constants of Integration and Eigenvalues
Begin by using the restrictions on the independent variable that generated the periodic functions. In this case, that will be X(x):
X = A sin( x) + B cos( x)
(24)
at x = 0 at x = L
(25) (26)
(27)
When Eq. (27) is evaluated at x = 0 for the condition that dX/dx = 0, A = 0 and Eq. (24) reduces to:
X = B cos( x)
(28) (29)
Applying the boundary condition specified in Eq. (26), we obtain the following:
X = B cos( L) = 0
which is satisfied for two cases. In the first case, B = 0. This solution states that = 0 for all values of t and x. While this satisfies the differential equation, it is not a helpful solution. This solution is referred to as the trivial solution and it is ignored. In the second case, Eq. (29) will be satisfied, if L is equal to /2, 3/2, 5/2 and so on. That is, Eq. (29) is satisifed if = (2n + 1)/2L, where n is any positive integer greater than or equal to zero. As a consequence, we are not able to determine the value of B (yet, we will determine it later), and we have discovered that X has an infinite number of solutions. We will indicate all of these solutions as follows:
X n = Bn cos(n x)
(30)
where
n =
(2n + 1) 2L
(31)
Note also that the solution to the time equation also has an infinite number of solutions. That is,
Tn = I n exp(n2t )
(32)
where In and Bn designate the constant of integration corresponding the solution that involves n. The periodic function (in this case, cosine) is called the eigenfunction. The values of n that cause the eigenfunction to equal zero (i.e., the values specified in Eq. (31)) are called eigenvalues (i.e., literally values of the zeroes). Before we find the remaining constants of integration (i.e., In and Bn), we first combine Tn and Xn to obtain the complete solution of .
Superposition
The complete solution to a partial differential equation is the sum of all possible solutions. The process of summing all possible solutions is called superposition. For this example problem, there are an infinite number of solutions because there are an infinite number of eigenvalues, n. Thus, the complete solution to the partial differential equation of is:
= Tn (t ) X n ( x) = I n Bn cos(n x) exp(n2 t )
n=0 n=0
(33)
Since cos(x) = cos(-x), summing over values of n > 0 does include all possible solutions of the partial differential equation. Since the product of two constants is still a constant, we will replace In Bn in Eq. (33) with simply Bn.
= Bn cos(n x) exp(n2 t )
n=0
(34)
Next, we will use the final remaining restricting condition, the initial condition, to determine the constants of integration Bn.
Finding the Remaining Constants of Integration (i.e., Bn)
Begin by applying the initial condition, Eq. (13), stating that = o at t = 0 to Eq. (34) to obtain:
= o = Bn cos(n x)
n =0
at
t=0
(35)
To find values for the constants Bn, we use a special property of eigenfunctions called orthogonality. Mathematically, orthogonal functions like Xn have the following property:
X
a
(n x) X m (m x) r ( x) dx =
b
0
2 n
= X (n x) r ( x) dx
a
where r(x) is a weighting factor, and a and b are the lower and upper bounds on x as specified by the bounds on the differential equation which generated the eigenfunction Xn(x). For this example, a = 0 and b = L. The weighting factor r(x) depends on the differential equation that generated the eigenfunction. For this example, the cosine eigenfunction was generated by the harmonic equation (Eq. (17)), for which r(x) = 1. Bessels equation also can generate eigenfunctions. For eigenfunctions generated from Bessels equation r(x) = x. We use the property of orthogonality to find each of the constants Bn separately. To do this, multiply both sides of Eq. (36) by the eigenfunction Xm and then integrate over the bounds of the problem (i.e., between a = 0 and b = L) as follows:
[cos(
o 0
n=0 0
(37)
n
cos(n x) [ cos(m x) ] dx
cos(m x) dx = Bn cos 2 (n x) dx
0
(38)
The constant Bn is not a function of x and can be taken out of the integration on x. Solving for Bn, we obtain the following result: Bn = o [ cos(n x)] dx
0 L
cos (
2 0
x) dx
(39)
The integrals indicated in Eq. (39) are then evaluated to obtain numerical values for Bn. For this problem,
x=L
(40)
which includes the identity sin(n L) = sin((2n + 1) / 2) = (-1)n. Evaluating the integral in the denominator of Eq. (39) yields:
x 1 L cos (n x) dx = 2 + 4 n sin(2 n x) = 2 0 0
2 L L
(41)
Combining the results from Eqs. (40) and (41), we obtain the following expression for Bn: Bn = 2 o (1) n 4 o (1) n = n L (2n + 1)
(42)
This equation can be introduced into Eq. (34) to give the final solution:
where
n =
(2n + 1) 2L
(43)
Guidelines for Using Separation of Variable Methods to Solve Partial Differential Equations
1. The differential equation must be linear. That is, no terms in the differential equation should involve products of the dependent variable or derivatives of the dependent variable. 2. The differential equation must be homogeneous. That is, there should be no terms in the equation that do not involve the dependent variables. 3. The differential equation and restricting conditions must be separable. That is, it should be possible to separate independent variables by representing the dependent variable as the product of separate functions that each contain only one independent variable [e.g., (t,x) = T(t) X(x)]. 4. The separated parts of the partial differential equation will each produce an ordinary differential equation involving the independent variable in that part. At least one of the ordinary differential equations generated from the separation process must produce solutions that are periodic functions (e.g., differential equations that generate solutions that are periodic functions include the harmonic equation or Bessels equation). This requirement should be considered in choosing the sign of the separation constant (i.e., the postive or negative sign on 2) 5. Boundary conditions for the ordinary differential equation generating periodic functions must be homogeneous. That is, at each of the boundaries of the periodic function (e.g., at x = 0 and at x = L in the previous example), either = 0, or /x = 0, or + /x = 0, where is a constant. (Note that the boundary conditions on x in the previous example met this criterion.)
Methods for Making a Nonhomogeneous Partial Differential Equation or Nonhomogeneous Boundary Conditions Homogeneous
Separation of variable solutions can sometimes be used for problems with a nonhomogeneous partial differential equation or with nonhomogeneous boundary conditions. The procedure is to 6
divide the dependent variable into two parts. One part is chosen to satisfy the nonhomogeneous parts of the differential equation or boundary conditions, so that the other part does not need to do this. For example, consider the dependent variable that depends on independent variables t and x as specified in the following partial differential equation and restricting conditions (i.e., one initial and two boundary conditions):
2 = t x2
I.C. B.C. 1: B.C. 2:
for t > 0 at t = 0 at x = 0 at x = L
for 0 < x < L for 0 < x < L for t > 0 for t > 0
= o = 1 =0
Note that the boundary condition at x = 0 is not homogeneous. This problem can still be solved by separation of variables, if we specify that be defined as follows:
(t , x) = ( x) (t , x)
(48)
where is the steady-state solution of Eq. (44) that satisfies the boundary conditions of the problem. That is, d 2 =0 d x2 B.C. 1: B.C. 2: for 0 < x < L at x = 0 at x = L (49) (50) (51)
= 1 = 0
and (t,x) is the time-dependent function that remains after the steady-state solution is added to the complete solution . Solving Eq. (49) for the boundary conditions, Eqs. (50) and (51) yields = 1 (1 x / L) . Substituting Eq. (48) into Eqs. (44) (47) yields the following:
d 2 2 = t d x2 x2
I.C.: B.C. 1: B.C. 2:
for t > 0 at t = 0
= - = o = - = 1 = - = 0 2 = t x2
Since satisfies Eqs. (49) (51), Eqs. (52) (55) simplify to give: for t > 0 at t = 0 for 0 < x < L for 0 < x < L (56) (57)
I.C.:
= - o = 1 (1-x / L) - o
B.C. 1: B.C. 2:
=0 =0
(58) (59)
Notice that the differential equation and restricting conditions on meet the requirements of a homogenous partial differential equation and boundary conditions for the independent variable that would produce periodic functions after applying the separation of variable method (i.e., on x). Consequently, Eqs. (56) (59) can be solved using separation of variables as described in the beginning of this handout. This same technique can also be used to solve a nonhomogeneous partial differential equation like the following example:
2 = +H t x2
I.C.: B.C. 1: B.C. 2:
for t > 0 at t = 0 at x = 0 at x = L
for 0 < x < L for 0 < x < L for t > 0 for t > 0
= o = 1 =0
where H is a constant. Following the same procedure described for nonhomogeneous boundary conditions, should satisfy the following equations: d 2 = H d x2 B.C. 1: B.C. 2: for 0 < x < L at x = 0 at x = L x2 + I1 x + I 2 2 (64) (65) (66)
= 1 = 0
= H
(67)
where the two constants of integration I1 and I2 are determined from the boundary conditions, Eqs. (65) and (66), to give the following solution for :
= 1 1 + 2 L
Substituting Eq. (48) into Eqs. (60) (63) yields:
HLx
(68)
d 2 2 = +H t d x2 x2
I.C.: B.C. 1: B.C. 2:
for t > 0 at t = 0 at x = 0 at x = L
= - = o = - = 1 = - = 0
2 = t x2
I.C.: B.C. 1: B.C. 2:
for t > 0 at t = 0
= -o =0 =0
which can be solved using separation of variables as described in the beginning of the handout.
Choosing the Index on the Sum of All Solutions (i.e., should n = 1 or 0?)
Remember that the complete solution to a partial differential equation is the sum of all possible solutions. It is important that all solutions be included. In the example at the beginning of this handout, eigenvalues existed at when cos(n L) = 0. Thus, eigenvalues occurred at /2L, 3/2L, 5/2L and so on. Note that eigenvalues also occur at negative values (e.g., -/2L, -3/2L, -5/2L). However, because cos(x) = cos(-x), solutions written with the negative argument are not independent from the solutions written with the positive argument. If n is written as (2n + 1)/2L, then the index on the sum of all solutions should begin with n = 0. Other situations can occur. For example, if the separation of variable solution generates the harmonic equation: d2X + 2 X = 0 2 dx X = A sin( x) + B cos( x) With the following boundary conditions B.C. 1: B.C. 2: Then Xn = An sin(n x) where X=0 X=0 at x = 0 at x = L (79) (80) (81) (77) (78)
n = n
In this case, when n = 0, sin(n x) = 0, and consequently, the index on the sum of all solutions should start at n = 1 (i.e., because the solution at n = 0 is zero). However, if the following boundary conditions were applied to Eq. (78): B.C. 1: B.C. 1: Then Xn = An cos(n x) where dX =0 dx dX =0 dx at x = 0 at x = L (82) (83)
n = n
(84)
In this case, the function Xn is not zero, when n = 0, and thus, the index on the sum of all solutions should begin with n = 0. One further note about this case. When finding the constants in the sum, the denominator will involve the integral listed in Eq. (85). Be careful to notice that the value of this integral is different for n = 0 than for n 0.
2 cos (n x) dx = 1 dx = x 0 = L
L L L
for n = 0 x 1 L + sin(2 n x) = 2 4 n 2 0
L
= cos 2 (n x) dx =
0
(85) for n 0
10