16bdry.mws

Partial Differential Equations PowerTool

by Dr. Jim Herod

Section 4.3: Insulated Boundary Conditions

Maple Packages for Section 4.3

>    restart;

>    with(PDEtools):

>   

In this worksheet, we begin an examination of the heat equation with a variety of boundary conditions.

The First Problem

For the purposes of this discussion, we write the equation to be considered in three parts:

The PDE:           diff(u,t) = diff(u,`$`(x,2))  ,

The Boundary Conditions:    diff(u,x)  (t, 0) = 0 and diff(u,x)  (t,1) = 0.

The Initial Condition:      u (0, x ) = f ( x ).

Solution for the First Problem

     We have discussed a physical interpretation for the PDE   and for the initial condition . Here is an idea to give intuition for the boundary conditions in this problem. Having the derivative with respect to x  to be zero at these two ends suggests that there is no movement of heat across the boundary x  = 0 or x  = 1.

     From this, what do we expect for solutions of this problem? Since the problem acts as though there is no radial transfer of heat and no end point transfer of heat, we expect the entire system to retain the total heat, and to move to an equal distribution of heat throughout the rod. We will solve the equation with a particular f  and sketch the graph of the solution. We expect to see that the solution has limit a solution that is constant in t  and in x . Also, because the total heat in the system should remain constant, it should be that

                int(f(x),x = 0 .. 1)  = int(u(t,x),x = 0 .. 1)  , for all t > 0.

Here goes making a solution.

First, we find two ODE's, with boundary conditions, which arise from separation of variables.

The PDE leads to

   

          X T ' = X '' T,

or

          T ' / T = X '' / X.

Since the left side is independent of x , the right side must be constant. In a similar manner, the left side is constant and these constants are the same. Thus,

          X '' = mu  X, with X'(0) = 0 and X '(1) = 0,

and

          T ' = mu  T.

Using methods we have seen earlier, this constant must be negative and have the form

           mu = -n^2*Pi^2   with X ` `[n] ( x ) = cos(n*Pi*x)  , for each non-negative integer n .

Also, T ` `[n]  ( t ) = exp( -n^2*Pi^2*t ).

Thus, the general solution for the problem is

          u(t ,x) = c[0]  + sum(c[n]*exp(-n^2*Pi^2*t)*cos(n*Pi*x),n = 1 .. infinity)  .

To find a particular solution, we need to specify f . We do that now. Using this f , we write a solution and check that the answer is right, and seems right!

>    f:=x->x*(x-1)+1;

f := proc (x) options operator, arrow; x*(x-1)+1 end proc

Because this f   is u (0, x ), then

           f ( x ) =   c[0]  + sum(c[n]*cos(n*Pi*x),n = 1 .. infinity)  .

The computation of the c  's is a job for Fourier Series.

>    for n from 0 to 10 do
     c[n]:=int(f(x)*cos(n*Pi*x),x=0..1)/
             int(cos(n*Pi*x)^2,x=0..1);
od;
n:='n':

c[0] := 5/6

c[1] := 0

c[2] := 1/(Pi^2)

c[3] := 0

c[4] := 1/(4*Pi^2)

c[5] := 0

c[6] := 1/(9*Pi^2)

c[7] := 0

c[8] := 1/(16*Pi^2)

c[9] := 0

c[10] := 1/(25*Pi^2)

To see how good our fit is, we plot f  and the Fourier Approximation.

>    plot([f(x),c[0]+sum(c[n]*cos(n*Pi*x),n=1..10)],x=0..1);

[Maple Plot]

>   

Now we make the u ( t , x ).

>    u:=(t,x)-> c[0]+sum(c[n]*exp(-n^2*Pi^2*t)*cos(n*Pi*x),n=1..10);

u := proc (t, x) options operator, arrow; c[0]+sum(c[n]*exp(-n^2*Pi^2*t)*cos(n*Pi*x),n = 1 .. 10) end proc

Check the solution

>    diff(u(t,x),t)-diff(u(t,x),x,x);

0

>    D[2](u)(t,0); D[2](u)(t,1);

0

0

>    plot([f(x),u(0,x)],x=0..1);

[Maple Plot]

>   

Graph the solution

>    plot3d(u(t,x),x=0..1,t=0..1/20,axes=NORMAL,orientation=[45,55]);

[Maple Plot]

Does this graph have the properties we predicted? What was the promise: that the total heat would stay about the same? Let's check that.

>    int(f(x),x=0..1);
int(u(t,x),x=0..1);

5/6

5/6

>   

This completes a solution of this first problem.

We do a second problem.

The same PDE:           diff(u,t) = diff(u,`$`(x,2))  ,

The Changed Boundary Conditions:    u  (t, 0) = A and diff(u,x)  (t,1) = 0.

The Initial Condition:      u (0, x ) = f ( x ).

Solution for the Second Problem

An interpretation for this problem is that there is no heat loss laterally, that the left end is held constant at temperature A, and that the right end is insulated.

 

We should recognize that this problem does not have zero boundary conditions and so we should break the problem into two: one problem gives a particular solution and the other provides a general solution for the homogeneous equation.

Take v ( x ) = A. This solutions satisfies the PDE, and the boundary conditions, but not the initial conditions, of course. The function v ( x ) = A is the steady state solution.

Now look for w to satisfy

The same PDE:           diff(w,t) = diff(w,`$`(x,2))  ,

The Homogeneous Boundary Conditions:    w  (t, 0) = 0 and diff(w,x)  (t,1) = 0.

Finding this w, we will add w and v and then choose coefficients to satisfy the initial conditions.

By now, we see that this homogeneous problem leads to two ODE 's, one having boundary conditions:

          X '' = mu  X, with X(0) = 0 and X '(1) = 0,

and

          T ' = mu  T.

Be reminded that in Section 3.3, we listed this differential equation and boundary conditions among the mixed boundary conditions . We derive the results listed there.

It is no surprise that we should take mu = -lambda^2 .  The solution for the X '' = -lambda^2  X is

           alpha  cos( lambda  x) + beta  sin( lambda  x).

The requirement that X(0) = 0 implies that alpha  = 0. The requirement that X '(1) = 0 implies that

           beta*lambda  cos( lambda ) = 0.

To have a solution that is not zero for all x , it must be true that cos( lambda ) = 0. This happens if lambda  is an odd multiple of pi/2 . That is,

                lambda[n] = (2*n-1)*Pi/2  , n = 1, 2, 3, ... .

Thus, these are the eigenvalues for this homogeneous problem corresponding to eigenfunctions sin( lambda[n]  x). It is clear that the corresponding solution for the T equation is exp(- lambda[n]^2  t) .

We can now write the general solution for the original problem:

          w (t, x) + v (x) = sum(c[n]*exp(-(2*n-1)^2*Pi^2*t/4)*sin((2*n-1)*Pi*x/2),n)   +  A.

To determine the c 's, let t = 0, and use the Fourier idea.

To be specific, we choose a particular f and A.

 

>    A:=1;
f:=x->cos(Pi/2*x);

A := 1

f := proc (x) options operator, arrow; cos(1/2*Pi*x) end proc

>    n:='n':
for n from 1 to 5 do
     c[n]:=int((f(x)-A)*sin((2*n-1)*Pi/2*x),x=0..1)/
              int(sin((2*n-1)*Pi/2*x)^2,x=0..1);
od;
n:='n';

c[1] := -2/Pi

c[2] := 2/3/Pi

c[3] := -2/15/Pi

c[4] := 2/21/Pi

c[5] := -2/45/Pi

n := 'n'

>    plot([f(x)-A,sum(c[n]*sin((2*n-1)*Pi/2*x),n=1..5)],x=0..1);

[Maple Plot]

>   

In passing, note the nature of convergence.

     We now define u .

>    u:=(t,x)->A+sum(c[n]*exp(-(2*n-1)^2*Pi^2*t/4)*sin((2*n-1)*Pi/2*x),n=1..5);

u := proc (t, x) options operator, arrow; A+sum(c[n]*exp(-1/4*(2*n-1)^2*Pi^2*t)*sin(1/2*(2*n-1)*Pi*x),n = 1 .. 5) end proc

Check the solution

>    diff(u(t,x),t)-diff(u(t,x),x,x);

0

>    u(t,0); D[2](u)(t,1);

1

0

>    plot([f(x),u(0,x)],x=0..1);

[Maple Plot]

>   

Graph the solution

>    plot3d(u(t,x),x=0..1,t=0..1,axes=NORMAL,orientation=[-30,60]);

[Maple Plot]

Does this graph have the properties we predicted? It should start off having a graph similar to the graph of the initial value and should move toward the steady state of being constant 1.

>   

This completes the solution for the second problem.

In this Section, we have solved the simple heat equation twice, once with Neumann boundary conditions, or insulated boundary conditions, and once with mixed boundary conditions.

Unassisted Maple

We check to see what Maple 8 can do with this equation unassisted. As usual, we have called in the PDE(tools) at the start of this Section. The partial differential equation has not changed from that of Section 4.1.

>    u:='u';

u := 'u'

>    PDE:=diff(u(t,x),t)-diff(u(t,x),x,x)=0;

PDE := diff(u(t,x),t)-diff(u(t,x),`$`(x,2)) = 0

By now, we are familiar with the suggestion that Maples makes for the form for a solutions: products of two functions just as we used above.

>    ans := pdsolve(PDE);

ans := `&where`(u(t,x) = _F1(t)*_F2(x),[{diff(_F1(t),t) = _c[1]*_F1(t), diff(_F2(x),`$`(x,2)) = _c[1]*_F2(x)}])

>   

It may be that the reader becomes impatient to see the other techniques that Maple uses. Those techniques will use information about the boundary conditions. See Section 8.2.

EMAIL: herod@math.gatech.edu   or   jherod@tds.net

URL: http://www.math.gatech.edu/~herod

Copyright ©  2003  by James V. Herod

All rights reserved