Chapter 7
PDEs and Sturm-Liouville theory 7.1 Introduction In this section, we will consider what a partial differential equation is and at least two ways to obtain solutions. Generally, partial differential equations are more difficult to solve than ordinary differential equations. There are other ways to get solutions, but we will only consider Laplace transforms and separation of variables. To begin, we need to learn a little about partial DEs.
7.2 Partial differential equations An equation involving one or more derivatives of an unknown function of two or more variables is called a Partial Differential Equation. The most general PDE of 1st order in two independent variables is F(x, y, u, ux , uy ) = 0. Here ux and uy denote the partial differentiation of u with respect to x and y. Some PDEs occur repeatedly in different problems and so have special names. 1. ut + cux = 0, advection equation—transport, traffic flow 2. utt = c2 uxx , 1-D wave equation—seismic, water, sound waves. 3. ut = αuxx , 1-D heat/diffusion equation – heat transfer, population or disease spread, modelling turbulence, spread of solute in solvent etc.
60
PDEs and Sturm-Liouville theory
4. uxx + uyy = f (x, y), 2-D Poisson equation. If f (x, y) ≡ 0 it is called Laplace’s equations—steady state temperature distribution, deflection of membranes, electrostatics, gravitation, fluid dynamics. √ 5. ut − iuxx = 0 (i = −1), Schrödinger’s equation—quantum mechanics. 6. ut + uux + uxxx = 0, Korteweg-De Vries equation—non-linear dispersive waves. In general, it is very difficult to solve PDEs. It was hard enough to solve ODEs. There are some ways, but usually for simple geometry, for example rectangles or circles. However, many can now be solved approximately using numerical methods. Consider the 2nd order PDE in two independent variables Auxx + 2Buxy +Cuyy + Dux + Euy + Fu + G = 0, where A, B, C, D, E, F, and G are all functions of x, y and the dependent variable u and its partial derivatives. If G ≡ 0, that is every term contains the dependent variable or one of its derivatives, the PDE is homogeneous, otherwise it is inhomogeneous. If A–G are functions of x and y only, then the equation is linear. If any of D − G are functions of u, ux or uy then the equation is quasilinear, that is linear at least in the highest order terms. Suppose the above equation is linear and let
L {u} = Auxx + 2Buxy +Cuyy + Dux + Euy + Fu. Then L is called a linear partial differential operator since it has the properties L {u + v} = L {u} + L {v} and L {ku} = kL {u} for any constant k. The homogenous equation can be written L {u} = 0 and it is easy to see from the properties above that if u1 and u2 are solutions then c1 u1 + c2 u2 is also a solution. Example 33 Show that the equation utt − uxx + εu2 = 0 is linear if ε = 0, and not linear otherwise. Consider u + v, ∂2 u ∂2 u ∂2 v ∂2 v ∂2 (u + v) ∂2 (u + v) 2 − +ε(u+v) = − + − +ε(u2 +2uv+v2 ) ∂t 2 ∂x2 ∂t 2 ∂x2 ∂t 2 ∂x2 so that
L {u + v} = L {u} + L {v} + ε2uv, and so the equation is linear provided ε = 0.
Solutions
61
The method which is used to solve a 2nd order PDE is often dependent upon what type of PDE it is. Second order, linear PDEs such as that above are classified as follows • If B2 − AC = 0, then the equation is said to be parabolic. • If B2 − AC > 0, it is hyperbolic. • If B2 − AC < 0, it is elliptic. Notice that in this classification the wave equation is hyperbolic (A = 1, B = 0, C = −1, so B2 − AC = 1 > 0), the heat/diffusion equation is parabolic (A = α, B = 0, C = 0, so B2 − AC = 0) and Laplace’s equation is elliptic (A = 1, B = 0, C = 1, so B2 − AC = −1 < 0). In fact, these equations are often held up as basic examples of equations of each class. Physically, a hyperbolic equation has solutions that include waves (usually with time dependence), parabolic equations are diffusive (and normally there is a ‘time arrow’, that is it is obvious in which direction time is increasing) and for elliptic equations information about boundary conditions is felt instantly throughout the entire domain (‘infinite’ wave speed). These equations turn out to be canonical in the sense that any linear, 2nd order PDE of each type can be transformed into the corresponding form. These equations all have constant coefficients but that is not necessary, and there are many situations in which the nature of the equation can change in different regions of space, that is they may be elliptic in one region and parabolic in others. Example 34 An example of these changes occurs in the Tricomi equation, uxx + xuyy = 0. The equation describes the transonic (near the speed of sound) flow of air over an aircraft. (This equation is derived using perturbation methods.) Note that if x > 0 then this equation is elliptic and if x < 0 it is hyperbolic reflecting different behaviour when the air is travelling faster or slower than the speed of sound. (It is parabolic if x = 0.) If a PDE has derivatives with respect to only one independent variable, then it can be solved as if it were an ordinary DE, but one must always keep in mind that the constants in the solution to an ODE must now be functions of the other independent variables. Example 35 Solve uxy = 0. Integrating with respect to x, uy = F(y), and then with respect to y, gives u(x, y) = f (y) + g(x). You can check that this is the solution by substituting back into the equation.
62
PDEs and Sturm-Liouville theory
It can be shown that with new variables s and t defined by y = s− ct and x = s + ct, the equation uxy = 0 is equivalent to utt = c2 uss , that is the wave equation. Therefore the solution u(x, y) = f (y) + g(x) of uxy = 0 yields the solution u(s,t) = f (s − ct) + g(s + ct) of the wave equation. This solution is called D’Alembert’s solution. Example 36 The PDE uxx − u = 0 has the solution u = f (y)ex + g(y)e−x . Check by differentiating. The previous examples show that the solution to a PDE will in general have arbitrary functions in it, rather than constants (as for ODE). The values of these functions are determined by the boundary and initial conditions. Unlike ODEs, a linear PDE may have many independent solutions. A unique solution is determined by the initial and boundary conditions.
7.3 Solution using Laplace transforms One way to solve a PDE is to use Laplace transforms. They will not always work, but if the equation is linear and has constant coefficients and has one semi-infinite independent variable (such as t > 0) it is possible. By taking the Laplace transform (like for ODEs before) with respect to one variable, a PDE is two variables becomes an ODE containing only derivatives with respect to the other variable. The ODE can be solved and then the answer inverted back to obtain the solution to the original problem. One has to be careful because now you need to remember that you are carrying two independent variables, even after the transform. If you take the transform of some function u(x,t) with respect to t for example, the transformed function will still depend on x, that is L {u(x,t)} = U(x, s). This means that derivatives with respect to t are transformed as before, but derivatives with respect to x must remain. The best way to see how this works is with an example. Example 37 Consider the first-order PDE ∂u ∂u + = 0, ∂t ∂x with u(x, 0) = 0, x ≥ 0, and u(0,t) = t,t ≥ 0. Solve this problem by taking the Laplace transform in t, computing the solution, and then inverting. Taking the Laplace transform with respect to t, we get sU(x, s) − u(x, 0) +
dU = 0, dx
Solutions
63
with U(0, s) = L {t} = 1/s2 . Note that since we have taken a transform with respect to t, the transformed dependent variable is still a function of x, and of the transformed independent variable s. Note also that we have transformed the boundary condition at x = 0, since this is still a function of t and hence we can transform it directly. We can now treat this as an ODE for U as a function of x, with s as a parameter. It is for that reason that the derivative with respect to x remains in the equation. Solving the equation (separable) gives −sdx =
dU ⇒ −sx + A(s) = lnU ⇒ U(x, s) = B(s)e−sx U
and using the condition for x = 0 we obtain U(x, s) = e−sx /s2 . To obtain the solution, it remains to invert the transform, usually done from tables (but can be done using contour integration if you know some complex variable theory). To invert we treat x as a parameter, so that u(x,t) = L −1 {e−sx /s2 } = H(t − x)(t − x), using the appropriate shifting theorem, and H(t) is the Heaviside step function. This represents a travelling solution as we would expect for an advection (transport) equation. You should graph the solution for t = 0, 1 and 2 to see how it behaves.
Example 38 Consider a viscous fluid in a region unbounded above, and bounded below by an infinite, horizontal plate. The equation which describes the flow starting from rest is the diffusion equation (if we neglect g (gravity), and assume unidirectional, horizontal flow), ut = νuyy , where ν = µ/ρ is the kinematic viscosity (viscosity/density), with u(y, 0) = 0, u(0,t) = V and we also note that u(y,t) → 0 as y → ∞. Find the response of the fluid using Laplace transforms. Taking Laplace transforms with respect to time, we get s sU(y, s) − u(y, 0) = νUyy (y, s) ⇒ Uyy − U = 0 ν s s y + B(s) exp − y , ⇒ U(y, s) = A(s) exp ν ν and we also have V s
L {u(0, s)} = U(0, s) = L {V } = .
64
PDEs and Sturm-Liouville theory
Since u → 0 as y → ∞, A(s) = 0, and therefore V s U(y, s) = exp − y . s ν We can invert this using tables to give y u(y,t) = V erfc √ 2 νt ∞ 2 −u2 du, =√ V √ e π y/2 νt where erfc(.) is called the complementary error function. The solution at a particular time is sketched in figure 7.1.
y
V Figure 7.1: Sketch of velocity profile at a particular time showing the complementary error function profile. Exercise 21 Consider the first-order PDE ∂u ∂u + x = 0, ∂x ∂t with u(x, 0) = 0 and u(0,t) = cost, t ≥ 0. Try solving this problem by taking the Laplace transform in t, computing the solution, and then inverting. Exercise 22 Take Laplace transforms of the PDE and conditions ∂2 u ∂u = α 2 +C, ∂t ∂x with u(x, 0) = 0 and u(0,t) = e−t , ux (1,t) = 0, t ≥ 0, and find the solution in the s-plane U(x, s). Here, C is a constant. Note: In practice you could then invert the transform using tables, or probably better still using some integration in the complex plane.
Solutions
65
7.4 Two-point boundary value problems Many important problems involving partial differential equations include some boundary conditions on the boundary of the region of interest. For example, for a heat conduction problem in a cube, we might have the boundary conditions that the temperature on the top face is 20◦ C, while the temperature on all the other faces is 0◦ C. As we will see, the method of separation of variables applied to such problems leads to a two-point boundary value problem for an ODE, i.e. the ODE together with boundary conditions at the two endpoints of an interval. Section 10.1 deals with the basic properties of such problems. Make sure you understand the definition of an eigenvalue problem and work through the example on pages 544 to 546. This is a very important eigenvalue problem which arises in solving many problems involving PDEs. Do problems 1, 3, 5, 11 and 13 on page 547.
7.5 Fourier series As we will see, in the last step of the separation of variables solution procedure, we need to be able to express a given function as a finite or infinite series of eigenfunctions. Section 10.2 discusses how you go about actually doing this for the important case in which the series consists of sine and cosine terms, called a Fourier series. Read this section carefully, paying particular attention to the definition of orthogonality and how it can be used to obtain the series coefficients. Do questions 18 and 19 at the end of section 10.2. Section 10.3 discusses some aspects of the convergence of Fourier series. Read this section and do questions 1 and 2 at the end of the section. Odd and even functions can be written in a slightly simpler form, that is odd functions end up only containing sine terms, and even functions end up only containing cosine terms. Section 10.4 describes why this should be so. Read this section concentrating on what odd and even functions are and how knowing this simplifies the process of obtaining a Fourier series. Do questions 1, 6, 13 and 15 on pages 562 and 563. Important fact about obtaining a series representation of a function using orthogonal functions: There is one very important issue in this whole section, and that is the issue of using orthogonality to compute the series coefficients. It is covered in the book, but it is summarised here to emphasise its importance. Follow it through very carefully. We know that the functions sin nπx L , n ≥ 1, are orthogonal on [0, L], that
66
PDEs and Sturm-Liouville theory
is
L
mπx nπx sin dx = 0 if m = n, L L 0 and any sufficiently smooth function f (x) has the convergent series representation ∞ nπx f (x) = ∑ bn sin L n=1 sin
where bn are the Fourier sine coefficients. Now, let us consider the more general case. Suppose we know that the set of functions φ1 (x), φ2 (x), . . . are orthogonal with respect to a weight function r(x) on an interval [a, b], that is b a
r(x)φi (x)φ j (x)dx = 0
i = j.
if
In the Fourier series case, r(x) = 1. Also, suppose that a sufficiently smooth function g(x) has a convergent series representation g(x) =
∞
∑
a j φ j (x).
j=1
How can we find the coefficients a j ? This is done as follows. 1. Multiply both sides of the equation by r(x)φm (x) and integrate from a to b. (You might like to think this through by supposing that m is a particular number, say m = 3.) ⇒
b a
g(x)r(x)φm (x)dx =
b ∞
∑
a j=1
a j φ j (x)φm (x)dx.
2. Swap the order of the integral and the sum (this is OK because of the linearity of the functions and operations involved) ⇒
b a
g(x)r(x)φm (x)dx =
b
∞
∑
aj
j=1
a
r(x)φ j (x)φm (x)dx.
3. This step is extremely important, and slightly difficult to understand at first - you will probably need to think about it very carefully. In principle, we can evaluate the integral on the LHS, since we know g(x), r(x) and φm (x). On the right hand side, the integral is zero unless j and m are the same number, so this means that all terms on this side are zero unless j and m are the same number. Therefore the only
term left in the whole sum is am ab r(x)(φm (x))2 dx, which we can also evaluate, so that, b a
g(x)r(x)φm (x)dx = am
b a
r(x)(φm (x))2 dx.
Solutions
67
4. Rearranging,
b
am = ab a
g(x)r(x)φm (x)dx r(x)(φm (x))2 dx
, m = 1, 2, 3 . . .
If you understand this key idea, this whole section will seem much less complicated.
7.6 Separation of variables Separation of variables is an important method of solving problems involving PDEs on regions that have a simple shape, in particular rectangular, circular or cylindrical regions. It relies on the assumption that the PDE has product solutions, for example solutions u(x,t) which can be written as the product of two functions, one a function of x only, the other a function of t only, that is u(x,t) = X(x)T (t). This will not always be possible, but there are many common equations in which it is. Read section 10.5 in Boyce and DiPrima. Recall that we did a derivation of the heat equation in the section on Gauss’ theorem. Notice that when separation of variables is used on an equation for a function with two independent variables you end up with two ordinary differential equations, both of which depend on a parameter (the separation constant). Work carefully through how these two equations come about, that is, why does it separate! Notice also that all of the examples given end up with a series of eigenfunctions, the coefficients of which need to be chosen to satisfy a final boundary condition. Do questions 1, 3, 7, 8, 10, 11, 15, 16, 19, 20 and 22 at the end of section 10.5.
7.7 Sturm-Liouville problems The text now goes on to cover more practical problems of heat conduction and wave transmission. However, this may make more sense if the section 11.2 on Sturm-Liouville problems is covered next. These problems arise when we use separation of variables on a PDE. Usually, when we use this process one of the two ordinary differential equations (boundary-value problems) which arise will be of this type. If that is the case, then they have a lot of very useful properties which make the remainder of the problem much easier. For example, the solutions to a Sturm-Liouville problem are always a set of orthogonal functions, so it is possible to write the series coefficients of the final series much more easily! Thus this section is really background material to enable you to better understand what you are doing when you use separation of variables.
68
PDEs and Sturm-Liouville theory
Eigenvalues and eigenfunctions are central in this work. Read section 11.1 and do questions 1, 3, 7, 12, 13, 16 and 17 at the end of the section. Section 11.2 gives some theorems which are central to the ideas in this section. Read this section, and in particular note theorem 11.2.2 and work carefully through the proof. This theorem shows the orthogonality of the eigenfunctions, and is therefore a very important result in this work. Do questions 1, 2, 3 and 6 at the end of the section. The section on nonhomogeneous equations does not add a great deal to the ideas covered in this unit, so we shall not pursue this further.
7.8 More partial differential equations Now that you have a greater understanding of orthogonality and how it fits into both Fourier series and separation of variables, we will continue to examine some examples of different problems arising in real situations. Note the pattern in the examples that follow in the text. In all cases the procedure is almost the same. Separation and application of the boundary conditions leads to a set of eigenfunctions in one direction or the other, which are then used (usually in the final step) to satisfy one remaining condition. The series coefficients are computed using orthogonality in each case. Note also the sketches that are drawn for each example. These are extremely useful in determining what is going on. In particular, they make it clear in which direction are the homogeneous boundary conditions, and consequently set up which of the separated equations lead to the Sturm-Liouville problem. Keep these ideas in mind as you work through sections 10.6, 10.7 and 10.8. In each example problem note why the eigenfunctions come out as they do, and how the choices of sign were made in each case for the separation constant. Do problems 1, 3, 4, 12, 14 and 15 from section 10.6. Do problems 1 and 3 from section 10.7. Do problems 1, 10, 4 and 5 from section 10.8.
Solutions
69
Solutions for Chapter 7 Exercise 21 2
2
u(x,t) = cos(t − x2 )H(t − x2 ) Exercise 22
C s s x) + B(s) exp(− x) + 2 U(x, s) = A(s) exp( α α s
where
−1 1 C exp(− s/α) − A(s) = exp( s/α) + exp(− s/α) s + 1 s2
and
−1 C 1 − exp( s/α) B(s) = exp( s/α) + exp(− s/α) s + 1 s2
70
PDEs and Sturm-Liouville theory