Transforming Nonhomogeneous BCs Into

Chapter 10
Transforming
Nonhomogeneous BCs Into
Homogeneous Ones
10.1
Goal
In the previous chapter, we looked at separation of variables. We saw that this
method applies if both the boundary conditions and the PDE are homogeneous.
In fact, it is more restrictive than this. The example we did, was for both the
PDE ut = 2 uxx and the boundary conditions were not only homogeneous,
they also did not contain derivatives as in the Neumann or mixed conditions.
If they did, even while remaining homogeneous, things would become quickly
more di¢ cult. Also, when the PDE is the more general homogeneous heat
equation, that is ut = Duxx cux
u, things also become more complicated.
Fortunately, there are various techniques to handle these cases which we will
develop in this chapter and the next. In this chapter we will see what can be
done if the boundary conditions are not homogeneous. In the next, we will
see how to handle homogeneous boundary conditions which contain derivatives.
We will also see how to handle the more general form of the heat equation:
ut = Duxx cux
u by transforming it into the simpler version ut = uxx .
Unfortunately, we will also see that some of these techniques turn the PDE into
a nonhomogeneous one. So, ultimately, we will need to learn how to handle
those too. This will be done after this chapter and the next. It will require new
techniques (eigenfunction expansion and integral transforms).
65
66CHAPTER 10. TRANSFORMING NONHOMOGENEOUS BCS INTO HOMOGENEOUS ONES
10.2
Introduction
In this section, we will address problems of the form
8
PDE
ut = 2 uxx
0<x<L 0<t<1
>
>
<
ux (0; t) + u (0; t) = g1 (t)
BC
0<t<1
ux (L; t) + u (L; t) = g2 (t)
>
>
:
IC
u (x; 0) = (x)
0 x L
(10.1)
The general idea is that we will perform a change of variable of the form u (x; t) =
S (x; t) + U (x; t) where S will also satisfy the boundary conditions. This will
ensure that the new boundary conditions are homogeneous. We will prove it
below. The general form of S (x; t) will be
S (x; t) = A (t) 1
x
x
+ B (t)
L
L
where A (t) and B (t) will be determined using the fact S must satisfy the
boundary conditions. We will rewrite the IBVP 10.1 in terms of U and then
solve it.
Remark 56 The reader is already familiar with the idea of writing the solution
as a sum of two solutions, one of which corresponds to a homogeneous problem.
This is a standard technique used with ordinary di¤ erential equations.
Proposition 57 If u (x; t) = S (x; t) + U (x; t) and S (x; t) also satis…es the
boundary conditions in equations 10.1, then the boundary conditions of the new
IBVP written in terms of U will be homogeneous.
Proof. We verify it only for the …rst boundary condition. We have
g1 (t)
=
ux (0; t) + u (0; t)
=
(Sx (0; t) + Ux (0; t)) +
=
Sx (0; t) + Ux (0; t) + S (0; t) + U (0; t)
=
=
(S (0; t) + U (0; t))
Sx (0; t) + S (0; t) + Ux (0; t) + U (0; t)
g1 (t) + Ux (0; t) + U (0; t) since S satis…es the BCs
Thus
Ux (0; t) + U (0; t) = 0
and this is a homogeneous condition.
Remark 58 In fact, not only U satis…es homogeneoud boundary conditions,
but the boundary conditions U satis…es are the same as those u satis…es, except
that we have 0 instead of g1 (t) and g2 (t).
The examples below will show that two elements play an important role.
They are:
10.3. THE NONHOMOGENEOUS TERMS ARE CONSTANTS, NO MIXED BOUNDARY CONDITIONS67
1. Whether the nonhomogeneous part of the BCs (g1 (t) and g2 (t)) are functions of t or constants. That will determine in part the exact form S has.
It will also determine if the PDE of the new problem is homogeneous or
not. If they are constant, then we will see that S is only a function of x
and the PDE of the new problem will be homogeneous.
2. Whether the BCs have a derivative term or not. That will determine in
part the exact form S has.
We begin with a simple case which should help us understand why we use
this form for S (x; t).
10.3
The Nonhomogeneous Terms Are Constants,
no Mixed Boundary Conditions
Consider an insulated rod for which the ends (boundaries) are kept at constant
temperatures T1 and T2 . Then, the IBVP becomes
8
PDE
ut = 2 uxx
0<x<L 0<t<1
>
>
<
u (0; t) = T1
BC
0<t<1
(10.2)
u (L; t) = T2
>
>
:
IC
u (x; 0) = (x) 0 x L
Because the BCs are not homogeneous, we cannot apply the technique used
in the previous chapter. You will recall that in many di¤usion problems we
have discussed so far, we noticed that there was a steady state solution, one
which only depended on x for large time. So, it makes sense to think of our
temperature u (x; t) as the sum of two parts:
u (x; t) = S (x) + U (x; t)
where S (x) is the steady state part of the solution, the one that will remain for
large time. U (x; t) is the part of the solution which depends on the IC and will
eventually go to 0. Experience and many trial and error attempts show that
the following expression for S (x) will accomplish what we want, that is change
our BCs into homogeneous ones.
S (x)
x
(T2 T1 )
L
x
x
+ T2
1
L
L
= T1 +
= T1
You will note that this is just the line through the points (0; T1 ) and (L; T2 ).
You will also note that S (x) satis…es the BCs. With this value of S (x), u (x; t)
becomes:
x
u (x; t) = T1 + (T2 T1 ) + U (x; t)
(10.3)
L
68CHAPTER 10. TRANSFORMING NONHOMOGENEOUS BCS INTO HOMOGENEOUS ONES
By substituting into equations 10.2, we will get a new problem in U (x; t) with
homogeneous boundary conditions. We show how this is done in details. For
this, we need to compute ut and uxx .
ut
ux
= Ut
T2
=
uxx
= Uxx
T1
L
+ Ux
Also,
u (0; t) = T1 + U (0; t)
But from the original BC, we know that
u (0; t) = T1
Combining the two gives
U (0; t) = 0
Similarly,
u (L; t) = T2 + U (L; t)
But from the original BC, we know that
u (L; t) = T2
Combining the two gives
U (L; t) = 0
Finally,
x
(T2
L
But from the original IC, we know that
u (x; 0) = T1 +
u (x; 0) =
T1 ) + U (x; 0)
(x)
Combining the two gives
U (x; 0)
=
(x)
=
(x)
T1 +
x
(T2
L
T1 )
Thus, the IBVP becomes
8
PDE
Ut = 2 Uxx
0<x<L 0<t<1
>
>
<
U (0; t) = 0
BC
0<t<1
U (L; t) = 0
>
>
:
IC
U (x; 0) = (x) 0 x L
This is now a problem we can solve using separation of variables. In fact, we
solved it (with a di¤erent IC) in the previous chapter. The IC only plays a role
10.4. THE NONHOMOGENEOUS TERMS ARE CONSTANTS, MIXED BOUNDARY CONDITIONS69
in the computation of the coe¢ cients An . Thus, we can use the solution we
found. It was
1
X
2
n
n x
U (x; t) =
An e ( L ) t sin
L
n=0
where
2
An =
L
Z
L
(x) sin
0
n x
dx
L
Therefore
u (x; t) = T1 +
x
(T2
L
where
An =
10.4
2
L
T1 ) +
Z
1
X
2
n
n x
An e ( L ) t sin
L
n=0
L
(x) sin
0
n x
dx
L
The Nonhomogeneous Terms Are Constants,
Mixed Boundary Conditions
Here, we consider the IBVP
8
PDE
ut = 2 uxx
>
>
<
u (0; t) = T 1
BC
u
(L;
t) + hu (L; t) = T2
>
x
>
:
IC
u (x; 0) = (x)
0<x<L
0<t<1
0<t<1
0
x
(10.4)
L
We use a similar idea as before, except that it is more complicated this time.
The solution we want will be of the form
u (x; t) = S (x; t) + U (x; t)
where the steady state part, S (x; t) is given by
S (x; t) = A (t) 1
x
x
+ B (t)
L
L
A (t) and B (t) are found by requiring that S satis…es the boundary conditions.
Requiring that S satis…es the BCs will ensure that the new problem has homogeneous boundary conditions. This is easy to see. From u (x; t) = S (x; t)+U (x; t),
we get that
u (0; t) = S (0; t) + U (0; t)
We know that u (0; t) = g1 (t). If S also satis…es the boundary conditions, then
S (0; t) = g1 (t) and therefore, the above equation becomes
U (0; t) = 0
70CHAPTER 10. TRANSFORMING NONHOMOGENEOUS BCS INTO HOMOGENEOUS ONES
The same is true for the other boundary condition. You will also note that this
form of S (x; t) is similar to the one in the previous example.
The …rst step is to use the BCs to …nd A (t) and B (t). S must satisfy
S (0; t) = T1
Also
S (0; t) = A (t)
Combining both gives A (t) = T1 . To …nd B (t), we use the second boundary
condition for S.
Sx (L; t) + hS (L; t) = T2
We need to compute Sx (L; t).
Sx (x; t) =
A (t) B (t)
+
L
L
Sx (L; t) =
A (t) B (t)
+
L
L
Therefore
So,
T2
=
=
=
Sx (L; t) + hS (L; t)
A (t) B (t)
+
+ hB (t)
L
L
T1 + (1 + hL) B (t)
L
Solving for B (t) gives
LT2
=
B (t)
=
T1 + (1 + hL) B (t)
T1 + LT2
1 + hL
hence
S (x; t) = T1 1
x
T1 + LT2 x
+
L
1 + hL L
Note that is is only a function of x. Therefore
u (x; t) = T1 1
x
T1 + LT2 x
+
+ U (x; t)
L
1 + hL L
The next step is to rewrite the problem shown in equation 10.4 as a problem
where the unknown function is U . For this, we rewrite the PDE, the BCs and
the IC.
10.4. THE NONHOMOGENEOUS TERMS ARE CONSTANTS, MIXED BOUNDARY CONDITIONS71
Rewriting the PDE. For this, we need to compute
x
T1 + LT2 x
+
+ U (x; t)
L
1 + hL L
dt
d T1 1
ut
=
=
Ut
and
T1 + LT2 x
x
+
+ U (x; t)
L
1 + hL L
dx
T1
T1 + LT2
+
+ Ux
L
L (1 + hL)
d T1 1
ux
=
=
so
T1 + LT2
T1
+
+ Ux
L
L (1 + hL)
dx
d
uxx
=
= Uxx
So, the new PDE is
Ut =
2
Uxx
Rewriting the BCs. Since S satis…es the BCs, as noted in the introduction, we will have
U (0; t)
=
0
Ux (L; t) + hU (L; t)
=
0
Rewriting the IC.
(x)
= u (x; 0)
= S (x; 0) + U (x; 0)
So
U (x; 0) =
(x)
It follows that the new problem is
8
PDE
Ut = 2 Uxx
>
>
<
U (0; t) = 0
BC
U
(L;
t) + hU (L; t) = 0
>
x
>
:
IC
U (x; 0) = (x) S (x; 0)
S (x; 0)
0<x<L
0<t<1
0<t<1
0
x
L
This is a problem which can be solved with the separation of variable method.
See the next chapter for an example.
72CHAPTER 10. TRANSFORMING NONHOMOGENEOUS BCS INTO HOMOGENEOUS ONES
10.5
The Nonhomogeneous Terms Are Functions
of t
We now look at another example in which the BCs are functions of t. Consider
the IBVP
8
PDE
ut = 2 uxx
0<x<L 0<t<1
>
>
<
u (0; t) = g1 (t)
BC
0<t<1
(10.5)
ux (L; t) + hu (L; t) = g2 (t)
>
>
:
IC
u (x; 0) = (x)
0 x L
We use a similar idea as before, except that it is more complicated this time.
The solution we want will be of the form
u (x; t) = S (x; t) + U (x; t)
where the steady state part, S (x; t) is given by
S (x; t) = A (t) 1
x
x
+ B (t)
L
L
The unknown functions A (t) and B (t) will be chosen such that S satis…es the
BCs. As before, requiring that S satis…es the BCs will ensure that the new
problem has homogeneous boundary conditions. You will also note that this
form of S (x; t) is similar to the one in the previous example.
The …rst step is to use the BCs to …nd A (t) and B (t). S must satisfy
S (0; t)
= g1 (t)
Sx (L; t) + hS (L; t)
= g2 (t)
Computing Sx gives
Sx (x; t) =
A (t) B (t)
+
L
L
Thus, we get
A (t) = g1 (t)
A (t) B (t)
+
+ hB (t) = g2 (t)
L
L
Since we already have A (t), we can solve for B (t).
B (t)
1 + hL
L
=
It follows that
B (t) =
A (t)
L
Lg2 (t) + g1 (t)
L
= g2 (t) +
g1 (t) + Lg2 (t)
1 + hL
10.5. THE NONHOMOGENEOUS TERMS ARE FUNCTIONS OF T
73
And therefore
g1 (t) + Lg2 (t) x
x
+
+ U (x; t)
L
1 + hL
L
u (x; t) = g1 (t) 1
The next step is to substitute in the original problem and obtain a new
problem in terms of U (x; t). For this, we …rst compute ut and uxx .
g 0 (t) + Lg20 (t) x
x
+ 1
+ Ut (x; t)
L
1 + hL
L
g1 (t) g1 (t) + Lg2 (t)
+
+ Ux
L
(1 + hL) L
ut
= g10 (t) 1
ux
=
uxx
= Uxx
Thus, the new PDE is
g 0 (t) + Lg20 (t) x
x
+ Ut
+ 1
L
1 + hL
L
g10 (t) 1
or
Ut
2
Uxx =
g10 (t) 1
2
Uxx = 0
g10 (t) + Lg20 (t) x
1 + hL
L
x
L
Or, in terms of S
Ut =
2
Uxx
St
Unfortunately, this is no longer homogeneous. We will have to wait a few
chapters before we know how to solve this.
Let us …nd the new BCs and IC for this problem, even though we cannot
yet solve it. Recall that u (x; t) = S (x; t) + U (x; t) where S was derived so it
would solve the BCs.
So, we have
u (0; t)
= S (0; t) + U (0; t)
= g1 (t) + U (0; t)
We also know that
u (0; t) = g1 (t)
Combining both gives
U (0; t) = 0
We also know that
ux (L; t) + hu (L; t)
= Sx (L; t) + hS (L; t) + Ux (L; t) + hU (L; t)
= g2 (t) + Ux (L; t) + hU (L; t)
We also know that
ux (L; t) + hu (L; t) = g2 (t)
Combining both gives
Ux (L; t) + hU (L; t) = 0
74CHAPTER 10. TRANSFORMING NONHOMOGENEOUS BCS INTO HOMOGENEOUS ONES
Finally, for the IC.
u (x; 0) = S (x; 0) + U (x; 0)
We also know that
u (x; 0) =
(x)
Combining both gives
U (x; 0) =
(x)
Thus, the new IBVP is
8
Ut = 2 Uxx St
>
> PDE
<
U (0; t) = 0
BC
U
(L;
t) + hU (L; t) = 0
>
x
>
:
IC
U (x; 0) = (x) S (x; 0)
10.6
S (x; 0)
0<x<L
0<t<1
0<t<1
0
x
L
Conclusion
1. The techniques of this chapter allow us to transform nonhomogeneous
boundary conditions into homogeneous ones. Unfortunately in the process,
we might obtain a PDE which is no longer homogeneous. Such a PDE
will be solved in a few chapters, using eigenfunction expansions.
2. Obtaining homogeneous BCs is only relevant for methods which require
it. If you solve the IBVP using a technique not requiring it, then it is
not necessary to try to obtain homogeneous boundary conditions. We will
study such techniques in a few chapters.
3. The technique used in the second and third examples also works for the
most general nonhomogeneous BCs such as
ux (0; t) + u (0; t) = g1 (t)
ux (L; t) + u (L; t) = g2 (t)
Unfortunately, the resulting PDE will more than likely be nonhomogeneous.
4. For simpler BCs such as
u (0; t) = g1 (t)
u (L; t) = g2 (t)
the method of the second example will give us the transformation
u (x; t) = S (x; t) + U (x; t)
where
x
(g2 (t) g1 (t))
L
You will note that this is very similar to the transformation used in the
…rst example.
S (x; t) = g1 (t) +
10.7. PROBLEMS
75
5. In summary, if the boundary conditions only involve u, then use
u (x; t) = S (x; t) + U (x; t)
where
x
x
+ g2 (t)
L
L
S (x; t) = g1 (t) 1
Where g1 (t) and g2 (t) are given in the boundary conditions. However, if
the boundary conditions involve ux , then
u (x; t) = S (x; t) + U (x; t)
where
x
x
+ B (t)
L
L
S (x; t) = A (t) 1
and A (t) and B (t) are found by requiring that S satisfy the boundary
conditions (as in the second and third examples).
6. If the nonhomogeneous part of the BCs is a constant, then S (x; t) will only
be a function of x which we can write as S (x). Thus, St = 0. Furthermore,
since the highest poser of x in S (x; t) is 1, it follows that Sxx = 0. Thus,
the new PDE will also be homogeneous.
10.7
Problems
1. Verify that the second boundary condition in proposition 57 is also homogeneous.
2. Completely solve the IBVP
8
PDE
ut = 2 uxx
0<x<1 0<t<1
>
>
<
u (0; t) = 0
BC
0<t<1
u (1; t) = 1
>
>
:
IC
u (x; 0) = sin x + x 0 x 1
Sketch the solution for various values of t and
3. Completely solve the IBVP
8
ut = uxx
>
> PDE
<
u (0; t) = 0
BC
u (1; t) = 1
>
>
:
IC
u (x; 0) = x2
What is the steady state solution?
= 1.
0<x<1
0<t<1
0<t<1
0
x
1
76CHAPTER 10. TRANSFORMING NONHOMOGENEOUS BCS INTO HOMOGENEOUS ONES
4. Transform the IBVP below into one with homogeneous BCs. Is the new
problem homogeneous?
8
PDE
ut = uxx
0<x<1 0<t<1
>
>
<
ux (0; t) = 0
BC
0<t<1
ux (1; t) + hu (1; t) = 1
>
>
:
IC
u (x; 0) = sin x
0 x 1