Okay, it is finally time to at least start discussing one of
the more common methods for solving basic partial differential equations. The method of Separation of Variables cannot always be used and even when it can
be used it will not always be possible to get much past the first step in the
method. However, it can be used to
easily solve the 1D heat equation
with no sources, the 1D wave
equation, and the 2D version of Laplace’s Equation, .
In order to use the method of separation of variables we
must be working with a linear homogenous partial differential equations with
linear homogeneous boundary conditions.
At this point we’re not going to worry about the initial condition(s)
because the solution that we initially get will rarely satisfy the initial
condition(s). As we’ll see however there
are ways to generate a solution that will satisfy initial condition(s) provided
they meet some fairly simple requirements.
The method of separation of variables relies upon the
assumption that a function of the form,
will be a solution to a linear homogeneous partial
differential equation in x and t.
This is called a product solution
and provided the boundary conditions are also linear and homogeneous this will
also satisfy the boundary conditions.
However, as noted above this will only rarely satisfy the initial
condition, but that is something for us to worry about in the next section.
Now, before we get started on some examples there is
probably a question that we should ask at this point and that is : Why? Why did we choose this solution and how do we
know that it will work? This seems like
a very strange assumption to make. After
all there really isn’t any reason to believe that a solution to a partial
differential equation will in fact be a product of a function of only x’s and a function of only t’s.
This seems more like a hope than a good assumption/guess.
Unfortunately the best answer is that we chose it because it
will work. As we’ll see it works because
it will reduce our partial differential equation down to two ordinary
differential equations and provided we can solve those then we’re in business
and the method will allow us to get a solution to the partial differential
equations.
So, let’s do a couple of examples to see how this method
will reduce a partial differential equation down to two ordinary differential
equations.
Example 1 Use
Separation of Variables on the following partial differential equation.
Solution
So, we have the heat equation with no sources, fixed
temperature boundary conditions (that are also homogeneous) and an initial
condition. The initial condition is
only here because it belongs here, but we will be ignoring it until we get to
the next section.
The method of separation of variables tells us to assume
that the solution will take the form of the product,
so all we
really need to do here is plug this into the differential equation and see
what we get.
As shown above we can factor the out of the time derivative and we can factor
the out of the spatial derivative. Also notice that after we’ve factored these
out we no longer have a partial derivative left in the problem. In the time derivative we are now
differentiating only with respect to t and this is now an ordinary derivative. Likewise, in the spatial derivative we are
now only differentiating with respect to x and so we again have an ordinary derivative.
At this point it probably doesn’t seem like we’ve done much
to simplify the problem. However, just
the fact that we’ve gotten the partial derivatives down to ordinary
derivatives is liable to be good thing even if it still looks like we’ve got
a mess to deal with.
Speaking of that apparent (and yes I said apparent) mess,
is it really the mess that it looks like?
The idea is to eventually get all the t’s on one side of the equation and all the x’s on the other side. In
other words we want to “separate the variables” and hence the name of the
method. In this case let’s notice that
if we divide both sides by we get want we want and we should point out
that it won’t always be as easy as just dividing by the product
solution. So, dividing out gives us,
Notice that we
also divided both sides by k. This was done only for convenience down the
road. It doesn’t have to be done and
nicely enough if it turns out to be a bad idea we can always come back to
this step and put it back on the right side.
Likewise, if we don’t do it and it turns out to maybe not be such a
bad thing we can always come back and divide it out. For the time being however, please accept
our word that this was a good thing to do for this problem. We will discuss the reasoning for this after
we’re done with this example.
Now, while we
said that this is what we wanted it still seems like we’ve got a mess. Notice however that the left side is a
function of only t and the right
side is a function only of x as we
wanted. Also notice these two
functions must be equal.
Let’s think
about this for a minute. How is it
possible that a function of only t’s
can be equal to a function of only x’s
regardless of the choice of t
and/or x that we have? This may seem like an impossibility until
you realize that there is one way that this can be true. If both functions (i.e. both sides of the equation) were in fact constant and not
only a constant, but the same constant then they can in fact be equal.
So, we must
have,
where the is called the separation constant and is arbitrary.
The next
question that we should now address is why the minus sign? Again, much like the dividing out the k above, the answer is because it will
be convenient down the road to have chosen this. The minus sign doesn’t have to be there and
in fact there are times when we don’t want it there.
So how do we
know it should be there or not? The
answer to that is to proceed to the next step in the process (which we’ll see
in the next section) and at that point we’ll know if would be convenient to
have it or not and we can come back to this step and add it in or take it our
depending what we chose to do here.
Okay, let’s
proceed with the process. The next
step is to acknowledge that we can take the equation above and split it into
the following two ordinary differential equations.
Both of these are very simple differential equations,
however because we don’t know what is we actually can’t solve the spatial one
yet. The time equation however could
be solved at this point if we wanted to, although that won’t always be the
case. At this point we don’t want to
actually think about solving either of these yet however.
The last step in the process that we’ll be doing in this
section is to also make sure that our product solution, ,
satisfies the boundary conditions so let’s plug it into both of those.
Let’s consider
the first one for a second. We have
two options here. Either or for every t. However, if we have for every t then we’ll also have ,
i.e. the trivial solution, and as
we discussed in the previous section this is definitely a solution to any
linear homogeneous equation we would really like a nontrivial solution.
Therefore we
will assume that in fact we must have . Likewise, from the second boundary
condition we will get to avoid the trivial solution. Note as well that we were only able to
reduce the boundary conditions down like this because they were homogeneous. Had they not been homogeneous we could not
have done this.
So, after applying separation of variables to the given
partial differential equation we arrive at a 1^{st} order
differential equation that we’ll need to solve for and a 2^{nd} order boundary value
problem that we’ll need to solve for . The point of this section however is just
to get to this point and we’ll hold off solving these until the next section.
Let’s summarize everything up that we’ve determined here.
and note that
we don’t have a condition for the time differential equation and is not a
problem. Also note that we rewrote the
second one a little.

Okay, so just what have we learned here? By using separation of variables we were able
to reduce our linear homogeneous partial differential equation with linear
homogeneous boundary conditions down to an ordinary differential equation for
one of the functions in our product solution (1), in this case, and a boundary value problem
that we can solve for the other function, in this case.
Note as well that the boundary value problem is in fact an
eigenvalue/eigenfunction problem. When
we solve the boundary value problem we will be identifying the eigenvalues, ,
that will generate nontrivial solutions to their corresponding
eigenfunctions. Again, we’ll look into
this more in the next section. At this
point all we want to do is identify the two ordinary differential equations
that we need to solve to get a solution.
Before we do a couple of other examples we should take a
second to address the fact that we made two very arbitrary seeming decisions in
the above work. We divided both sides of
the equation by k at one point and
chose to use instead of as the separation constant.
Both of these decisions were made to simplify the solution
to the boundary value problem we got from our work. The addition of the k in the boundary value problem would just have complicated the
solution process with another letter we’d have to keep track of so we moved it
into the time problem where it won’t cause as many problems in the solution
process. Likewise, we chose because we’ve already solved that particular
boundary value problem (albeit with a specific L, but the work will be nearly identical) when we first looked at finding eigenvalues and eigenfunctions. This by the way was the reason we rewrote
the boundary value problem to make it a little clearer that we have in fact
solved this one already.
We can now at least partially answer the question of how do
we know to make these decisions. We wait
until we get the ordinary differential equations and then look at them and
decide of moving things like the k or
which separation constant to use based on how it will affect the solution of
the ordinary differential equations.
There is also, of course, a fair amount of experience that comes into
play at this stage. The more experience
you have in solving these the easier it often is to make these decisions.
Again, we need to make clear here that we’re not going to go
any farther in this section than getting things down to the two ordinary
differential equations. Of course we
will need to solve them in order to get a solution to the partial differential
equation but that is the topic of the remaining sections in this chapter. All we’ll say about it here is that we will
need to first solve the boundary value problem, which will tell us what must be and then we can solve the other
differential equation. Once that is done
we can then turn our attention to the initial condition.
Okay, we need to work a couple of other examples and these
will go a lot quicker because we won’t need to put in all the
explanations. After the first example
this process always seems like a very long process but it really isn’t. It just looked that way because of all the
explanation that we had to put into it.
So, let’s start off with a couple of more examples with the
heat equation using different boundary conditions.
Example 2 Use
Separation of Variables on the following partial differential equation.
Solution
In this case we’re looking at the heat equation with no
sources and perfectly insulated boundaries.
So, we’ll start off by again assuming that our product
solution will have the form,
and because the
differential equation itself hasn’t changed here we will get the same result
from plugging this in as we did in the previous example so the two ordinary
differential equations that we’ll need to solve are,
Now, the point
of this example was really to deal with the boundary conditions so let’s plug
the product solution into them to get,
Now, just as
with the first example if we want to avoid the trivial solution and so we
can’t have for every t and so we must have,
Here is a summary of what we get by applying separation of
variables to this problem.

Next, let’s see what we get if use periodic boundary
conditions with the heat equation.
Example 3 Use
Separation of Variables on the following partial differential equation.
Solution
First note that these boundary conditions really are
homogeneous boundary conditions. If we
rewrite them as,
it’s a little
easier to see.
Now, again we’ve done this partial differential equation
so we’ll start off with,
and the two
ordinary differential equations that we’ll need to solve are,
Plugging the
product solution into the rewritten boundary conditions gives,
and we can see
that we’ll only get nontrivial solution if,
So, here is what we get by applying separation of
variables to this problem.

Let’s now take a look at what we get by applying separation
of variables to the wave equation with fixed boundaries.
Example 4 Use
Separation of Variables on the following partial differential equation.
Solution
Now, as with the heat equation the two initial conditions
are here only because they need to be here for the problem. We will not actually be doing anything with
them here and as mentioned previously the product solution will rarely
satisfy them. We will be dealing with
those in a later section when we actually
go past this first step. Again, the
point of this example is only to get down to the two ordinary differential
equations that separation of variables gives.
So, let’s get going on that and plug the product solution,
(we switched the G to an h here to avoid
confusion with the g in the second
initial condition) into the wave equation to get,
Note that we moved the to the right side for the same reason we
moved the k in the heat equation. It will make solving the boundary value
problem a little easier.
Now that we’ve gotten the equation separated into a
function of only t on the left and
a function of only x on the right
we can introduce a separation constant and again we’ll use so we can arrive at a boundary value problem
that we are familiar with. So, after
introducing the separation constant we get,
The two ordinary differential equations we get are then,
The boundary conditions in this example are identical to
those from the first example and so plugging the product solution into the
boundary conditions gives,
Applying separation of variables to this problem gives,

Next, let’s take a look at the 2D Laplace’s Equation.
Example 5 Use
Separation of Variables on the following partial differential equation.
Solution
This problem is a little (well actually quite a bit in
some ways) different from the heat and wave equations. First, we no longer really have a time
variable in the equation but instead we usually consider both variables to be
spatial variables and we’ll be assuming that the two variables are in the
ranges shown above in the problems statement.
Note that this also means that we no longer have initial conditions,
but instead we now have two sets of boundary conditions, one for x and one for y.
Also, we should point out that we have three of the
boundary conditions homogeneous and one nonhomogeneous for a reason. When we get around to actually solving this
Laplace’s Equation we’ll see that this is in fact required in order for us to
find a solution.
For this problem we’ll use the product solution,
It will often
be convenient to have the boundary conditions in hand that this product
solution gives before we take care of the differential equation. In this case we have three homogeneous
boundary conditions and so we’ll need to convert all of them. Because we’ve already converted these kind
of boundary conditions we’ll leave it to you to verify that these will
become,
Plugging this
into the differential equation and separating gives,
Okay, now we need to decide upon a separation
constant. Note that every time we’ve
chosen the separation constant we did so to make sure that the differential
equation
would show
up. Of course, the letters might need
to be different depending on how we defined our product solution (as they’ll
need to be here). We know how to solve
this eigenvalue/eigenfunction problem as we pointed out in the discussion
after the first example. However, in
order to solve it we need two boundary conditions.
So, for our
problem here we can see that we’ve got two boundary conditions for but only one for and so we can see that the boundary value
problem that we’ll have to solve will involve and so we need to pick a separation constant
that will give use the boundary value problem we’ve already solved. In this case that means that we need to
choose for the separation constant. If you’re not sure you believe that yet
hold on for a second and you’ll soon see that it was in fact the correct
choice here.
Putting the
separation constant gives,
The two ordinary
differential equations we get from Laplace’s Equation are then,
and notice that if we rewrite these a little we get,
We can now see
that the second one does now look like one we’ve already solved (with a small
change in letters of course, but that really doesn’t change things).
So, let’s summarize up here.

So, we’ve finally seen an example where the constant of
separation didn’t have a minus sign and again note that we chose it so that the
boundary value problem we need to solve will match one we’ve already seen how
to solve so there won’t be much work to there.
All the examples worked in this section to this point are
all problems that we’ll continue in later sections to get full solutions
for. Let’s work one more however to
illustrate a couple of other ideas. We
will not however be doing any work with this in later sections however, it is
only here to illustrate a couple of points.
Example 6 Use
Separation of Variables on the following partial differential equation.
Solution
Note that this is a heat equation with the source term of and is both linear and homogenous. Also note that for the first time we’ve
mixed boundary condition types. At we’ve got a prescribed temperature and at we’ve got a Newton’s law of cooling type
boundary condition. We should not come
away from the first few examples with the idea that the boundary conditions
at both boundaries always the same type.
Having them the same type just makes the boundary value problem a
little easier to solve in many cases.
So we’ll start off with,
and plugging
this into the partial differential equation gives,
Now, the next
step is to divide by and notice that upon doing that the second
term on the right will become a one and so can go on either side. Theoretically there is no reason that the
one can’t be on either side, however from a practical standpoint we again
want to keep things a simple as possible so we’ll move it to the t side as this will guarantee that
we’ll get a differential equation for the boundary value problem that we’ve
seen before.
So, separating
and introducing a separation constant gives,
The two
ordinary differential equations that we get are then (with some rewriting),
Now let’s deal
with the boundary conditions.
and we can see
that we’ll only get nontrivial solution if,
So, here is what we get by applying separation of
variables to this problem.

On a quick side note we solved the boundary value problem in
this example in Example 5 of the
Eigenvalues and Eigenfunctions section and that example illustrates why
separation of variables is not always so easy to use. As we’ll see in the next section to get a
solution that will satisfy any sufficiently nice initial condition we really
need to get our hands on all the eigenvalues for the boundary value problem. However, as the solution to this boundary value
problem shows this is not always possible to do. There are ways (which we won’t be going into
here) to use the information here to at least get approximations to the
solution but we won’t ever be able to get a complete solution to this problem.
Okay, that’s it for this section. It is important to remember at this point
that what we’ve done here is really only the first step in the separation of
variables method for solving partial differential equations. In the upcoming sections we’ll be looking at
what we need to do to finish out the solution process and in those sections
we’ll finish the solution to the partial differential equations we started in
Example 1 Example 5 above.
Also, in the Laplace’s Equation
section the last two examples show pretty much the whole separation of variable
process from defining the product solution to getting an actual solution. The only step that’s missing from those two
examples is the solving of a boundary value problem that will have been already
solved at that point and so was not put into the solution given that they tend
to be fairly lengthy to solve.
We’ll also see a worked example (without the boundary value
problem work again) in the Vibrating String
section.