39Char.mws

Partial Differential Equations PowerTool

by Dr. Jim Herod

Section 9.2: Characteristics for First Order Partial Differential Equations

Maple Packages for Section 9.2

>    restart;

>    with(plots):

Warning, the name changecoords has been redefined

>    with(PDEtools):

>   

In this Section 9.2, we try to understand some of the underlying geometric structure for solutions of a first order partial differential equation which has the form

          p(t, x) u[t] (t,x) + q(t, x) u[x] (t,x) + r(t, x) u(t, x) = 0.

To try to get an understanding of this geometric structure, we suggest three ordinary differential equations. We use functions T, X and Z as the unknown functions in the three ordinary differential equations. We use [ t , x ] to designate an arbitrary point in the upper half plane: t  will tell how far the point is located up the time axes and x  will give the x - coordinate of the point. Having those letters reserved compels us to choose a different variable for the independent variable in the definition of  T, X, and Z. We choose s.

Here, then, are the three differential equations:

                      diff(T,s) (s) = p( T (s), X(s)), with T(0) = 0,

                       diff(X,s) (s) = q( T (s), X(s)), with X(0) = eta ,

and

                       diff(Z,s) (s) = v(s) Z(s)

where v(s) will be defined below. We ask the following for functions p and q:

Requirements for p and q:

(a) p(t, x ) > 0 for all t > 0 and all x ,

(b) solutions for the first two ordinary differential equations exist for all s > 0, and

(c) if T(s) and X(s) are solutions for the first two equations and if [t, x ] is a point in the plane with t > 0, then the equations

                          T(s) = t and X(s) = x

can be solved for   s and eta . In some sense, this last condition tells how long it takes and where to start on the x axes in order to arrive at [t, x ] along the parametric curve [T(s), X(s)].

The effect of requirement (a) is that T(s) will be increasing and the effect of requirement (c) is that if you pick a point

           [t, x ]

in the upper half plane, then some trajectory determined by

                           [T(s), X(s)]

will intersect that point. Furthermore, it can be determined from what point eta  on the x axes that trajectory began and for what   time s  it arrived at [t, x ].

 

Geometrically, this locates a point eta  on the x axes so that a point following along the trajectory given parametrically by the functions T(s) and X(s) and beginning at eta  arrives at [t, x ] in time s. This parametric trajectory, [T(s), X(s)] is a characteristic curve  for the partial differential equation.

Let's draw some characteristic curves that arise with the simple pde.

             1 diff(u,t)  + 2 diff(u,x)  + 3 u (t, x) = 0, with initial condition u(0, x) = exp( -x^2  ).

The ordinary differential equations associated with the characteristics for this pde are

 

              dT/ds = 1, T(0) = 0 and

              dX/ds = 2, X(0) = eta .

These have easy solutions: T(s) = s and X(s) = 2 s + eta .

We draw some of these.

>    for n from -6 to 3 do
   J[n]:=spacecurve([2*s+n,s,0],s=0..3,axes=normal,
          orientation=[-70,70],view=[-7..7,0..3,0..1]):
end do:

>    display3d([seq(J[n],n=-6..3)]);

[Maple Plot]

>   

Making connections back with the previous Section 9.1, we would have predicted that solutions "moved" to the northeast in this pde, and the characteristics confirm that idea.

We derive the solution surface by thinking of the smooth surface u(T(s), X(s)) above the characteristics. Here is a way to describe the evolution of the surface. Choose r(t, x) from the partial differential equation and solve the differential equation

                              diff(Z,s) (s) = v(s) Z(s)

where

                     v(s) = r( T(s), X(s) ).

Then, define u implicitly

                   u(T(s), X(s) ) = Z(s), or one might say u(T, X) = Z(s).

It follows that

                  p(T, X) u[t]  + q(T, X) u[x]  + r(T, X) u  = T ' (t) u[t]  + X ' (t) u[x]  + r(T, X) u =

                           diff(` `,t) u(T(t),X(t)) + r(T(t), X(t)) u(T(t), X(t)) = diff(Z,t)  + v(t) Z(t) = 0.

Because Z(0) = u( T(0), X(0) ) = u(0, eta ), we know how the initial condition for Z should be made:

                   Z(0) = u(0, eta ).

SUMMARY

We have a recipe for providing a solution for the partial differential equation.

(1) Solve for the characteristics T(s) and X(s) with initial conditions.

(2) Define v(s) by    v(s) = r(T(s), X(s) ).

(3) Solve the differential equation for Z with Z(0) = u(0, eta ).

(4) Solve the equations T( s ) = t, X( s ) = x  for s and eta  creating s (t,x) and eta (t,x).

(5) Compose  u(T, X) = U(T(s), X(s)) = Z(s).

To help make this clear, we work several examples.

Example 1

The characteristics for 1 diff(u,t)  + 2 diff(u,x)  + 3 u (t, x) = 0,

are T(s) = s,   X(s) = 2 s + eta .

The differential equation determining u along the characteristics is

               diff(Z,s)  + 3 Z = 0, with Z(0) = exp(- eta^2 ),

which has solution  exp(-3 s) exp(- eta^2 ).

We invert the relationship  s = t and 2 s + eta  = x  to get that t = s and eta = x  - 2 t.

Using the solution for the z equation, we have that

        u(t, x) = u(T(s), X(s) ) = Z(s) = exp(- 3 s) exp( - eta^2 ) = exp(-3 t) exp( - (x-2*t)^2 )

We check this solution.

>    u:=(t,x)->exp(-3*t)*exp(-(x-2*t)^2);

u := proc (t, x) options operator, arrow; exp(-3*t)*exp(-(x-2*t)^2) end proc

First, we see that it really is a solution for the partial differential equation.

>    simplify(diff(u(t,x),t)+2*diff(u(t,x),x)+3*u(t,x));

0

Then, we draw a graph using the format we always have.

>    plot3d(u(t,x),x=-3..3,t=0..2,axes=normal,orientation=[-45,65]);

[Maple Plot]

It is of interest to see that Maple can do all of graphing. Start again.

>    u:='u';

u := 'u'

Define the PDE.

>    pde:=diff(u(t,x),t)+2*diff(u(t,x),x)+3*u(t,x)=0;

pde := diff(u(t,x),t)+2*diff(u(t,x),x)+3*u(t,x) = 0

Give the initial conditions.

>    init:=[0,x,exp(-x^2)];

init := [0, x, exp(-x^2)]

Make the graph of the characteristics..

>    PDEplot(pde,u(t,x),init,x=-3..3,axes=normal,scene=[x,t,u],t=0..2,orientation=[-65,65],basechar=only);

[Maple Plot]

Make a graph of the solution.

>    PDEplot(pde,u(t,x),init,x=-3..3,axes=normal,scene=[x,t,u],
   t=0..2,orientation=[-65,65]);

[Maple Plot]

Show both the graph of the solution and the characteristics.

>    PDEplot(pde,u(t,x),init,x=-3..3,axes=normal,scene=[x,t,u],
   t=0..2,orientation=[-65,65],basechar=true,style=wireframe);

[Maple Plot]

>   

Finally, in the previous Section 9.1, we used Maple to provide an analytic solution to this partial differential equation with little assistance required from the user. Those ideas could be reviewed.

Example 2

We explain how humans might get the analytic solution to Example 2 from the previous Section 9.1. Already there, we saw that Maple could make the solution. To emphasize that these problems have a pattern, we almost repeat the entire scheme from Example 1.

The characteristics for 1 diff(u,t)  + x diff(u,x)  + t u (t, x) = 0,

are T(s) = s,   X(s) =   eta  exp(s).

The differential equation determining u along the characteristics is

               diff(Z,s)  + s Z = 0, with Z(0) = cos( eta ).

This has solution  exp( -s^2/2  ) cos( eta ).

We invert the relationship  s = t and exp(s) eta  = x  to get that t = s and eta = x*exp(-t) .

Using the solution for the z equation, we have that

        u(t, x) = u(T(s), X(s) ) = Z(s) = exp( -s^2/2 ) cos( eta ) = exp( -t^2/2 ) cos( x*exp(-t)  ).

We check this solution.

>    u:=(t,x)->exp(-t^2/2)*cos(x*exp(-t));

u := proc (t, x) options operator, arrow; exp(-1/2*t^2)*cos(x*exp(-t)) end proc

First, we see that it really is a solution for the partial differential equation.

>    simplify(diff(u(t,x),t)+x*diff(u(t,x),x)+t*u(t,x));

0

Then, we draw a graph using the format we always have.

>    plot3d(u(t,x),x=-3..3,t=0..2,axes=normal,orientation=[-45,65]);

[Maple Plot]

It is of interest to see that Maple can do all of graphing. Start again.

>    u:='u';

u := 'u'

Define the PDE.

>    pde:=diff(u(t,x),t)+x*diff(u(t,x),x)+t*u(t,x)=0;

pde := diff(u(t,x),t)+x*diff(u(t,x),x)+t*u(t,x) = 0

Give the initial conditions.

>    init:=[0,x,cos(x)];

init := [0, x, cos(x)]

Make the graph of the characteristics..

>    PDEplot(pde,u(t,x),init,x=-3..3,axes=normal,scene=[x,t,u],t=0..2,orientation=[-65,65],basechar=only);

[Maple Plot]

Make a graph of the solution.

>    PDEplot(pde,u(t,x),init,x=-3..3,axes=normal,scene=[x,t,u],
   t=0..2,orientation=[-65,65]);

[Maple Plot]

Show both the graph of the solution and the characteristics. Rotate the graph around a little to distinguish between the characteristics and the graph of the solution.

>    PDEplot(pde,u(t,x),init,x=-3..3,axes=normal,scene=[x,t,u],
   t=0..2,orientation=[-65,65],basechar=true,style=wireframe);

[Maple Plot]

>   

Finally, in the previous Section 9.1, we used Maple to provide an analytic to this partial differential equation with little assistance required from the user.

Example 3

We will not step through the way humans solve the first order PDE in this example. We let Maple do all the work. The importance of this example is to get a glimpse of what happens when characteristics coalesce. Here is the example. We start with a generic u.

>    u:='u':

>    pde:=diff(u(t,x),t)-x*diff(u(t,x),x)+0*u(t,x)=0;

We give the initial conditions.

pde := diff(u(t,x),t)-x*diff(u(t,x),x) = 0

>    init:=[0,x,exp(-(x-3)^2)+exp(-(x+3)^2)];

init := [0, x, exp(-(x-3)^2)+exp(-(x+3)^2)]

Maple will make the graph of the characteristics..

>    PDEplot(pde,u(t,x),init,x=-5..5,axes=normal,scene=[x,t,u],t=0..2,orientation=[-65,65],basechar=only);

[Maple Plot]

Here is a graph of the solution.

>    PDEplot(pde,u(t,x),init,x=-5..5,axes=normal,scene=[x,t,u],
   t=0..2,orientation=[-65,65]);

[Maple Plot]

Next we show both the graph of the solution and the characteristics. Rotate the graph around a little to distinguish between the characteristics and the graph of the solution.

>    PDEplot(pde,u(t,x),init,x=-5..5,axes=normal,scene=[x,t,u],
   t=0..2,orientation=[-65,65],basechar=true,style=wireframe);

[Maple Plot]

>   

Now, we recall that, with just a little help, Maple can solve this pde analytically.Recall Section 9.1 from which the following syntax comes.

>    sol3:=pdsolve(pde);

sol3 := u(t,x) = _F1(x*exp(t))

>    u3:=unapply(rhs(sol3),(t,x));

u3 := proc (t, x) options operator, arrow; _F1(x*exp(t)) end proc

>    u3(0,x)=exp(-(x-3)^2)+exp(-(x+3)^2);

_F1(x) = exp(-(x-3)^2)+exp(-(x+3)^2)

>    u3s:=unapply(subs(_F1(x*exp(t))=
    exp(-(x*exp(t)-3)^2)+exp(-(x*exp(t)+3)^2),
         u3(t,x)),(t,x));

u3s := proc (t, x) options operator, arrow; exp(-(x*exp(t)-3)^2)+exp(-(x*exp(t)+3)^2) end proc

>    simplify(diff(u3s(t,x),t)-x*diff(u3s(t,x),x)+0*u3s(t,x));
u3s(0,x);

0

exp(-(x-3)^2)+exp(-(x+3)^2)

Finally, we plot our analytic solution. It will make you happy to have the above PDEplot, even though the number of points on the plot of the analytic solution is stepped up to 1600 = 40^2 .

>    plot3d(u3s(t,x),x=-5..5,t=0..2,axes=NORMAL,
        orientation=[-55,65],numpoints=1600);

[Maple Plot]

>   

>   

We have just begun to introduce the notions from first order partial differential equations. With this introduction, the interested reader will be able to make other experiments.

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