Partial Differential Equations



Comments



Description

MAT-51316Partial Differential Equations Robert Pich´ e Tampere University of Technology 2010 Contents 1 PDE Generalities, Transport Equation, Method of Characteristics 1 1.1 PDE Generalities . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Transport Equation . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Method of Characteristics . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Example: u t + 2u x = 0 . . . . . . . . . . . . . . . . . . . . . . . 3 1.5 Example: u t +xu x = 0 . . . . . . . . . . . . . . . . . . . . . . . 4 1.6 Example: u t + (xu) x = 0 . . . . . . . . . . . . . . . . . . . . . . 5 2 Models of Vibration, Diffusion and Heat Conduction; Ill-Posed Prob- lems 6 2.1 Vibrating String . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 One-dimensional Diffusion . . . . . . . . . . . . . . . . . . . . . 7 2.3 One-dimensional Heat Conduction . . . . . . . . . . . . . . . . . 8 2.4 Ill-posed Problems . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 One Dimensional Wave Equation 10 3.1 General Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2 Solution of initial value problem . . . . . . . . . . . . . . . . . . 11 3.2.1 Example: Three-finger pluck . . . . . . . . . . . . . . . . 11 3.2.2 Example: Hammer blow . . . . . . . . . . . . . . . . . . 12 3.3 Energy and Uniqueness . . . . . . . . . . . . . . . . . . . . . . . 13 4 One Dimensional Diffusion Equation 14 4.1 Solution of IVP . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.2 General Properties of the IVP Solution . . . . . . . . . . . . . . . 15 4.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.4 Derivation of solution formula using Fourier transforms . . . . . . 17 5 Duhamel’s Principle; Half-Line Models 19 5.1 Duhamel’s Principle for ODE . . . . . . . . . . . . . . . . . . . . 19 5.2 Duhamel’s Principle for Diffusion Equation . . . . . . . . . . . . 19 5.3 Diffusion/Heat on the Half Line: Reflection Method . . . . . . . . 20 i 5.4 Diffusion/Heat on the Half Line with Sources . . . . . . . . . . . 21 5.5 Waves on the Half Line . . . . . . . . . . . . . . . . . . . . . . . 22 6 Separation of Variables 24 6.1 Separation of Variables for the Heat Equation . . . . . . . . . . . 24 6.2 Sturm-Liouville Theory . . . . . . . . . . . . . . . . . . . . . . . 25 6.3 Heat IBVP with Constant Coefficients . . . . . . . . . . . . . . . 26 6.4 Wave IBVP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7 Numerical Solution of PDEs with Matlab 28 7.1 Specifying an IBVP . . . . . . . . . . . . . . . . . . . . . . . . . 28 7.2 Solving an IBVP . . . . . . . . . . . . . . . . . . . . . . . . . . 29 8 Fourier Series 32 8.1 Least-Squares Approximation, Completeness . . . . . . . . . . . 32 8.2 Classical Fourier series . . . . . . . . . . . . . . . . . . . . . . . 34 8.3 Pointwise Convergence . . . . . . . . . . . . . . . . . . . . . . . 35 8.4 Solving PDE initial value problems . . . . . . . . . . . . . . . . . 36 8.5 Heat equation with source term . . . . . . . . . . . . . . . . . . . 38 9 Laplace’s Equation 40 9.1 Some Facts from Vector Analysis . . . . . . . . . . . . . . . . . . 40 9.2 Heat Flow in Three Dimensions . . . . . . . . . . . . . . . . . . 40 9.3 Membrane Vibration . . . . . . . . . . . . . . . . . . . . . . . . 41 9.4 Laplace’s Equation . . . . . . . . . . . . . . . . . . . . . . . . . 43 10 Solving Two-Dimensional Laplace Equations 48 10.1 Dirichlet Problem in a disk . . . . . . . . . . . . . . . . . . . . . 48 10.2 Dirichlet Problem in a rectangle . . . . . . . . . . . . . . . . . . 50 10.3 Dirichlet-Neumann Problem in a wedge . . . . . . . . . . . . . . 52 10.4 Dirichlet Problem in the region outside a circle . . . . . . . . . . 53 11 Green’s Functions 55 11.1 Green’s Function for One-Dimensional Equation . . . . . . . . . 55 11.2 Green’s Function for Two-Dimensional Poisson Equation . . . . . 57 11.3 Green’s functions from eigenfunctions . . . . . . . . . . . . . . . 60 ii 1 PDEGeneralities, Transport Equation, Method of Characteristics • how to classify PDEs • how to model one dimensional transport phenomena by a first-order PDE • how to solve initial value problems for this equation using the method of characteristics • how to compute and plot solutions using Maple function PDEplot 1.1 PDE Generalities Recall that an ordinary differential equation (ODE) relates a one-variable function u(x) and its derivatives in an equation of the form F(x, u, u , u , . . . , u (n) ) = 0. The order of the ODE is the highest derivative order that appears in the equation. For example, the Malthus population growth model u (t) = ru(t) is a first-order ODE with independent variable t (time), dependent variable u (pop- ulation), and constant parameter r (net growth rate). An ODE is said to be linear if it has the form a 0 (x)u(x) +a 1 (x)u (x) +· · · a n (x)u (n) (x) . ¸¸ . Lu = g(x) and a linear ODE is said to be homogeneous if g ≡ 0. Linear homogeneous ODEs have the superposition property: if u 1 and u 2 are solutions then so is the function α 1 u 1 +α 2 u 2 for any constants α 1 , α 2 . For example, the Malthus model is a linear homogeneous ODE. A solution of an ODE is a function that satisfies the equation everywhere in some domain of the dependent variable. General solutions of ODEs generally contain arbitrary constants. For example, u(t) = Ae rt for any constant A is a solution of the Malthus model ODE. Apartial differential equation (PDE) relates a multivariable function u(x, y, . . .) and its derivatives u x = ∂u ∂x , u xy = ∂ 2 u ∂x∂y , . . . in an equation of the form F(x, y, . . . , u, u x , u y , . . . , u xx , u xy , u yy , . . .) = 0 The order of the ODE is the highest derivative order that appears. Linear and homogenous PDEs are defined analogously to ODEs. Here are some examples of 1 two-variable PDEs that are used to model physical phenomena: 1. u x +u y = 0 (transport; order 1, linear homogeneous) 2. u x +yu y = 0 (transport; order 1, linear homogenous) 3. u x +uu y = 0 (shock wave; order 1, nonlinear) 4. u xx +u yy = 0 (Laplace eqn; order 2, linear homogeneous) 5. u tt −u xx +u 3 = 0 (wave with interaction; order 2, nonlinear) 6. u t +uu x +u xxx = 0 (dispersive wave; order 3, nonlinear) 7. u tt +u xxxx = 0 (vibrating beam; order 4, linear homog.) 8. u t −iu xx = 0 (quantum mechanics; order 2, linear homog.) A solution of a PDE is a function that satisfies the equation everywhere in some domain of the dependent variables. For example, both u 1 (x, t) = x 2 + 2t and u 2 (x, t) = e −t sin x are solutions of the PDE u t − u xx = 0 for all (x, t). General solutions of PDEs generally involve arbitrary functions. For example, the general solution of u x = t sin x is u(x, t) = −t cos(x) + φ(t), and the general solution of u xy = 0 is u(x, y) = F(y) +G(x). In this course we will see how PDEs arise as mathematical models of phe- nomena, we will present general properties of solutions, and learn some solution techniques. 1.2 Transport Equation Consider a substance (e.g. mass or energy) flowing in a region of space. Let u(x, t) denote its density (units: [quantity] · [volume] −1 ) as a function of position x and time t, and let φ(x, t) denote the flux (units: [quantity] · [time] −1 · [area] −1 ). (Density and flux variations in the y and z directions are assumed to be negligible.) The amount of substance in an interval a ≤ x ≤ b of a tube-shaped region of constant cross section A is _ b a u(x, t)Adx. A b a x The net flux into the interval is φ(a, t)A − φ(b, t)A. Let f(x, t, u) denote the source term, that is, the rate (units: [quantity] · [time] −1 · [volume] −1 ) at which substance density increases by processes other than flux, for example chemical reaction. The rate of increase of the total amount of substance in the interval is then d dt _ b a u(x, t)Adx = φ(a, t)A −φ(b, t)A + _ b a f(x, t, u)Adx, which can be rearranged to give _ b a (u t +φ x −f) dx = 0. Because [a, b] is arbitrary, this implies that the conservation equation u t +φ x = f 2 should hold at every point in the region. If we know the velocity c(x, t) (units: [length] · [time] −1 ) then the flux is φ = cu. Substituting this constitutive equation into the conservation equation gives the transport equation u t + (cu) x = f. (1) In an initial value problem for the transport equation, one seeks the function u(x, t) that satisfies (1) and that satisfies u(x, 0) = u 0 (x) for some given initial density profile u 0 . 1.3 Method of Characteristics The transport equation (1) can be written as cu x + u t = f − c x u, that is, as c · ∇u = g where g(x, t, u) = f − c x u, c = _ c 1 _ , and ∇u = _ u x u t _ . The transport equation thus has a geometric interpretation: we seek a surface z = u(x, t) whose directional derivative in the direction of vector c is g(x, t, u). This geometric interpretation is the basis for the following solution method. t x k c Curves x = X(t) in the (x, t) plane that are tangential to the vector field _ c(x, t) 1 _ are called characteristic curves. From this definition it follows that the characteristic curve that goes through the point (x, t) = (k, 0) is the graph of the func- tion X that satisfies the ODE dX dt = c(X, t) (2) with initial condition X(0) = k. Denoting the value of u along a characteristic curve by U(t) = u(X(t), t), we have d dt U = ∂u ∂x dX dt + ∂u ∂t = cu x +u t = g, that is, the value of u along the characteristic curve is determined by the ODE U = g(X(t), t, U(t)). (3) The solution of the ODE (2) with initial value U(0) = u 0 (k) determines the value of u along the characteristic curve that intersects the x-axis at (k, 0), because U(0) = u(X(0), 0) = u(k, 0) = u 0 (k). The solution surface is the collection (or envelope) of space curves created as k takes on all real values. The Maple code PDEplot produces the graph of the solution using numerical algorithms to solve the ODEs (2–3) with initial condition _ X(0) U(0) _ = _ k u 0 (k) _ . In simple enough cases, the ODEs can also be solved analytically “by hand”. 1.4 Example: u t + 2u x = 0 This equation models transport with constant velocity c(x, t) = 2 and no source term. 3 t x k x – 2t k = The characteristic ODE is X = 2. The solution of this ODE satisfying the initial condition X(0) = k is the straight line X = 2t + k. The characteristic curve (in this case: the line) through a given point (x, t) crosses the x axis at (k, 0) with k = x −2t. The ODE describing the value of u along a charac- teristic line is U (t) = 0, i.e. the value is constant along the line. The solution of this ODE satisfying the initial condition U(0) = u 0 (k) is U(t) = u 0 (k). The solution of the PDE initial value problem is therefore u(x, t) = u 0 (x − 2t). In particular, if u 0 (x) = e −x 2 then the solution is u(x, t) = e −(x−2t) 2 . 2 1.5 1 t 0.5 -2 0 2 4 0.2 0 6 x 0.4 u(x,t) 0.6 0.8 The solution of the PDE u t +2u x = 0 with ini- tial profile u 0 (x) = e −x 2 can be plotted in Maple by the commands > PDE:=diff(u(x,t),t)+2 * diff(u(x,t),x)=0; > with(PDEtools): > PDEplot(PDE,[x,0,exp(-xˆ2)], x=-3..3,t=0..2); The plot shows how the initial profile translates to the right at constant speed without changing shape. 1.5 Example: u t +xu x = 0 This equation can also be written as u t + (xu) x = u, which is of the form of the transport equation (1) with source term f(x, t, u) = u. This equation models transport in a velocity field c(x, t) = x, that is, the velocity is equal to the distance from the origin. The source term f(x, t, u) = u models generation of substance at a rate equal to the amount of substance. t x k x = ke t The characteristic ODE is X = X. The solution of this ODE satisfying the initial condition X(0) = k is X = ke t . The characteristic curve through a given point (x, t) crosses the x axis at (k, 0) with k = xe −t . The ODE describing the value of u along a charac- teristic curve is U = 0, i.e. the value is constant along the curve. The solution of this ODE satisfying the ini- tial condition U(0) = u 0 (k) is U(t) = u 0 (k). The solution of the PDE initial value problem is therefore u(x, t) = u 0 (xe −t ). In particular, if the initial profile is u 0 (x) = e −(x−3) 2 then the solution is u(x, y) = e −(xe −t −3) 2 . 2 1.5 t 1 0.5 0 40 30 20 10 x 0 0.2 0.4 u(x,t) 0.6 0.8 The solution of the PDE u t + xu x = 0 with initial profile u 0 (x) = e −(x−3) 2 can be plotted in Maple by the commands > PDE:=diff(u(x,t),t) +x * diff(u(x,t),x)=0; > PDEplot(PDE,[x,0,exp(-(x-3)ˆ2)], x=0..6,t=0..2); 4 The PDE solution spreads out as time advances, and the surface height remains constant along the characteristic curves, and so the total amount of substance increases as time advances. 1.6 Example: u t + (xu) x = 0 This equation models transport in the same velocity field as the previous example, but without the source term. The characteristic curves are the same as in the previous example. Rewriting the equation in the form u t + xu x = −u, we see that the ODE describing the value of u along a characteristic curve is U = −U.The solution of this ODE satisfying the initial condition U(0) = u 0 (k) is U(t) = u 0 (k)e −t . The solution of the PDE initial value problem is therefore u(x, t) = u 0 (xe −t )e −t . In particular, if the initial profile is u 0 (x) = e −(x−3) 2 then the solution is u(x, y) = e −(xe −t −3) 2 −t . 2 1.5 t 1 0.5 0 40 30 20 x 10 0 0.2 0.4 u(x,t) 0.6 0.8 The solution of the PDE u t + xu x = 0 with initial profile u 0 (x) = e −(x−3) 2 can be plotted in Maple by the commands > PDE:=diff(u(x,t),t) +diff(x * u(x,t),x)=0; > PDEplot(PDE,[x,0,exp(-(x-3)ˆ2)], x=0..6,t=0..2); The PDE solution spreads out as time advances, and because there is no source term, the solu- tion also decreases in amplitude, so that the total amount of substance remains constant (conserva- tion law). 5 2 Models of Vibration, Diffusion and Heat Conduc- tion; Ill-Posed Problems • how to derive the PDE for the vibrating string • how to derive the PDE for one-dimensional diffusion or heat conduction • how to model boundary conditions for these PDEs • some examples of ill-posed problems 2.1 Vibrating String Consider a thin flexible string moving in the xz plane. Assume that points of the string move in the z direction only, and let z = u(x, t) denote the shape of the string. Longitudinal force balance: Let T(x, t) be the ten- sion, assumed to act tangentially along the string. Let θ = tan −1 u x denote the angle between the string tan- gent and the x axis. The only longitudinal forces acting on the part of the string between x = a and x = b are the x components of the tension force, and because there is no longitudinal motion these forces must be equal, that is, T(b, t) cos θ(b, t) = T(a, t) cos θ(a, t). Because the segment is arbitrary, this implies T cos θ is constant with respect to x, say T(x, t) cos θ(x, t) = τ(t). Mass conservation: Let ρ(x, t) be the string’s mass per unit length, which may vary as the string deforms during the motion, and let ρ 0 (x) be the mass per unit length when the string is straight. If dx represents an element of length when the string is straight and dx = _ 1 +u 2 x dx is the length element of the deformed string, then mass conservation requires that ρ dx = ρ 0 dx. Transverse force balance: By Newton’s law, the net transversal force on a string segment [a, b] is equal to the time derivative of the momentum: d dt _ b a u t ρ dx = T(b, t) sin θ(b, t) −T(a, t) sin θ(a, t) = T(b, t) cos θ(b, t) tan θ(b, t) −T(a, t) cos θ(a, t) tan θ(a, t) = τ(t) (u x (b, t) −u x (a, t)) = τ _ b a u xx dx. Because of mass conservation, the left hand side can be written as d dt _ b a u t ρ 0 dx = _ b a ρ 0 u tt dx, and so the transverse force balance becomes _ b a (ρ 0 u tt −τu xx ) dx = 0. 6 Because the interval is arbitrary, this implies ρ 0 u tt −τu xx = 0 for all (x, t) in the solution domain. Denoting c = _ τ/ρ 0 , this can be written u tt = c 2 u xx , which is the one-dimensional wave equation. If the string is modelled to have finite length, say x ∈ [0, l], then it is necessary to specify the boundary conditions. If the motion at the ends is known, this can be modelled by the Dirichlet condition u(0, t) = h 0 (t), u(l, t) = h 1 (t) In particular, fixed ends are modelled by h 0 ≡ 0 and h 1 ≡ 0. An end support at x = l that is not perfectly rigid can be modelled as a lin- ear spring where the spring force is ku(l, t), with k being the spring constant. T k The force balance with the transverse component of the tension T(l, t) sin θ(l, t) = T(l, t) cos θ(l, t) . ¸¸ . τ(t) tan θ(l, t) . ¸¸ . u x (l, t) . produces the Robin condition τ(t)u x (l, t) + ku(l, t) = 0. Similarly, a flexible support at the other end can be modelled by the Robin condi- tion −τ(t)u x (0, t) +ku(0, t) = 0. 2.2 One-dimensional Diffusion Recall from§1.2 that the one-dimensional conservation equation relating the den- sity u(x, t) of material moving with flux φ(x, t) and source term f(x, t, u) is u t +φ x = f. Diffusion processes, whereby substance flows from areas of high concentration to areas of low concentration, can be modelled by the constitutive relation (Fick’s law) φ = −ku x , where k(x) is a material parameter (diffusivity, units: [length] 2 ·[time] −1 ). Com- bining these equations gives the one-dimensional diffusion equation u t −(ku x ) x = f. 7 g If the domain is of finite length, say x ∈ [0, l], then it is necessary to specify boundary conditions. For ex- ample, consider a tube whose end x = l is covered by a thin permeable membrane, beyond which there is a large well-stirred reservoir with given density g(t). Sup- posing the flux through the membrane is proportional to the difference in densities on its two faces, we have φ(l, t) = κ(u(l, t) −g(t)), where κ is the membrane permeability. Substituting Fick’s law gives the Robin condition ku x (l, t) +κu(l, t) = κg(t). In the limiting case κ/k →0 (impermeable membrane, i.e. the tube end is closed) this becomes the Neumann condition u x = 0, while in the limiting case κ/k →∞(no membrane) we get the Dirichlet condition u(l, t) = g(t). 2.3 One-dimensional Heat Conduction The one-dimensional conservation equation is equally valid when u = cρT de- notes density of heat energy. Here c(x) and ρ(x) are material parameters (specific heat and mass per unit length) and T is the temperature. The constitutive relation (Fourier’s law) φ = −KT x models conduction, whereby heat flows from hot areas to colder areas. The ma- terial parameter K(x) is called the heat conductivity. Combining the equations gives the one-dimensional heat equation cρ(T) t −(KT x ) x = f. This is very similar to the diffusion equation, and is essentially identical to it when cρ is constant. Similarly to the diffusion equation, one can model a thin insulating layer be- tween the end x = l and a region with given temperature T 1 by a Robin condition KT x (l, t) +κT(l, t) = κT 1 (t) with Neumann and Dirichlet conditions obtained as limiting cases corresponding to perfect insulation and perfect conduction. 8 2.4 Ill-posed Problems A mathematical model or problem often consists of a set of differential and alge- braic equations. However, not all such sets of equations are useful models: the set should have a unique solution, and the solution should be continuously dependent on the available data. Such models are said to be “well posed problems”. Here are some examples of PDE problems that, although they may appear to be all right at first glance, are in fact ill-posed. Well-posed PDE problems will be presented later in the course. 1. The boundary value problem (BVP) u (x) = 0 (0 < x < 1), u (0) = 0, u (1) = 1 has no solutions. The problem is overdetermined. 2. The BVP u (x) = 0 (0 < x < 1), u (0) = 0, u (1) = 0 has infinitely many solutions, namely, solutions of the form u = constant. The problem is underdetermined. 3. The two-dimensional Laplace equation u xx +u yy = 0 on the domain y > 0 with boundary conditions u(x, 0) = 0 and u y (x, 0) = 0 has the solution u ≡ 0. If the second boundary condition is changed to u y (x) = e − √ n sin(nx), the solution becomes u(x, y) = 1 n e − √ n sin(nx) sinh(ny). We can choose n large enough to make max x |u y (x)| as small as we like, but no matter how small the perturbation, the solution always blows up as y → ∞. Thus, the problem is unstable: the solution does not depend con- tinuously on the boundary data. 9 3 One Dimensional Wave Equation • general solution of one dimensional wave equation • d’Alembert’s solution of initial value problem • uniqueness of IVP solution via energy 3.1 General Solution The one dimensional wave equation u tt −c 2 u xx = 0 (x ∈ R, t > 0) models the transverse vibration of a long string whose ends are so far away that they can be neglected. The PDE can be written as the sytem of first-order PDEs _ ∂ ∂t −c ∂ ∂x _ v = 0, _ ∂ ∂t +c ∂ ∂x _ u = v. The PDE v t −cv x = 0 has the characteristic equation X = −c, its characteristic curves are X = −ct + k, and the general solution is v(x, t) = h(x + ct) where h is an arbitrary function. The PDE u t + cu x = v has the characteristic equation X = c, and its charac- teristic curves are X = ct + l. The value of u along the characteristic is U(t) = u(ct +l, t); it satisfies the ODE U (t) = v(ct +l, t) = h(ct +l +ct) = h(2ct +l). Making the change of variables s = 2ct +l and ˆ U(2ct +l) = U(t), we obtain the ODE 2c ˆ U (s) = h(s), which has the solution ˆ U(s) = f(s) + g where f = 1 2c _ h and g is constant along the characteristic. Then u(x, t) = U(t) = ˆ U(2ct +l) = f(2ct +l) +g(l) = f(2ct + (x −ct)) +g(x −ct) = f(x +ct) +g(x −ct). (4) The general solution (4) is the sum of a shape f that moves left at speed c and a shape g that moves right with speed c, as shown here: t x l x – ct l = t x k x +ct k = g x f x 10 x t domain of dependence range of influence (x 0 ,t 0 ) The general solution (4) indicates that “information” (about the local shape of the string) propagates at a finite speed c along the characteristics. The displacement at a given point in time and space (x 0 , t 0 ) can be deduced from values lying in a cone-shaped domain of dependence of previous val- ues; values outside this domain have no influence on the value of u(x 0 , t 0 ). Similarly, any point (x 0 , t 0 ) has a cone-shaped range of influence. 3.2 Solution of initial value problem The initial value problem for the one dimensional wave equation is to find the solution given the initial displacement and velocity, that is, we are given the initial conditions u(x, 0) = φ(x), u t (x, 0) = ψ(x). Substituting t = 0 into u(x, t) = f(x + ct) + g(x − ct) and u t (x, t) = cf (x + ct) −cg (x −ct) gives φ(x) = f(x) +g(x), ψ(x) = cf (x) −cg (x). Differentiating the first equation and solving gives f = φ 2 + ψ 2c , g = φ 2 − ψ 2c , which can be integrated to give f(x) = 1 2 φ(x) + 1 2c _ x 0 ψ(ξ) dξ +A g(x) = 1 2 φ(x) − 1 2c _ x 0 ψ(ξ) dξ +B. _ (5) Adding these together gives f(x) +g(x) = φ(x) +A+B, so we have A+B = 0. Then u(x, t) = f(x +ct) +g(x −ct) = 1 2 φ(x +ct) + 1 2c _ x+ct 0 ψ(ξ) dξ +A + 1 2 φ(x −ct) − 1 2c _ x−ct 0 ψ(ξ) dξ +B = 1 2 [φ(x +ct) + φ(x −ct)] + 1 2c _ x+ct x−ct ψ(ξ) dξ (6) Formula (6) is known as d’Alembert’s formula. 3.2.1 Example: Three-finger pluck Consider the infinite-length string with initial displacement given by the “hat” function φ(x) = _ 1 −|x| |x| ≤ 1 0 otherwise 11 and initial velocity ψ ≡ 0. d’Alembert’s formula (6) gives the solution as u(x, t) = 1 2 [φ(x +ct) +φ(x −ct)]. This could be written more explicitly using a lot of “if” clauses, but such a formula would be difficult for a human reader to interpret. A more geometric approach is to decompose the initial shape according to (5) with A = B = 0, which gives the left-moving shape f(x) = 1 2 φ(x) and the right-moving shape g(x) = 1 2 φ(x). The solution is thus the sum of two hat functions, one moving to the left and the other moving to the right, both at speed c (see Figure 1). x u ct = 0 -1 1 x u ct = 0.5 -1.5 1.5 x u ct = 2 -3 1 -1 3 x -1 1 Figure 1: “Three-finger pluck” solution snapshots 3.2.2 Example: Hammer blow Consider the infinite-length string with zero initial displacement and initial veloc- ity given by the step function ψ(x) = _ 1 |x| ≤ 1 0 otherwise. x -1 1 d’Alembert’s formula (6) gives the solution u(x, t) = 1 2c [Ψ(x +ct) −Ψ(x −ct)] where Ψ is the ramp function Ψ(x) = _ x 0 ψ(ξ) dξ = _ _ _ −1 x < −1 x |x| ≤ 1 1 x > 1. x -1 1 The solution is the sum of two mirror-image ramp functions, one moving to the left and the other moving to the right, both at speed c. 12 3.3 Energy and Uniqueness Define the total energy E(t) of an infinitely long string as the sum of kinetic energy and potential energy E = 1 2 _ ∞ −∞ ρ 0 u 2 t dx + 1 2 _ ∞ −∞ τu 2 x dx. Differentiating, we have E = 1 2 _ ∞ −∞ ρ 0 (2u t u tt ) dx + 1 2 _ ∞ −∞ τ(2u x u xt ) dx = τ _ ∞ −∞ (u t u xx +u x u xt ) . ¸¸ . (u t u x ) x dx = τ ¸ ¸ ¸ ∞ −∞ u t u x . If we assume that the support of φ and ψ (i.e. the subset of the domain where they are nonzero) is contained in a finite interval [a, b], it follows that u(x, t) is zero for x outside the range of influence of [a, b]. Then E is identically zero and the total energy E remains constant in time. Similarly, the total energy E(t) of a finite-length string is defined as E = 1 2 _ L 0 ρ 0 u 2 t dx + 1 2 _ L 0 τu 2 x dx. If the string is assumed to be clamped at both ends, that is, u is assumed to be subject to the homogeneous Dirichlet boundary conditions u(0, t) = 0, u(L, t) = 0, then u t (0, t) = 0 and u t (L, t) = 0, so that E = τ ¸ ¸ ¸ L 0 u t u x = 0, and the total energy remains constant. The above principle of conservation of energy can be used to prove the unique- ness of the solution of the initial value problem for the finite-length string with Dirichlet boundary conditions. Let u and v be solutions of the initial-boundary value problem, that is, _ ¸ ¸ ¸ ¸ _ ¸ ¸ ¸ ¸ _ u tt = c 2 u xx u(x, 0) = φ(x) u t (x, 0) = ψ(x) u(0, t) = h 0 (t) u(L, t) = h 1 (t) _ ¸ ¸ ¸ ¸ _ ¸ ¸ ¸ ¸ _ and _ ¸ ¸ ¸ ¸ _ ¸ ¸ ¸ ¸ _ v tt = c 2 v xx v(x, 0) = φ(x) v t (x, 0) = ψ(x) v(0, t) = h 0 (t) v(L, t) = h 1 (t) _ ¸ ¸ ¸ ¸ _ ¸ ¸ ¸ ¸ _ Then the difference w = u −v satisfies the initial-boundary value problem _ ¸ ¸ ¸ ¸ _ ¸ ¸ ¸ ¸ _ w tt = c 2 w xx w(x, 0) = 0 w t (x, 0) = 0 w(0, t) = 0 w(L, t) = 0 _ ¸ ¸ ¸ ¸ _ ¸ ¸ ¸ ¸ _ The energy of w at any time is equal to its energy at t = 0, which is zero, and so w x ≡ 0, which implies that w is constant with respect to x. To satisfy the boundary conditions, the constant must be zero. Thus w ≡ 0, that is, u ≡ v. 13 4 One Dimensional Diffusion Equation • Formula for the solution of the initial value problem • General properties of the solution • Example IVPs • Derivation of the formula using Fourier Transforms 4.1 Solution of IVP The solution of the initial value problem for the diffusion equation u t −ku xx = 0 with u(x, 0) = φ(x) is given by formula (8) below. Theorem 1 Let φ be a bounded and piecewise continuous function on R, and let S(x, t) = 1 √ 4πkt e − x 2 4kt (x ∈ R, t > 0), (7) where k is a positive constant. Then u(x, t) = _ ∞ −∞ S(x −ξ, t)φ(ξ) dξ (8) is a smooth function that satisfies u t = ku xx for x ∈ R, t > 0, and lim t↓0 u(x, t) = φ(x + ) +φ(x − ) 2 (x ∈ R). (9) PROOF. First, note that S > 0 and that _ ∞ −∞ S(x, t) dx = .¸¸. p = x √ 4kt 1 √ π _ ∞ −∞ e −p 2 dp = 1. (10) Then |u(x, t)| ≤ _ max x∈R |φ(x)| _ . ¸¸ . M _ ∞ −∞ S(x −ξ, t) dξ = M, (11) and so the improper integral (8) converges. Also, u x (x, t) = _ ∞ −∞ S x (x −ξ, t)φ(ξ) dξ = −1 √ 4πkt _ ∞ −∞ x −ξ 2kt e − (x−ξ) 2 4kt φ(ξ) dξ [ p = (x −ξ)/ √ 4kt = 1 √ πkt _ ∞ −∞ pe −p 2 φ(x −p √ 4kt) dp, and this integral converges because |u(x, t)| ≤ M √ πkt _ ∞ −∞ |p|e −p 2 dp = M √ πkt . 14 Similarly, it can be shown that u t , u xx , u xt , and derivatives of higher orders all exist, so u is smooth. It satisfies the diffusion equation because (u t −ku xx )(x, t)) = _ ∞ −∞ (S t −kS xx . ¸¸ . =0 )(x −ξ, t)φ(ξ) dξ = 0. The proof of (9) is omitted. 4.2 General Properties of the IVP Solution 1. The formula (8) is a convolution 1 and can be written u = S ∗ φ (with t treated as a parameter). 2. The function S is variously called the kernel, source function, or fundamen- tal solution of the diffusion (or heat) equation. We have lim t↓0 S(x, t) = 0 for x = 0 and lim t↓0 S(0, t) = ∞. Snapshots of S at various time instants show an initial narrow peak that spreads out as time advances. !8 !4 0 4 8 0 0.4 0.8 x S kt = 0.1 kt = 1 kt = 10 3. Any jump discontinuities in the initial shape φ or in its derivatives are in- stantly smoothed out — not like the wave equation. 4. If φ > 0 on a finite interval [a, b] and is zero elsewhere, we have u(x, t) > 0 for all x (no matter how large) and all t > 0 (no matter how small). Thus, in this model, information has “infinite speed of propagation” — not like the wave equation. 5. A small change in the initial condition produces a small change in the solu- tion. That is, if u t = ku xx (x ∈ R, t > 0) u(x, 0) = φ(x) and v t = kv xx (x ∈ R, t > 0) v(x, 0) = ψ(x), then the difference w = u − v satisfies w t = kw xx with initial condition w(x, 0) = φ(x) − ψ(x), and by (11) we have |w(x, t)| ≤ max x∈R |φ(x) − ψ(x)|. 6. The initial value problem has at most one solution. This can be proved by setting φ = ψ in the previous argument. 1 The convolution of two functions f and g is denoted f ∗ g and is given by (f ∗ g)(x) = _ ∞ −∞ f(x−ξ)g(ξ) dξ. Convolution is semilinear (i.e. (αf) ∗ g = α(f ∗ g)), commutative (f ∗ g = g∗f), associative (f ∗(g∗h) = (f ∗g)∗h), and distributes over addition (f ∗(g+h) = f ∗g+f ∗h). 15 7. The identity (10) can be interpreted in terms of the IVP: u ≡ 1 is indeed a solution of the diffusion equation for φ ≡ 1. 4.3 Examples Initial profile = step Solve the one-dimensional diffusion equation u t = ku xx with initial condition u(x, 0) = Heaviside(x) = _ 0 (x < 0) 1 (x > 0) . x 1 Write the solution using the standard function erf, which is defined as erf(u) = 2 √ π _ u 0 e −p 2 dp. 1 !1 !3 3 x Solution. The solution formula (8) gives u(x, t) = (φ ∗ S)(x, t) = 1 √ 4πkt _ ∞ −∞ e −z 2 /(4kt) φ(x −z) dz = 1 √ 4πkt _ x −∞ e −z 2 /(4kt) dz [ p = z/ √ 4kt = 1 √ π _ x/ √ 4kt −∞ e −p 2 dp = 1 √ π _ 0 −∞ e −p 2 dp + 1 √ π _ x/ √ 4kt 0 e −p 2 dp = 1 2 + 1 2 erf(x/ √ 4kt). !8 !4 0 4 8 0 0.5 1 x u kt = 0.1 kt = 1 kt = 10 Initial profile = exponential Solve the one-dimensional diffusion equation u t = ku xx with initial condition u(x, 0) = φ(x) = e −x . 16 Solution. The solution formula (8) gives u(x, t) = 1 √ 4πkt _ ∞ −∞ e −(x−ξ) 2 /(4kt) e −ξ dξ = 1 √ 4πkt _ ∞ −∞ e − (x−2kt−ξ) 2 4kt +kt−x dξ = e −(x−kt) 1 √ 4πkt _ ∞ −∞ e − (x−2kt−ξ) 2 4kt dξ . ¸¸ . =1 = φ(x −kt), that is, the initial shape translates to the right with speed k. 4.4 Derivation of solution formula using Fourier transforms The Fourier transform F = Ff and the inverse Fourier transform f = F −1 F are given by the formulas F(ω) = _ ∞ −∞ f(x)e −iωx dx, f(x) = 1 2π _ ∞ −∞ F(ω)e iωx dω. These transforms have many useful properties, including: Linearity of FT and IFT: If g(x) = α 1 f 1 (x)+α 2 f 2 (x) then G(ω) = α 1 F 1 (ω)+ α 2 F 2 (ω). If G(ω) = β 1 F 1 (ω) + β 2 F 2 (ω) then g(x) = β 1 f 1 (x) + β 2 f 2 (x). FT of derivative: (Ff )(ω) = iωF(ω). FT of convolution: (F[f 1 ∗ f 2 ])(ω) = F 1 (ω)F 2 (ω). The Fourier transform can be used to solve the diffusion equation IVP as follows. Transforming u t − ku xx gives the ordinary differential equation U t + kω 2 U = 0, which has the solution U(ω, t) = Ce −ω 2 kt . The initial condition gives C = U(ω, 0) = Φ(ω), so we have U(ω, t) = Φ(ω)e −ω 2 kt . Thus u = f ∗ φ, where f is the inverse Fourier transform of F(ω) = e −ω 2 kt . The inverse Fourier transform can be found from standard tables, or it can be derived as follows. Differentiating f(x) = 1 2π _ ∞ −∞ e −ω 2 kt e iωx dω gives f (x) = 1 2π _ ∞ −∞ e −ω 2 kt iωe iωx dω = − 1 2π ¸ ¸ ¸ ∞ −∞ i 2kt e −ω 2 kt e iωx − 1 2π _ ∞ −∞ x 2kt e −ω 2 kt e iωx dω = − x 2kt f(x). Multiplying by e x 2 /(4kt) gives the differential equation e x 2 /(4kt) f (x) + x 2kt e x 2 /(4kt) f(x) . ¸¸ . _ e x 2 /(4kt) f(x) _ = 0, 17 which has the solution e x 2 /(4kt) f(x) = constant. The constant is determined by the initial condition f(0) = 1 2π _ ∞ −∞ e −ω 2 kt dω = 1 √ 4πkt . Thus f(x) = 1 √ 4πkt e − x 2 4kt , which coincides with the formula of the fundamental solution given in (7). 18 5 Duhamel’s Principle; Half-Line Models • how to solve linear problems with source terms (Duhamel’s Principle) • how to solve diffusion models on the half-line x > 0 • how to solve wave models on the half-line x > 0 5.1 Duhamel’s Principle for ODE Consider the linear homogeneous ODE ˙ u +Au = 0, (12) where u(t) is a vector and A is a constant square matrix. The source operator S(t) is a square matrix such that, for any vector φ, u(t) = S(t)φ is a solution of (12) with initial condition u(0) = φ. It follows that S(0) = I and ˙ S(t) +AS(t) = 0, where I is the identity matrix. For example, the scalar IVP ˙ u+αu = 0, u(0) = φ has the solution u(t) = e −αt φ, that is, the source operator is S(t) = e −αt . The following theorem shows how the general solution of the homogeneous ODE can be used to solve the ODE with a source term. Theorem 2 (Duhamel’s Principle) The function u(t) = _ t 0 S(t −τ)f(τ) dτ +S(t)φ (13) satisfies the differential equation ˙ u +Au = f with initial condition u(0) = φ. PROOF. We have u(0) = 0 +S(0)φ = φ and ˙ u(t) = _ t 0 ˙ S(t −τ)f(τ) dτ +S(t −t)f(t) + ˙ S(t)φ = −A __ t 0 S(t −τ)f(τ) dτ +S(t)φ _ +If(t) = −Au(t) +f(t), which completes the proof. Note that the integral in (13) can also be written _ t 0 S(τ)f(t −τ) dτ. 5.2 Duhamel’s Principle for Diffusion Equation Consider now the diffusion equation, which can be written as (12) with the dot representing ∂ ∂t and A representing the operator −k ∂ 2 ∂x 2 for functions with spatial domain x ∈ R. The general solution of the one-dimensional diffusion equation IVP on R was shown earlier to be u(x, t) = _ ∞ −∞ S(x −ξ, t)φ(ξ) dξ, where S(x, t) = 1 √ 4πkt e − x 2 4kt . 19 From this formula we see that the source operator S(t) for this problem transforms the function φ(x) into the function _ ∞ −∞ S(x − ξ, t)φ(ξ) dξ. Duhamel’s principle thus gives the solution of the IVP with source term u t −ku xx = f(x, t), u(x, 0) = φ(x) as u(x, t) = _ t 0 _ ∞ −∞ S(x −ξ, t −τ)f(ξ, τ) dξ dτ + _ ∞ −∞ S(x −ξ, t)φ(ξ) dξ. (14) Example Solve the diffusion equation u t − ku xx = e −x on x ∈ R, t > 0 with initial condition u(x, 0) = 0. SOLUTION. Duhamel’s formula gives u(x, t) = _ t 0 _ ∞ −∞ 1 _ 4πk(t −τ) e − (x−ξ) 2 4k(t−τ) e −ξ dξ dτ = _ t 0 e −x+k(t−τ) dτ = 1 k (e kt −1)e −x , which can be verified (by substitution) to satisfy the equation and initial condition. 5.3 Diffusion/Heat on the Half Line: Reflection Method Consider the initial-boundary value problem v t −kv xx = 0, (x > 0, t > 0) v(x, 0) = φ(x) (x > 0) v(0, t) = 0 (t > 0). _ _ _ (15) This models, for example, the ground temperature at depth x (on a flat planet!) given an initial temperature profile φ and a surface temperature that is fixed at zero. To solve this initial-boundary value problem, we exploit the fact that the solu- tion of the diffusion problem on the whole line is odd whenever the initial profile is odd. We introduce the odd extension of φ, that is, the function on R given by φ odd (x) = _ _ _ φ(x) (x > 0) −φ(−x) (x < 0) 0 (x = 0) x The solution of u t −ku xx = 0 on x ∈ R with initial condition u(x, 0) = φ odd (x) is u(x, t) = _ ∞ −∞ S(x −ξ, t)φ odd (ξ) dξ = _ ∞ 0 S(x −ξ, t)φ odd (ξ) dξ + _ 0 −∞ S(x −ξ, t)φ odd (ξ) dξ = _ ∞ 0 S(x −ξ, t)φ(ξ) dξ − _ 0 −∞ S(x −ξ, t)φ(−ξ) dξ = − _ ∞ 0 S(x +ξ, t)φ(ξ) dξ 20 The solution of the original initial-boundary value problem (15) is then the restric- tion of u(x, t) to the half-line x > 0, that is, v(x, t) = _ ∞ 0 S halfline (x, ξ, t)φ(ξ) dξ, (16) where S halfline (x, ξ, t) = S(x −ξ, t) −S(x +ξ, t) Example Solve the IBVP (15) with initial profile φ(x) = 1. This models a sudden drop in the surface temperature. SOLUTION. The odd extension of the initial profile can be written as φ odd (x) = 2·Heaviside(x)−1 x 1 -1 and so, using the result from section 4.3, we have v(x, t) = 2 _ 1 2 + 1 2 erf(x/ √ 4kt) _ −1 = erf(x/ √ 4kt). 0 2 4 6 8 0 0.5 1 x v kt = 0.1 kt = 1 kt = 10 5.4 Diffusion/Heat on the Half Line with Sources The solution formula (16) can be written as S halfline (t)φ, where the source operator S halfline (t) transforms the function φ(x) into the function _ ∞ 0 S halfline (x, ξ, t)φ(ξ) dξ. Then, using Duhamel’s Principle, the solution of the IBVP with source function w t −kw xx = f, (x > 0, t > 0) w(x, 0) = φ(x) (x > 0) w(0, t) = 0 (t > 0). _ _ _ (17) can be written directly as w(x, t) = _ t 0 _ ∞ 0 S halfline (x, ξ, t −τ)f(ξ, τ) dξ dτ + _ ∞ 0 S halfline (x, ξ, t)φ(ξ) dξ. Now consider the IBVP with Dirichlet boundary condition y t −ky xx = 0, (x > 0, t > 0) y(x, 0) = 0 (x > 0) y(0, t) = h(t) (t > 0). 21 Setting w(x, t) = y(x, t) −h(t) yields the IBVP w t −kw xx = − ˙ h, (x > 0, t > 0) w(x, 0) = −h(0) (x > 0) w(0, t) = 0 (t > 0), which is of the same form as (17) so, using its solution and the results of the example in section 5.3, we have y(x, t) = h(t) − _ t 0 ˙ h(τ) _ ∞ 0 S halfline (x, ξ, t −τ) dξ dτ −h(0) _ ∞ 0 S halfline (x, ξ, t) dξ = h(t) − _ t 0 erf _ x _ 4k(t −τ) _ ˙ h(τ) dτ −h(0) erf _ x √ 4kt _ . 5.5 Waves on the Half Line Consider the wave equation initial-boundary value problem v tt −c 2 v xx = 0 (x > 0, t > 0) v(x, 0) = φ(x), v t (x, 0) = ψ(x) (x > 0) v(0, t) = 0 (t > 0). _ _ _ (18) This models a semi-infinite string with one end fixed. We can use the reflection method here too, because the solution of the wave equation on the whole line is odd whenever both φ and ψ are odd. Applying d’Alembert’s formula, the solution of the odd-extended problem is u(x, t) = 1 2 [φ odd (x +ct) +φ odd (x −ct)] + 1 2c _ x+ct x−ct ψ odd (ξ) dξ, and so the solution of (18) is v(x, t) = _ _ _ 1 2 [φ(x +ct) + φ(x −ct)] + 1 2c _ x+ct x−ct ψ(ξ) dξ (x −ct > 0) 1 2 [φ(x +ct) −φ(ct −x)] + 1 2c _ x+ct ct−x ψ(ξ) dξ (x −ct < 0). Example The solution of the IBVP (18) with initial profile φ(x) = e −(x−3) 2 and zero initial velocity is v(x, t) = _ _ _ 1 2 [e −(x+ct−3) 2 +e −(x−ct−3) 2 ] (x −ct > 0) 1 2 [e −(x+ct−3) 2 −e −(ct−x−3) 2 ] (x −ct < 0). 22 0 2 4 6 8 !1 0 1 x ct = 0 ct = 0.75 ct = 1.5 ct = 2.25 ct = 3 ct = 3.75 ct = 4.5 ct = 5.25 23 6 Separation of Variables • first steps in solving the heat and wave equation on an interval • eigenvalues and eigenfunctions (Sturm-Liouville theory) 6.1 Separation of Variables for the Heat Equation Consider the IBVP µu t −(κu x ) x = 0 (x ∈ (0, l), t > 0) u(0, t) = 0, u(l, t) = 0 (t ≥ 0) u(x, 0) = φ(x) (x ∈ (0, l)) _ _ _ (19) where µ(x) = c(x)ρ(x) > 0 and κ(x) > 0. This models heat flow in a pipe of length l with fixed temperatures at the ends (Dirichlet boundary conditions). Substituting a trial solution of the form u(x, t) = X(x)T(t) into the PDE in (19) and rearranging gives T −T = (κX ) −µX . The function on the left side of this equation is constant with respect to x and the function on the right side is constant with respect to t, so they are both equal to a constant, call it λ. We then have two ODEs, namely T +λT = 0, which has general solution T(t) = T(0)e −λt , and (κX ) +λµX = 0, (20) which, because of the boundary conditions in (19), has the boundary conditions X(0) = 0, X(l) = 0. (21) The solution method is as follows: 1. find numbers λ n and nonzero functions X n that satisfy the BVP (20–21); 2. express the initial condition as a linear combination of the X n , that is, φ(x) = n C n X n (x); 3. then u(x, t) = n C n X n (x)e −λ n t . In the remainder of this lecture we focus on stage 1 of the method. 24 6.2 Sturm-Liouville Theory Theorem 3 There are infinitely many pairs of numbers λ n (eigenvalues) and nonzero functions X n (eigenfunctions) that are solutions of problem (20–21). The eigen- values are real and positive, the eigenfunctions corresponding to distinct eigen- values are µ-orthogonal, that is, λ m = λ n ⇒ _ l 0 µ(x)X m (x)X n (x) dx = 0, and every eigenvalue has multiplicity 1, that is, the corresponding eigenfunction is unique up to a multiplicative factor. PROOF. First, note that for any two eigenfunctions we have (κX m X n −κX n X m ) = (λ n −λ m )µX m X n ; this can be verified by expanding the left hand side then substituting the ODE. Now, if (λ n , X n ) satisfies (20–21) then so does the complex conjugate pair ( ¯ λ n , ¯ X n ), and so (λ n − ¯ λ n ) _ l 0 µ ¯ X n X n dx = ¸ ¸ ¸ l 0 (κ ¯ X n X n −κX n ¯ X n ) = 0, and dividing this through by _ l 0 µ|X n | 2 dx (which is > 0) leads us to the result λ n − ¯ λ n = 0, that is, the eigenvalues are real. Next, if λ m = λ n , _ l 0 µX m X n dx = 1 λ n −λ m ¸ ¸ ¸ l 0 (κX m X n −κX n X m ) = 0, and so X m and X n are µ-orthogonal. Next, multiplying the ODE (20) by X and integrating, we obtain _ l 0 X(κX ) dx +λ _ l 0 µX 2 dx = 0, from which we can solve for λ and get λ = − _ l 0 X(κX ) dx _ l 0 µX 2 dx = _ l 0 κ(X ) 2 dx − ¸ ¸ ¸ l 0 κXX _ l 0 µX 2 dx ≥ 0. The case λ = 0 can be ruled out, because λ = 0 ⇒ _ l 0 κ(X ) 2 dx = 0 ⇒X ≡ 0 ⇒X is constant and the only constant that is consistent with the boundary conditions (21) is zero. Finally, if (λ, X 1 ) and (λ, X 2 ) satisfy (20–21), we have (κX 1 X 2 −κX 2 X 1 ) = (λ −λ)µX 1 X 2 = 0, and so κ(X 1 X 2 − X 2 X 1 ) = constant. The boundary condition (21) implies that the constant is zero, so X 1 X 2 − X 2 X 1 = 0. Then (X 2 /X 1 ) = 0, so X 2 /X 1 is a constant, that is, the eigenfunctions corresponding to λ are identical up to a multiplicative factor. The proof of existence and infiniteness of number of eigenvalues is omitted. 25 6.3 Heat IBVP with Constant Coefficients For the heat equation (19) with constant µ and κ, equation (20) has the general solution X(x) = Acos(x _ λ/k) +Bsin(x _ λ/k), where k = κ/µ. The boundary conditions (21) imply that A = 0 and that sin(l _ λ/k) = 0. This is satisfied when l _ λ/k = nπ for n ∈ Z, so we have the eigenvalues λ n = k(nπ/l) 2 for n ∈ {1, 2, . . .}. (The solution λ = 0 is rejected because the general solution of X = 0 is X(x) = E+Fx, and the boundary conditions imply E = 0 and F = 0.) The corresponding eigenfunctions are X n (x) = sin( nπx l ). 0 1 !1 0 1 X 1 x/l 0 1 !1 0 1 X 2 0 1 !1 0 1 X 3 0 1 !1 0 1 X 4 0 1 !1 0 1 X 5 0 1 !1 0 1 X 6 For initial conditions of the form φ(x) = C 1 sin( πx l ) +C 2 sin( 2πx l ) +· · · +C n sin( nπx l ), the solution of (19) is a linear combination of spatial sinusoids with amplitudes that are exponentially decaying in time: u(x, t) = C 1 sin( πx l )e −kπ 2 t/l 2 +C 2 sin( 2πx l )e −4kπ 2 t/l 2 +· · ·+C n sin( nπx l )e −kn 2 π 2 t/l 2 . The solution tends to zero as time advances: all the heat eventually leaks out of the ends of the tube. Note that the terms corresponding to larger n have wavier shape and decay in time faster. 6.4 Wave IBVP Consider the IBVP ρ 0 u tt −τu xx = 0 (x ∈ (0, l), t > 0) u(0, t) = 0, u(l, t) = 0 (t ≥ 0) u(x, 0) = φ(x), u t (x, 0) = ψ(x) (x ∈ (0, l)) _ _ _ (22) where ρ 0 (x) > 0 and τ > 0. This models the small-amplitude transverse motion of a taught flexible string with fixed ends. 26 Proceeding as for the heat equation, we assume a trial solution of the form u(x, t) = X(x)T(t) and obtain two ODEs, T +λT = 0, which has the general solution T(t) = T(0) cos(t √ λ) + 1 √ λ T (0) sin(t √ λ), and the eigenvalue problem τX +λρ 0 X = 0, X(0) = 0, X(l) = 0. This is a special case of (20–21), so the results of Theorem 1 apply here also: there are real positive eigenvalues 0 < λ 1 < λ 2 < · · · with unique eigenfunctions X 1 (x), X 2 (x), . . .. If the initial conditions are linear combinations of eigenfunc- tions, that is, if φ(x) = n A n X n (x) and ψ(x) = n B n X n (x), then the solution of (22) is a superposition of shapes whose amplitudes vary sinu- soidally in time: u(x, t) = n _ A n cos(t _ λ n ) + 1 √ λ n B n sin(t _ λ n ) _ X n (x). The factors √ λ n are called natural frequencies and have units [radians per time unit]. In the case where ρ 0 is constant, the eigenvalues are λ n = (nπc/l) 2 and the eigenfunctions are X n (x) = sin(nπx/l) for n ∈ {1, 2, . . .}, where c = _ τ/ρ 0 . In this case, all the natural frequencies are integer multiples of the fundamental frequency √ λ 1 = πc/l = π l _ τ ρ 0 . From this formula we can explain various musical phenomena associated with guitar or violin strings: • the note rises by one octave (i.e. the frequency is doubled) when the string is clamped at its midpoint, because the clamping produces two vibrating strings, each half the length; • the note rises when the string is tightened, because the tightening increases the value of τ. 27 7 Numerical Solution of PDEs with Matlab • How to solve IBVPs in one spatial dimension using pdepe 7.1 Specifying an IBVP The Matlab solver pdepe solves PDEs of the form µ(x, t, u, u x )u t = x −m (x m f(x, t, u, u x )) x +s(x, t, u, u x ) (x ∈ (a, b), t ∈ (t 0 , t final ]) The constant m may be 0, 1 or 2; if m > 0 then a must be non-negative. The flux term f must depend on u x . The term µ must be non-negative, and may only be zero at mesh points. Spatial discontinuities in µ or the source term s are allowed but only at mesh points. The problem has an initial condition of the form u(x, t 0 ) = φ(x) (a ≤ x ≤ b). The boundary conditions are p left (a, t, u(a, t)) +q left (a, t)f(a, t, u(a, t), u x (a, t)) = 0, p right (b, t, u(b, t)) + q right (b, t)f(b, t, u(b, t), u x (b, t)) = 0 for t ≥ t 0 , where q left and q right are either identically zero or never zero. Thus, the mathematical problem is completely defined by the specifying the values m, a, b, t 0 , t final and by the functions µ, f, s, p left , q left , p right , q right , φ. Example 1 Consider the PDE π 2 u t = u xx on 0 < x < 1 and 0 < t ≤ 2 with boundary conditions u(0, t) = 0, u x (1, t) = −πe −t and initial condition u(x, 0) = sin(πx). This models for example the tempera- ture in a rod with cρ = π 2 and K = 1 that is insulated along its length, its left end maintained at constant zero temperature, and flux at the right end given by Ku x (1) = −πe −t (the negative sign implies that heat flows out of the rod at this end). The specification of the problem for solution by pdepe is m = 0, a = 0, b = 1, t 0 = 0, t final = 2, µ(x, t, u, u x ) = π 2 , f(x, t, u, u x ) = u x , s(x, t, u, u x ) = 0, p left (a, t, u(a, t)) = u(a, t), q left (a, t) = 0, p right (b, t, u(b, t)) = πe −t , q right (b, t) = 1, φ(x) = sin(πx). The exact solution for this problem can be obtained by the method of separation of variables: u(x, t) = e −t sin(πx). 28 Example 2 Consider the PDE u t = x −2 (x 2 f(x, t, u, u x )) x +s(x, t, u, u x ) (0 < x < 1, 0 < t ≤ 1), where f(x, t, u, u x ) = _ 5u x x ∈ (0, 0.5] u x x ∈ (0.5, 1) , s(x, t, u, u x ) = _ −1000e u x ∈ (0, 0.5] −e u x ∈ (0.5, 1) The boundary conditions are u x (0, t) = 0 and u(1, t) = 1, and the initial condition is φ(x) = _ 0 x ∈ (0, 1) 1 x = 1. The specification of the problem for solution by pdepe is m = 2, a = 0, b = 1, t 0 = 0, t final = 1, µ(x, t, u, u x ) = 1, p left (a, t, u(a, t)) = 0, q left (a, t) = 1 p right (b, t, u(b, t)) = u(b, t) −1, q right (b, t) = 0. and with f, s, φ specified as above. 7.2 Solving an IBVP The syntax of the Matlab PDE solver for a single PDE is sol = pdepe(m,pdefun,icfun,bcfun,xmesh,tspan) where m is 0, 1 or 2, pdefun is a handle to a function that computes µ, f and s, with calling syntax [mu,f,s] = pdefun(x,t,u,ux) icfun is a handle to a function that computes the initial condition φ, with calling syntax phi = icfun(x) bcfun is a handle to a function that computes the boundary condition. Its calling syntax is [pleft,qleft,pright,qright] = bcfun(a,ua,b,ub,t) where ua and ub are the values of u(a, t) and u(b, t). For m > 0 and a = 0 the solver automatically uses the boundary condition u x (0, t) = 0 and ignores the values returned in pleft and qleft. 29 xmesh is a vector of points in [a, b] where the solution is approximated. The solution interval end points a and b are xmesh(1) and xmesh(end), the values of xmesh must be monotonically increasing, and the length of xmesh must be at least 3. tspan is a vector of time values where the solution is approximated. The start and end times t 0 and t final are tspan(1) and tspan(end), the values of tspan must be monotonically increasing, and the length of tspan must be at least 3. sol is a three-dimensional array where sol(i,j,1) is the solution value at time tspan(i) and mesh point xmesh(j). (The third dimension is for systems of PDEs.) Example 1 can be coded by the functions function [mu,f,s] = pdex1pde(x,t,u,ux) mu = piˆ2; f = ux; s = 0; function phi = pdex1ic(x) phi = sin(pi * x); function [pleft,qleft,pright,qright] = pdex1bc(a,ua,b,ub,t) pleft = ua; qleft = 0; pright = pi * exp(-t); qright = 1; and solved using x = linspace(0,1,20); t = linspace(0,2,5); sol = pdepe(0,@pdex1pde,@pdex1ic,@pdex1bc,x,t); u = sol(:,:,1); surf(x,t,u) 30 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 0 0.2 0.4 0.6 0.8 1 Distance x Time t The code to solve this example is pdex1 which you can run from the Matlab command line. You can look at it using the command edit pdex1 See pdex2 for the code that solves Example 2. 31 8 Fourier Series • How to approximate a function by a linear combination of orthogonal func- tions • Fourier series and its convergence in mean square and pointwise • Solving PDEs using Fourier series 8.1 Least-Squares Approximation, Completeness Consider the approximation of a function f(x) by a linear combination N n=1 c n X n (x) of functions X 1 , X 2 , . . . that are µ-orthogonal on (a, b). Theorem 4 The coefficients c 1 , c 2 , . . . , c N that minimize the mean-square error of the approximation, E N = _ b a µ(x) _ f(x) − N n=1 c n X n (x) _ 2 dx, are the Fourier coefficients c n = _ b a µ(x)f(x)X n (x) dx _ b a µ(x)(X n (x)) 2 dx . PROOF. We use the notation (f, g) = _ b a µ(x)f(x)X n (x) dx (“inner product”) and f = _ (f, f) (“2-norm”). Then E N = f − n c n X n 2 = (f − m c m X m , f − n c n X n ) = f 2 −2 n c n (f, X n ) + m n c m c n (X m , X n ) . ¸¸ . n c 2 n X n 2 = f 2 + n X n 2 _ c n − (f, X n ) X n 2 _ 2 − n (f, X n ) 2 X n 2 , which is minimized when c n = (f, X n )/X n 2 . 2 Theorem 5 (Bessel’s inequality) The Fourier coefficients of f satisfy ∞ n=1 c 2 n X n 2 ≤ f 2 . (23) 32 PROOF. Substituting c n = (f, X n )/X n 2 into the last line of the previous proof gives N n=1 c 2 n X n 2 ≤ f 2 . Because the sequence of partial sums is monotone and bounded, the series converges and the limit satisfies (23). 2 We saw earlier that the eigenfunctions of a Sturm-Liouville problem corre- sponding to distinct eigenvalues are µ-orthogonal. The eigenfunctions corre- sponding to a single eigenvalue span a space of dimension at most 2, so one can find an orthogonal basis of the space spanned by all the eigenfunctions. The fol- lowing result, whose proof is omitted, tells about the convergence of the best least squares approximation that uses this basis. Theorem 6 The set of orthogonal eigenfunctions of a Sturm-Liouville problem is complete in the sense that for every function with finite 2-norm f, the best least squares approximation s N (x) = N n=1 (f, X n )X n (x)/X n 2 converges to f in the mean square sense: lim N→∞ f − s N = 0. Also, ∞ n=1 c 2 n X n 2 = f 2 (Parseval’s identity). Example 1 The functions sin(nπx/l) are the eigenfunctions of X +λX = 0 on (0, l) with boundary conditions X(0) = 0, X(l) = 0. The corresponding Fourier coefficients of the function f(x) = 1 (0 < x < l) are c n = _ l 0 sin(nπx/l) dx _ l 0 sin 2 (nπx/l) dx = 2(1 −(−1) n ) nπ , and the eigenfunction expansion is f(x) = 4 π _ sin(πx/l) + 1 3 sin(3πx/l) + 1 5 sin(5πx/l) +· · · _ . Some partial sums s N (x) = N n=1 c n sin(nπx/l) are: 0 1 0 1 s 1 x / l s 3 s 5 s 21 Parseval’s identity for this example gives the interesting series n=1,3,... 1 n 2 = π 2 8 . 33 8.2 Classical Fourier series The trigonometric basis functions 1, cos(πx/l), sin(πx/l), cos(2πx/l), sin(2πx/l),. . . are 2l-periodic and orthogonal on(−l, l), that is, _ l −l cos(mπx/l) cos(nπx/l) dx = 0 (m = n) _ l −l sin(mπx/l) sin(nπx/l) dx = 0 (m = n) _ l −l cos(mπx/l) sin(nπx/l) dx = 0 This can be verified using trigonometric identities; the first two orthogonality results can also be derived using the orthogonality of eigenfunctions of distinct eigenvalues for the Sturm-Liouville problem X +λX = 0 with periodic bound- ary conditions, as in problem 5 of exercise set 6. Then, using the results _ l −l dx = 2l, _ l −l cos 2 (nπx/l) dx = _ l −l sin 2 (nπx/l) dx = l (n ≥ 1), we find that the coefficients that minimize the mean square error of s N (x) = 1 2 a 0 + N n=1 a n cos(nπx/l) +b n sin(nπx/l) as an approximation of f are a n = 1 l _ l −l f(x) cos(nπx/l) dx (n ≥ 0), b n = 1 l _ l −l f(x) sin(nπx/l) dx (n ≥ 1). These are the coefficients of the classical Fourier series, which by Theorem 3 converges in the mean square sense to f provided that f is finite. Parseval’s identity can be written 1 2 a 2 0 + ∞ n=1 _ a 2 n +b 2 n _ = 1 l _ l −l (f(x)) 2 dx. Example 2 The Fourier series coefficients of the function f(x) = x/l (−l < x < l) are a n = 1 l _ l −l x l cos(nπx/l) dx = 0 (n ≥ 0), b n = 1 l _ l −l x l sin(nπx/l) dx = 2 nπ (−1) n+1 (n ≥ 1). and so the Fourier series for f is 2 π _ sin(πx/l) − 1 2 sin(2πx/l) + 1 3 sin(3πx/l) −. . . _ . 34 Some partial sums s N (x) are: !1 0 1 !1 0 1 s 1 x / l s 2 s 4 s 10 Parseval’s identity for this example gives the interesting series ∞ n=1 1 n 2 = π 2 6 . The above example illustrates the fact that the Fourier series of an odd-symmetric function has only sine terms. Similarly, the Fourier series of an even function has only cosine terms. These facts can be used to relate Fourier series with sine or co- sine series. For example, the series in Example 1 extended to the interval (−l, l) is the Fourier series of the step function f(x) = _ _ _ −1 −l < x < 0 0 x = 0 1 0 < x < l. x -1 1 -l l 8.3 Pointwise Convergence A function f is said to be piecewise continuous on the finite interval [a, b] if f(a + ) and f(b − ) exist and f is continuous on (a, b) except for a finite number of simple jumps (i.e. points of discontinuity where the left and right limits exist). A function is piecewise continuous on R if it is piecewise continuous on every finite interval. A function f is said to be piecewise C 1 on [a, b] if it is piecewise continuous on [a, b], f (a + ) and f (b − ) exist, and f exists and is continuous in (a, b) except for a finite number of simple jumps. A function is piecewise C 1 on R if it is piecewise C 1 on every finite interval. Theorem 7 (Dirichlet’s Theorem) The Fourier series of a 2l-periodic function f that is piecewise C 1 on R converges to f(x + )+f(x − ) 2 for all x. In particular, it converges to f(x) at every point x where f is continuous. The function in Example 2 can be extended to a 2l-periodic function with f(nl) = 0 for n ∈ Z: !5 !3 !1 1 3 5 !1 0 1 x / l This extended function is piecewise C 1 , with a jump of −2 at every odd multiple of 35 l. According to Theorem 4, the Fourier series converges to the extended function at every x. The oscillation near the jump that is seen in the partial sums (Gibbs’ phenomenon) does not spoil the convergence because it becomes infinitesimally narrow as the number of terms is increased. Similarly, the function in Example 1 can be extended to a 2l-periodic odd function: !5 !4 !3 !2 !1 0 1 2 3 4 5 !1 0 1 x / l This extended function is piecewise C 1 , so the Fourier series converges to it at every x. 0 1 2 0 1 2 3 s 1 s 2 s 3 x Pointwise convergence does not imply mean square conver- gence. For example, the function sequence s N (x) = N 1 +N 2 x 2 (x > 0) converges pointwise to the zero function, but does not converge in the mean-square sense because s N 2 > _ l 0 N 2 (1 + N 2 x 2 ) 2 dx = N _ Nl 0 1 (1 + y 2 ) 2 dy, and _ ∞ 0 (1 + y 2 ) −2 dy = π/4, so s N →∞. Also, mean square convergence does not imply pointwise convergence. For example, the function sequence f N (x) = _ N |x| < 1/N 3 0 otherwise (x ∈ R) x N -3 -N -3 N converges in mean square to the zero function, because _ ∞ −∞ (f N (x)) 2 dx = _ 1/N 3 −1/N 3 N 2 dx = 2 N →0, but does not converge pointwise at x = 0. 8.4 Solving PDE initial value problems Heat equation with Dirichlet boundary conditions As we saw in lecture 6, the solution of the IBVP u t −ku xx = 0 (x ∈ (0, l), t > 0) u(0, t) = 0, u(l, t) = 0 (t ≥ 0) u(x, 0) = φ(x) (x ∈ (0, l)) 36 is u(x, t) = ∞ n=1 c n sin _ nπx l _ e −k(nπ/l) 2 t , where the c n are the Fourier coefficients of the initial profile, c n = 2 l _ l 0 φ(x) sin(nπx/l) dx. 0 0.1 0.2 0 1 0 0.5 1 x/l kt/l 2 In particular, if φ(x) = 1 for 0 < x < l, we can use the coefficients from Example 1 and obtain the solution u(x, t) = ∞ n=1 2(1−(−1) n ) nπ sin _ nπx l _ e −k(nπ/l) 2 t . A plot of the partial sum with 21 terms shows the rapid decay of the higher fre- quency terms and the disappearance of the Gibbs oscillation. Wave equation with Dirichlet boundary conditions As we also saw in lec- ture 6, the solution of the IBVP u tt −c 2 u xx = 0 (x ∈ (0, l), t > 0) u(0, t) = 0, u(l, t) = 0 (t ≥ 0) u(x, 0) = φ(x), u t (x, 0) = ψ(x) (x ∈ (0, l)) is u(x, t) = ∞ n=1 _ A n cos(nπct/l) + l nπc B n sin(nπct/l) _ sin(nπx/l), where the A n and B n are the Fourier coefficients of the initial profiles, A n = 2 l _ l 0 φ(x) sin(nπx/l) dx, B n = 2 l _ l 0 ψ(x) sin(nπx/l) dx. In particular, if φ(x) = 0 and ψ(x) = 1 for 0 < x < l, we can use the coefficients from Example 1 and obtain the solution u(x, t) = ∞ n=1 2(1 −(−1) n )l n 2 π 2 c sin( nπct l ) sin( nπx l ) = ∞ n=1 2(1 −(−1) n )l n 2 π 2 c _ 1 2 cos( nπ(ct −x) l ) − 1 2 cos( nπ(ct +x) l ) _ . The second formula has the same formas the general solution of the wave equation f(x+ct) +g(x−ct). A plot of a partial sum with a large number of terms shows the time-periodic response: 37 0 1 2 0 1 !0.1 0 0.1 x/l ct/l 8.5 Heat equation with source term Consider the heat equation with Dirichlet boundary conditions µu t −(κu x ) x = 0 (x ∈ (0, l), t > 0) u(0, t) = 0, u(l, t) = 0 (t ≥ 0) u(x, 0) = φ(x) (x ∈ (0, l)) By the method of separation of variables, we have found that the source operator S(t) for this problem transforms the initial profile φ(x) into the function n (φ, X n ) X n 2 X n (x)e −λ n t , where X n are µ-orthogonal eigenfunctions corresponding to the eigenvalues λ n . Then, by Duhamel’s principle, the solution of the problem with source term, that is, of µu t −(κu x ) x = µ(x)f(x, t) (x ∈ (0, l), t > 0) u(0, t) = 0, u(l, t) = 0 (t ≥ 0) u(x, 0) = 0 (x ∈ (0, l)) _ _ _ (24) is u(x, t) = _ t 0 n (f(τ), X n ) X n 2 X n (x)e −λ n (t−τ) dτ. Assuming that integration and summation commute, the solution can be written as u(x, t) = n u n (t)X n (x), where u n (t) = _ t 0 f n (τ)e −λ n (t−τ) dτ (25) with f n (τ) = (f(τ), X n ) X n 2 = _ l 0 µ(ξ)f(ξ, τ)X n (ξ) dξ _ l 0 µ(ξ)(X n (ξ)) 2 dξ . 38 Here is an alternative derivation of the solution of (24). Substituting an as- sumed solution of the form u(x, t) = m u m (t)X m (x) into the PDE gives µ(x)f(x, t) = m (µu m X m −u m (κX m ) ) = m µ(u m +λ m u m )X m . Multiplying through by X n /X n 2 and integrating gives the decoupled ODEs 1 X n 2 (f(t), X n ) . ¸¸ . f n (t) = m (u m +λ m u m )(X m , X n )/X n 2 = u n (t) +λ n u n (t), each of which (with initial condition u n (0) = 0) has the solution (25). For example, for the constant-coefficient heat equation problem u t −ku xx = 1 (x ∈ (0, l), t > 0) u(0, t) = 0, u(l, t) = 0 (t ≥ 0) u(x, 0) = 0 (x ∈ (0, l)) 0 1 0 0.2 0.4 0 0.05 0.1 kt/l 2 x/l we have f n (t) = 2 l _ l 0 sin(nπξ/l) dξ = 2(1 −(−1) n ) nπ and so u(x, t) = ∞ n=1 u n (t) sin(nπx/l) with u n (t) = 2(1 −(−1) n ) nπ _ t 0 e −k(nπ/l) 2 (t−τ) dτ = 2(1 −(−1) n ) kn 3 π 3 /l 2 (1 −e −k(nπ/l) 2 t ). 39 9 Laplace’s Equation • Vector Analysis facts • Diffusion and Heat flow in three dimensions • Membrane vibration • Laplace’s equation 9.1 Some Facts from Vector Analysis Let D be an open simply connected spatial domain with surface ∂D, let n be the outward unit normal, and let f be a vector field. Gauss’s divergence theorem is _ D ∇· f dV = _ ∂D f · ndA, where the divergence of the vector field having cartesian coordinates f = f 1 i + f 2 j +f 3 k is ∇· f = ∂f 1 ∂x + ∂f 2 ∂y + ∂f 3 ∂z . The gradient of a scalar field u(x) in cartesian coordinates is the vector ∇u = ∂u ∂x i + ∂u ∂y j + ∂u ∂z k. Applying the divergence theorem to f = v∇u, where u and v are scalar fields, yields Green’s first identity _ ∂D (v∇u) · ndA = _ D (∇v · ∇u +v∆u) dV where ∆u = ∇· ∇u = u xx +u yy +u zz is the laplacian of u. In two dimensional problems, D denotes a two-dimensional domain and ∂D denotes the closed curve that is its boundary. The divergence theorem is written _ D ∇· f dA = _ ∂D f · ndl, and Green’s first identity is written _ ∂D (v∇u) · ndl = _ D (∇v · ∇u +v∆u) dA. 9.2 Heat Flow in Three Dimensions Consider a substance (e.g. mass or energy) flowing in a region Ω of space. Let u(x, t) denote its density (units: [quantity] · [volume] −1 ) as a function of position x = [x, y, z] and time t, and let φ(x, t) denote the flux vector. (units: [quantity] · [time] −1 · [area] −1 ). The amount of substance in a domain D ⊆ Ω is given by the volume integral _ D u(x, t) dV . 40 Letting n denote the unit normal vector on the surface ∂D of the domain D, the net flux out of the domain is given by _ ∂D φ · ndA. Let f(x, t, u) denote the source term, that is, the rate (units: [quantity] · [time] −1 · [volume] −1 ) at which substance density increases by processes other than flux, for example chemical reaction. The rate of increase of the total amount of substance in the interval is then d dt _ D u(x, t) dV = − _ ∂D φ · ndA + _ D f(x, t, u)dV. Using the divergence theorem, the surface integral can be replaced by a volume integral, yielding _ D _ u t +∇· φ −f _ dV = 0. Because D is arbitrary, this implies that the conservation equation u t +∇· φ = f should hold at every point in the region Ω. Diffusion processes, whereby substance flows from areas of high concentra- tion to areas of low concentration, can be modelled by the constitutive relation (Fick’s law) φ = −k∇u, where k(x) is a material parameter (diffusivity, units: [length] 2 ·[time] −1 ). Sub- stituting this into the conservation equation gives the three-dimensional diffusion equation u t −∇· (k∇u) = f. When k is constant, the equation reduces to u t −k∆u = f. Alternatively, we can let u = cρT denote density of heat energy, where c(x) and ρ(x) are material parameters (specific heat and mass per unit length) and T is the temperature. The constitutive relation (Fourier’s law) φ = −K∇T models conduction, whereby heat flows from hot areas to colder areas. The ma- terial parameter K(x) is called the heat conductivity. Substituting Fourier’s law into the conservation equation gives the three-dimensional heat equation cρT t −∇· (K∇T) = f. This equation is very similar to the diffusion equation, and is essentially identical to it (except for notation) when cρ is constant. 9.3 Membrane Vibration Let u(x, y, t) denote the displacement of a thin membrane that moves in the z di- rection (“vertical”) only. 41 Horizontal force balance: Let T(x, y, t) be the tension (units [force] · [length] −1 ), as- sumed to act tangentially along the mem- brane. Let D be a domain in the xy (“horizontal”) plane, let ∂D be its bound- ary curve, and let n denote the unit out- ward normal vector (in the xy plane) on ∂D. Let u n = n · ∇u denote the direc- tional derivative of u in the direction n; then θ = tan −1 (n · ∇u) is the angle between n and the tension vector. Because there is no horizontal motion, the vector sum of the horizontal forces acting on the boundary must be zero, that is, _ ∂D T cos θ ndl = 0. Then, for any constant vector a, we have a · 0 = a · _ ∂D T cos θ ndl = _ ∂D (aT cos θ) · ndl = _ D ∇· (aT cos θ) dA = a · _ D ∇(T cos θ) dA, and since a is arbitrary, this implies _ D ∇(T cos θ) dA = 0. Because the domain is arbitrary, this in turn implies ∇(T cos θ) = 0, so that T cos θ is constant with respect to x and y, say T(x, y, t) cos θ(x, y, t) = τ(t). Mass conservation: Let ρ(x, y, t) be the membrane’s mass per unit area (ρ may vary as the membrane deforms during the motion), and let ρ 0 (x, y) be the mass per unit area when the membrane is plane. If dA represents an area element of deformed membrane and dA represents the same element when the membrane is plane, then mass conservation requires that ρ dA = ρ 0 dA. Vertical force balance: Consider a membrane piece whose projection onto the xy plane is D. By Newton’s law, the net vertical force on this piece is equal to the time derivative of the momentum: d dt _ D u t ρ dA = _ ∂D T sin θ dl = _ ∂D T cos θ tan θ dl = _ ∂D τ∇u · ndl = _ D τ∇· (∇u) dA. Using mass conservation gives _ D (ρ 0 u tt −τ∆u) dA = 0, which implies ρ 0 u tt −τ∆u = 0. Denoting c = _ τ/ρ 0 , this can be written u tt = c 2 ∆u, which is the two-dimensional wave equation. 42 9.4 Laplace’s Equation If the source term in the diffusion equation is constant, then the steady state equi- librium concentration is described by the diffusion equation with the time deriva- tive terms removed: −∇· (k∇u) = f. When k is constant this reduces to the Poisson equation −∆u = F where F = f/k. The Poisson equation with no source term is Laplace’s equation ∆u = 0. Similar equations arise as models of steady state heat flow. A membrane sub- jected to a transversal static load f(x) is modelled by a two-dimensional Poisson equation −τ∆u = f. Laplace’s and Poisson’s equations also arise as models of gravitational fields, elec- trostatic fields, stationary fluid flow, brownian motion, and many other phenom- ena. Any function that satisfies Laplace’s equation is called a harmonic function. In one dimension, Laplace’s equation is u xx = 0, so one-dimensional harmonic functions are all of the formu(x) = A+Bx. Things get more interesting in higher dimensions, however! The following results holds in the one, two, and three (and higher!) dimensional versions of Laplace’s equation. Theorem 8 (Maximum Principle) If u is harmonic in a connected bounded open set Ω, and continuous in ¯ Ω = Ω∪∂Ω, then the maximum value of u is attained on the boundary ∂Ω. Proof. Let > 0 and v(x) = u(x) + N i=1 x 2 i . If v has a maximum at a point x ∈ Ω, the hessian matrix v xx = [ ∂ 2 v ∂x i x j ] is negative semidefinite, which implies ∂ 2 v ∂x 2 i ≤ 0 for every i. But ∆v = i ∂ 2 v ∂x 2 i = ∆u .¸¸. =0 +2N > 0, so v cannot have a maximum inside Ω. Because v is continuous, it has a maximum somewhere in the compact set ¯ Ω, say at x ∗ ∈ ∂Ω. Then, for all x ∈ ¯ Ω, u(x) ≤ v(x) ≤ v(x ∗ ) = u(x ∗ ) + i (x ∗ i ) 2 ≤ u(x 0 ) + max x∈∂Ω |x| 2 where x 0 ∈ ∂Ω is a point where u(x 0 ) = max x∈∂Ω u(x). Then taking → 0, we have u(x) ≤ u(x 0 ) for all x ∈ ¯ Ω, which completes the proof. Corollary 1 (Minimum Principle) For u as in Theorem 1, the minimum value is attained on the boundary ∂Ω. Proof. Apply the maximum principle to the harmonic function −u. 2 43 Example 1 Find the maximum value of f(x, y) = x 2 − y 2 in the unit disk x 2 +y 2 ≤ 1. Solution. Because ∆f = 0, the maximum occurs on the disk boundary. Using po- lar coordinates, f = cos 2 θ −sin 2 θ = cos(2θ) on the boundary, and the maximum value is 1, attained at the points (x, y) = (1, 0) and at (x, y) = (−1, 0). 2 Example 2 Prove that the Dirichlet problem −∆u = f in connected bounded Ω, u = h on ∂Ω. has at most one solution. Solution. If u 1 and u 2 are two solutions, their difference w = u 1 −u 2 is harmonic in Ω and w = 0 on ∂Ω. By the maximum/minimum principle, 0 = min x∈∂Ω w(x) ≤ w(x) ≤ max x∈∂Ω w(x) = 0, for all x ∈ ¯ Ω, and so w ≡ 0, that is, u 1 ≡ u 2 . An alternative solution is based on Green’s first identity: _ ∂Ω w .¸¸. =0 ∇w · ndA = _ Ω |∇w| 2 +w ∆w .¸¸. =0 dV Thus ∇w ≡ 0, so w is constant, and the constant is zero because w is continuous and is zero on the boundary. 2 The following result indicates that the laplacian is suitable for modelling isotropic physical phenomena, in which there is no preferred direction. A rotation of the coordinate axes corresponds to a linear transformation x = Bx with orthogonal B (that is, B T B = I) and det(B) = 1. (An orthogonal B with det(B) = −1 models a rotation with reflection.) Theorem 9 (Rotational invariance of laplacian) If u (x ) = u(B T x ) with or- thogonal B then ∆ u = ∆u. Proof. By the chain rule we have ∂u ∂x i = l ∂u ∂x l ∂x l ∂x i .¸¸. b il and ∂ 2 u ∂x i ∂x j = l p ∂ 2 u ∂x l ∂x p b il b jp = (Bu xx B T ) ij . Then ∆ u = tr(u x x ) = tr(Bu xx B T ) = tr(B T Bu xx ) = tr(u xx ) = ∆u. Theorem 10 (Mean value property) If u is harmonic in the ball D = {x : |x − x | = a} then the value at the centre u(x ) is equal to the mean value on the ball boundary. 44 Proof. Moving the origin to x , the mean value of u on the boundary of the three dimensional ball is given by m(a) = _ ∂D u dA A = 1 4πa 2 _ 2π 0 _ π 0 u(a, θ, φ)a 2 sin θ dθ dφ. From Green’s first identity with v ≡ 1 4πa 2 and ∆u = 0 we have 0 = _ |x|=a v∇u · ndA = 1 4π _ 2π 0 _ π 0 u r (a, θ, φ) sin θ dθ dφ = m (a), so that the mean value on the ball surface is independent of the ball’s radius. Taking a →0 gives m = u(0). The proof for one and two dimensions is similar. 2 According to the maximum principle (Theorem 1), harmonic functions attain their maximum on the boundary. Using the mean value property we can show that the maximum is not attained inside the region, unless the function is constant. Corollary 2 If u is harmonic in an open connected region Ω, is continuous in ¯ Ω = Ω ∪ ∂Ω, and attains its maximum in Ω, then u is constant in Ω. Section 2.4, Laplace’s Equation 47 x 0 x 1 x 2 x m ! " x 3 Figure 2.1: Diagram for Proof of Maximum Principle. Proof. Suppose u attains its maximum M := max ¯ u at a point x 0 ∈ . We wish to show that at any other point x m ∈ we must have u(x m ) = M. Let the curve ⊂ connect x 0 and x m , and choose the finite set of points x 1 , x 2 , . . . x m−1 on to be centers of balls contained , and arranged so that the point x i +1 lies on the surface ∂ B i of the ball B i centred at the previous point x i . The values on ∂ B 0 are all less than or equal to M. But, by the mean value property (Theorem 2.17) u(x 0 ) must be equal to the average of the values on the ball’s surface, and so the surface values must all be equal to M. In particular, u(x 1 ) = M. With similar arguments we obtain u(x i ) = M for i = 2, 3, . . . m (Figure 2.1). The proof for the minimum is similar. From Theorem 2.18 we can obtain the results of section 2.2.1 on con- tinuous dependence on boundary data and monotonicity of solutions of the Dirichlet problem. 2.4.4 Existence of Solution This chapter has given several uniqueness results but has not yet said anything about the existence of the solution. We close the chapter with a few words about this. The Dirichlet problem can in fact fail to have a solution if there are sharp enough “spikes” that penetrate into the domain . In the absence of such spikes, however, a solution will exist; see [9, p.198] for details. Domains encountered in applications are unlikely to cause trouble in this regard. An alternative is to replace the PDE by an integral formulation of the boundary value problem that doesn’t require so much smoothness in the solution. Such variational or weak formulations are the starting point for the theory of numerical methods such as the Finite Element Method. Proof. Suppose u attains its maximum M := max¯ Ω u at a point x 0 ∈ Ω. We wish to show that at any other point x m ∈ Ω we must have u(x m ) = M. Let the curve Γ ⊂ Ω connect x 0 and x m , and choose the finite set of points x 1 , x 2 , . . . x m−1 on Γ to be centers of balls contained Ω, and ar- ranged so that the point x i+1 lies on the sur- face ∂B i of the ball B i centred at the previ- ous point x i . The values on ∂B 0 are all less than or equal to M. But, by the mean value property u(x 0 ) must be equal to the average of the values on the ball’s sur- face, and so the surface values must all be equal to M. In particular, u(x 1 ) = M. With similar arguments we obtain u(x i ) = M for i = 2, 3, . . . m. x y z r ! ! In spherical coordinates the laplacian is ∆u = 1 r 2 _ r 2 u r _ r + 1 r 2 sin θ (u θ sin θ) θ + 1 r 2 sin 2 θ u φφ Harmonic functions in three dimensions that depend only on r satisfy the ODE (r 2 u r ) r = 0, which has the general solution u(r) = c 1 r −1 + c 2 . In cylindrical polar coordinates the laplacian is ∆u = 1 R _ (Ru R ) R + 1 R (u θ ) θ + (Ru z ) z _ . Harmonic functions that depend only on distance R from the z-axis satisfy the ODE (Ru R ) R = 0, which has the general solution u(R) = c 1 ln(R) +c 2 . 45 Example 3 Acircular membrane with a uniformtransverse load and fixed bound- ary is modelled by ∆u = 1 in the domain x 2 +y 2 < a 2 with u = 0 on the boundary. Find the shape of the membrane. Solution. Assuming a solution of the formu(R), we have the ODE R −1 (Ru R ) R = 1, which has the solution u(R) = c 1 ln(R) + c 2 + 1 4 R 2 . Taking c 1 = 0 (to ensure the solution remains bounded on the z axis) and c 2 = −a 2 /4 to ensure u(a) = 0, we have u(R) = (R 2 −a 2 )/4. Theorem 11 (Dirichlet’s Principle) Among all the functions w that satisfy w = h on ∂Ω, the one that minimizes the “energy” E(w) = 1 2 _ Ω |∇w| 2 dV is har- monic. Proof. Let u = w = h on ∂Ω and ∆u = 0 in Ω. Then, with v = u −w, we have E(w) = 1 2 _ Ω |∇(u −v)| 2 dV = 1 2 _ Ω (∇u −∇v) · (∇u −∇v) dV = E(u) + E(v) − _ Ω ∇u · ∇v dV Green’s first identity gives _ Ω ∇u · ∇v dV = _ ∂Ω v .¸¸. =0 ∇u · ndA − _ Ω v ∆u .¸¸. =0 dV = 0, so E(w) ≥ E(u). 2 The Dirichlet principle motivates the Rayleigh-Ritz method for computing an approximate solution of the Dirichlet problem of Example 2. Choose functions w 0 , w 1 , . . . , w n such that w 0 = h and w 1 = · · · = w n = 0 on ∂Ω, and consider the linear combination w = w 0 +c 1 w 1 +· · · +c n w n . Then E(w) = 1 2 _ Ω _ ∇w 0 + n i=1 c i ∇w i _ · _ ∇w 0 + n j=1 c j ∇w j _ dV = 1 2 a −b T c + 1 2 c T Ac, where a = _ Ω |∇w 0 | 2 dV , b i = − _ Ω ∇w 0 · ∇w i dV , and A ij = _ Ω ∇w i · ∇w j dV . This energy is minimized when c = A −1 b, because E(w) = 1 2 a −b T (c −A −1 b +A −1 b) + 1 2 (c −A −1 b +A −1 b) T A(c −A −1 b +A −1 b) = 1 2 (a −b T A −1 b) + 1 2 (c −A −1 b) T A(c −A −1 b), and A is symmetric positive definite. Example 4 Find an approximate solution to ∆u = 0 on the triangle {(x, y) : x > 0, y > 0, 3x +y < 3} with the boundary conditions u(x, 0) = 0, u(0, y) = 3y −y 2 , u(x, 3 −3x) = 0. 46 0 1 0 1 2 3 0 1 2 x y u Solution. With w 0 = (3−3x−y)y and w 1 = (3−3x−y)xy we have b 1 = − _ 1 0 _ 3−3x 0 ∂w 0 ∂x ∂w 1 ∂x + ∂w 0 ∂y ∂w 1 ∂y dy dx = −9 20 A 11 = _ 1 0 _ 3−3x 0 _ ∂w 1 ∂x _ 2 + _ ∂w 1 ∂y _ 2 dy dx = 3 2 c 1 = b 1 /A 11 = − 3 10 so the approximate solution is w 0 − 3 10 w 1 = y(3 −3x −y)(1 −0.3x). 47 10 Solving Two-Dimensional Laplace Equations • Laplace equation boundary value problems in a disk, a rectangle, a wedge, and in a region outside a circle 10.1 Dirichlet Problem in a disk Consider the two dimensional Laplace equation in the disk x 2 + y 2 < a 2 with u = h on the boundary. The Laplace equation in polar coordinates (r, θ) is (ru r ) r + 1 r (u θ ) θ = 0 A “separation of variables” trial solution u(r, θ) = R(r)Θ(θ) gives R Θ + 1 r R Θ + 1 r 2 RΘ = 0 which can be rearranged to r 2 R R + rR R = − Θ Θ . Equating both sides to the separation constant λ, we are left with two ODEs, Θ +λΘ = 0 (26) and r 2 R +rR −λR = 0. (27) For λ = 0, the general solution of (26) is Θ(θ) = Acos √ λθ + Bsin √ λθ. Substituting this into the periodic boundary conditions Θ(0) = Θ(2π) and Θ (0) = Θ (2π) gives the homogeneous equations A(−1 + cos(2π √ λ)) + Bsin(2π √ λ) = 0 −A √ λsin(2π √ λ) +B √ λ(−1 + cos(2π √ λ)) = 0 This system of equations has a nontrivial solution (that is, a solution other than A = B = 0) if the determinant of the coefficient matrix is zero. The determinant is 2 √ λ(1−cos(2π √ λ)), and the nonzero values of λ that give a nontrivial solution are λ n = n 2 with n = 1, 2, . . . For λ = 0, the general solution of (26) is Θ(θ) = A + Bθ, and the only nontrivial periodic solution is Θ(θ) = A (nonzero constant). Consider now the equation (27). For λ = 0, a trial solution of the formR(r) = r α gives (α 2 −λ)r α = 0, which implies the solutions α = ± √ λ = ±n. For λ = 0, (27) reduces to r(rR ) = 0, which has the general solution R(r) = c 1 ln r +c 2 . 48 Writing the solution as a linear combination of the solutions found above, we have u(r, θ) = c 1 ln r +c 2 + n≥1 (A n cos nθ +B n sin nθ)r n + n≥1 ( ˜ A n cos nθ + ˜ B n sin nθ)r −n (28) To ensure continuity and boundedness at the origin, we set c 1 = ˜ A n = ˜ B n = 0, leaving us with u(r, θ) = 1 2 A 0 + n≥1 (A n cos nθ +B n sin nθ)r n where the constant term c 2 has been renamed 1 2 A 0 . At the boundary r = a we have u(a, θ) = 1 2 A 0 + n≥1 (A n cos nθ +B n sin nθ)a n = h(θ) and the coefficents are determined by equating A n a n and B n a n with the Fourier series coefficients of h: u(r, θ) = 1 2π _ π −π h(θ ) dθ + n≥1 __ 1 π _ π −π h(θ ) cos nθ dθ _ cos nθ + _ 1 π _ π −π h(θ ) sin nθ dθ _ sin nθ _ _ r a _ n (29) Example 1 Find the steady-state temperature in a long cylinder of radius a if the upper half is kept at u = 100 and the lower half is kept at u = 0. Solution. The boundary function is h(θ) = 50 + 50f(θ) where f(θ) = _ _ _ −1 −π < θ < 0 0 θ = 0 1 0 < θ < π. ! -1 1 -! " In section 8 we derived the Fourier series f(θ) = n≥1 2(1 −(−1) n ) nπ sin(nθ), so the PDE solution can be written directly as u(r, θ) = 50+50 n≥1 2(1 −(−1) n ) nπ _ r a _ n sin(nθ) Plotting the sum of a large number of terms gives the above figure. 2 49 The series solution (29) for the Dirichlet problem in the disk can be written as u(r, θ) = 1 2π _ π −π h(θ ) _ 1 + 2 n≥1 _ r a _ n cos n(θ −θ ) _ dθ (30) Letting z = r a e i(θ−θ ) , the term in brackets can be written 1 + n≥1 z n + ¯ z n = 1 + z 1 −z + ¯ z 1 − ¯ z = 1 −z¯ z (1 −z)(1 − ¯ z) = 1 −|z| 2 1 +|z| 2 −(z + ¯ z) = 1 −(r/a) 2 1 + (r/a) 2 −2(r/a) cos(θ −θ ) Substituting this into (30) gives the Poisson integral formula u(r, θ) = 1 2π _ π −π h(θ ) _ a 2 −r 2 a 2 +r 2 −2ar cos(θ −θ ) _ dθ . One application of this formula is to provide an alternative derivation of the mean value property: the value at r = 0 is 1 2π _ π −π h(θ ) dθ , which is the average of u on the circumference r = a. 10.2 Dirichlet Problem in a rectangle a b y x u = g u = 0 u = 0 u = 0 u xx + u yy = 0 Consider the two dimensional Laplace equation ∆u = 0 in the rectangle (0, a) ×(0, b) with u(x, b) = g(x) and u = 0 on the rest of the boundary. Substituting a solution of the form u(x, y) = X(x)Y (y) into u xx +u yy = 0 gives X Y +XY = 0, which can be rearranged to X −X = Y Y . Equating both sides to the separation constant λ, we are left with two ODEs, X +λX = 0 (31) and Y −λY = 0. (32) For λ = 0, the general solution of (31) is X = Acos √ λx + Bsin √ λx. Substi- tuting this into the boundary conditions X(0) = 0 and X(a) = 0 gives A = 0 and Bsin( √ λa) = 0, and the nonzero values of λ that give a nontrivial solution are λ n = (nπ/a) 2 with n = 1, 2, . . .. For λ = 0, the general solution of (31) is X(x) = A + Bx, and there is no nontrivial solution satisfying the boundary conditions. The general solution of (32) with λ = (nπ/a) 2 is Y (y) = Acosh(nπy/a) + Bsinh(nπy/a). The boundary condition Y (0) = 0 is satisfied by setting A = 0. 50 Writing the solution as a linear combination of the solutions found above, we have u(x, y) = n≥1 B n sin(nπx/a) sinh(nπy/a) At the boundary y = b, this is u(x, b) = n≥1 B n sin(nπx/a) sinh(nπb/a) = g(x). The coefficients are obtained by equating B n sinh(nπb/a) with the Fourier sine series coefficients of g(x): u(x, y) = n≥1 _ 2 a _ a 0 g(x ) sin(nπx /a) dx _ sin(nπx/a) sinh(nπy/a) sinh(nπb/a) (33) Example 2 Find the steady-state temperature in a long prismatic tube with square a × a cross-section if the top face is kept at u = 1 and other three faces are kept at u = 0. Solution. The boundary function is g(x) = 1, whose Fourier sine series was found in section 8 to be g(x) = n≥1 2(1 −(−1) n ) nπ sin(nπx/a). The Dirichlet problem solution is then u(x, y) = n≥1 2(1 −(−1) n ) nπ sin(nπx/a) sinh(nπy/a) sinh(nπ) Plotting the sum of a large number of terms gives the above figure. 2 The solution for the general Dirichlet problem in the rectangle is found by superposition of (33) and solutions of similar problems: • For u(x, 0) = h(x), and u = 0 elsewhere 0 0 0 h , the solution is u(x, y) = n≥1 _ 2 a _ a 0 h(x ) sin(nπx /a) dx _ sin(nπx/a) sinh(nπ(b −y)/a) sinh(nπb/a) This is found by replacing y by b−y [the laplacian is invariant to reflection] and g by h in (33). • For u(a, y) = k(y), and u = 0 elsewhere 0 0 0 k , the solution is u(x, y) = n≥1 _ 2 b _ b 0 k(y ) sin(nπy /b) dy _ sin(nπy/b) sinh(nπx/b) sinh(nπa/b) which is found by swapping x ↔y and a ↔b and replacing g by k in (33). 51 • for u(0, y) = j(y), and u = 0 elsewhere 0 0 0 j , the solution is u(x, y) = n≥1 _ 2 b _ b 0 j(y ) sin(nπy /b) dy _ sin(nπy/b) sinh(nπ(a −x)/b) sinh(nπa/b) . 10.3 Dirichlet-Neumann Problem in a wedge u r = h u = 0 u = 0 ! Consider the two dimensional Laplace equation in the sector {(r, θ) : 0 < θ < γ, r < a}, with boundary conditions u = 0 on the rays θ = 0 and θ = γ and a Neumann condition u r = h on the perimeter r = a. Assuming a solution of the form u(r, θ) = R(r)Θ(θ) and proceeding as for the disk, we obtain the ODEs (26) and (27). From the boundary conditions Θ(0) = Θ(γ) = 0 we obtain Θ(θ) = sin(nπθ/γ) with n = 1, 2, . . . and R(r) = r ±nπ/γ . Writing the solution as a linear combination, we have u(r, θ) = n≥1 B n sin(nπθ/γ)r nπ/γ + ˜ B n sin(nπθ/γ)r −nπ/γ To ensure boundedness at the origin, we set ˜ B n = 0, leaving u(r, θ) = n≥1 B n sin(nπθ/γ)r nπ/γ Substituting this into the Neumann boundary condition gives h(θ) = u r (a, θ) = n≥1 nπ γ B n sin(nπθ/γ)a nπ γ −1 and the coefficients are determined by equating nπ γ B n a nπ γ −1 with the Fourier sine coefficients of h(θ), leading finally to u(r, θ) = n≥1 γa nπ _ 2 γ _ γ 0 h(θ ) sin(nπθ /γ) dθ _ sin(nπθ/γ) _ r a _ nπ/γ In a nonconvex sector having γ > π, the term r π γ −1 in the first term of the series for u r is unbounded as r → 0, and so this solution does not, strictly speaking, satisfy the PDE — in fact, the problem does not have a solution (having second derivatives continuous up to the boundary) in this case. Example 3 Solve ∆u = 0 in a γ = π/2 sector with u = 0 on the rays and u r = 1 on the perimeter r = a. Solution. We have 2 γ _ γ 0 h(θ ) sin(nπθ /γ) dθ = 2(1 −(−1) n ) nπ and so u(r, θ) = n≥1 (1 −(−1) n )a n 2 π sin(2nθ) _ r a _ 2n . Notice that Gibbs oscillation is not visible in the plot of the solution surface. 2 52 10.4 Dirichlet Problem in the region outside a circle Consider the two dimensional Laplace equation in the region x 2 + y 2 > a 2 with u = h on the boundary and u bounded at infinity. We can proceed as in section 10.1 up to formula (28). To ensure the solution is bounded at infinity, we set c 1 , A n and B n to zero, leaving u(r, θ) = 1 2 ˜ A 0 + n≥1 ( ˜ A n cos nθ + ˜ B n sin nθ)r −n Imposing the boundary condition on the circle perimeter gives h(θ) = u(a, θ) = 1 2 ˜ A 0 + n≥1 ( ˜ A n cos nθ + ˜ B n sin nθ)a −n The coefficients are determined by equating a −n ˜ A n and and a −n ˜ B n to the Fourier coefficients of h, leading to u(r, θ) = 1 2π _ π −π h(θ ) dθ + n≥1 __ 1 π _ π −π h(θ ) cos nθ dθ _ cos nθ + _ 1 π _ π −π h(θ ) sin nθ dθ _ sin nθ _ _ a r _ n . (34) An alternative derivation is to use the change of variables r = a 2 /r and u (r , θ) = u(a 2 /r , θ). By the chain rule, u r = ∂u ∂r = ∂u ∂r ∂r ∂r = − a 2 (r ) 2 u r and 1 r (r u r ) r = 1 r (− a 2 r u r ) r = r a 2 (−ru r ) r ∂r ∂r = _ r a _ 4 1 r (ru r ) r and so ∆ u = 1 r (r u r ) r + 1 (r ) 2 (u θ ) θ = _ r a _ 4 ∆u. Thus, if ∆ u = 0 inside the circle then ∆u = 0 outside it. The solution inside the circle is (29) written with u and r , and applying the change of variables to this solution gives (34). Similarly, the Poisson integral formula for the disk interior is transformed to u(r, θ) = 1 2π _ π −π h(θ ) _ r 2 −a 2 a 2 +r 2 −2ar cos(θ −θ ) _ dθ . for the exterior. Example 4: Stationary flow past a circular cylinder The steady-state two- dimensional velocity field for the irrotational flow of an incompressible inviscid constant-density fluid is given by ψ y i−ψ x j, where ψ is a harmonic function called the stream function. Because the velocity is orthogonal to ∇ψ, the lines of con- stant ψ (called streamlines) are tangential to the velocity field. 53 Find the streamlines for flow past a long circular cylinder of radius a whose axis is the z axis, assuming the flow far from the cylinder to be constant in the x direction, that is, ψ = Uy. Solution. The stream function satisfies the two dimensional Laplace equation on the exterior of the circle r = a. The radial component of the velocity is zero on the cylinder boundary, that is, the cylinder boundary is a streamline, which gives the boundary condition ψ =constant (say, zero) for r = a. Substituting this into the general solution (28) we find c 1 ln a +c 2 = 0 A n a n + ˜ A n a −n = 0 B n a n + ˜ B n a −n = 0 so that ψ(r, θ) = c 1 ln r a + n≥1 _ r n − a 2n r n _ (A n cos nθ +B n sin nθ) In order to satisfy the condition ψ = Uy = Ur sin θ at r → ∞ we set B 1 = U and the remaining A n and B n coefficients to zero, leaving ψ(r, θ) = c 1 ln r a +U _ 1 − a 2 r 2 _ r sin θ. Here are streamlines for various c 1 values, which correspond to different cylinder clockwise rotation speeds: c 1 = 0 c 1 = Ua c 1 = 2Ua c 1 = 2.1Ua The closely spaced streamlines correspond to regions of low pressure and indicate the presence of a net “lift” force in the y direction (Magnus effect). 54 11 Green’s Functions 11.1 Green’s Function for One-Dimensional Equation The Green’s function provides a complete solution to a boundary value problem in much the same way that an inverse matrix provides a general solution for systems of linear equations. In this section the Green’s function is introduced in the context of a simple one-dimensional problem. Some of the proofs use the identity _ b a (uv −vu ) dx = ¸ ¸ ¸ b a uv −vu . This can be obtained by integrating (uv −vu ) = uv −vu . Asingularity function K(x, ξ) of the operator Ldefined by Lu(x) = −u (x)− c(x)u(x) is characterised by three properties: 1. K is continuous; 2. K x is continuous in x < ξ and in x > ξ, and K x (x + , x) −K x (x − , x) = −1; 3. K xx is continuous and LK = 0 for x = ξ. Note that the three properties do not define a singularity function uniquely: if K is a singularity function then so is K + H, where H(x, ξ) is any function with continuous H and H x and with LH = 0. The Green’s function G(x, ξ) for the operator L and the domain (a, b) with Dirichlet boundary conditions is the singularity function that satisfies the homo- geneous Dirichlet conditions G(a, ξ) = 0 and G(b, ξ) = 0. The Green’s function provides the solution to the boundary value problem with Dirichlet boundary con- ditions: Theorem 12 If u satisfies the differential equation u + cu = −f on (a, b) and the boundary conditions u(a) = 0, u(b) = 0, then u(ξ) = _ b a G(x, ξ)f(x) dx (35) for all ξ ∈ (a, b). Proof. Letting v(x) = G(x, ξ), we have _ b a vf dx = _ ξ − a uv −vu dx + _ b ξ + uv −vu dx = ¸ ¸ ¸ ξ − a uv −vu + ¸ ¸ ¸ b ξ + uv −vu = ¸ ¸ ¸ b a uv −vu . ¸¸ . 0 −u(ξ) ¸ ¸ ¸ ξ + ξ − v . ¸¸ . −1 + ¸ ¸ ¸ ξ + ξ − vu . ¸¸ . 0 , which completes the proof. 2 55 The load (or source) function f in the differential equation −u − cu = f can be thought of as a superposition of “point” loads f(x) = δ(x −ξ)f(ξ)dξ, where δ(x − ξ) is concentrated at ξ and has unit magnitude (i.e. _ δ dx = 1). Then formula (35) represents the solution as a weighted sum of Green’s functions, where each G(ξ, x) is the solution to −u (x) = δ(x − ξ). The Green’s function can thus be thought of as the “response” to a unit point load. The Green’s function also provides the solution of the boundary value problem with nonhomogeneous boundary conditions: Theorem 13 The solution of u + cu = 0 with boundary conditions u(a) = h 0 and u(b) = h 1 satisfies u(ξ) = G x (a, ξ)h 0 −G x (b, ξ)h 1 (36) for all ξ ∈ (a, b). Proof. Denoting v(x) = G(x, ξ), we have 0 = _ ξ − a (uv −vu ) dx + _ b ξ + (uv −vu ) dx = ¸ ¸ ¸ ξ − a (uv −vu ) + ¸ ¸ ¸ b ξ + (uv −vu ) = ¸ ¸ ¸ b a (uv −vu ) − ¸ ¸ ¸ ξ + ξ − (uv −vu ) = ¸ ¸ ¸ b a uv +u(ξ), which completes the proof. 2 The following result tells us that the response at x to a point load applied at ξ is equal to the response at ξ to a point load applied at x. Theorem 14 (Reciprocity Principle) G(x, ξ) = G(ξ, x) for all x, ξ ∈ (a, b). Proof. Let y and η be distinct points in (a, b) with y < η, let u(x) = G(x, η) and v(x) = G(x, y). Then 0 = _ y − a uv −vu dx + _ η − y + uv −vu dx + _ b η + uv −vu dx = ¸ ¸ ¸ y − a uv −vu + ¸ ¸ ¸ η − y + uv −vu + ¸ ¸ ¸ b η + uv −vu = ¸ ¸ ¸ b a uv −vu . ¸¸ . 0 − ¸ ¸ ¸ y + y − uv −vu . ¸¸ . −u(y) − ¸ ¸ ¸ η + η − uv −vu . ¸¸ . v(η) , leaving u(y) − v(η) = 0, that is, G(y, η) − G(η, y) = 0. The proof for y > η is similar. 2 As a consequence of Theorem 2, we can rewrite formula (35) as u(x) = _ b a G(x, ξ)f(ξ) dξ. 56 and formula (36) as u(x) = G ξ (x, a)h 0 −G ξ (x, b)h 1 . A singularity function of − d 2 dx 2 is given by K(x, ξ) = − 1 2 |x −ξ|, as can readily be verified. The Green’s function for the interval (0, 1) can be 0 1 0 1 0 0.25 x ! G found by solving H xx = 0 with boundary conditions H(0, ξ) = −K(0, ξ) and H(1, ξ) = −K(1, ξ), then setting G = K +H. This yields G(x, ξ) = − 1 2 |x −ξ| + 1 2 (x +ξ) −xξ = _ (1 −x)ξ for ξ < x (1 −ξ)x for x < ξ. The solution of −u = f satisfying u(0) = h 0 and u(1) = h 1 is given by u(x) = _ 1 0 G(x, ξ)f(ξ) dξ +G ξ (x, 0)h 0 −G ξ (x, 1)h 1 = (1 −x) _ x 0 ξf(ξ) dξ +x _ 1 x (1 −ξ)f(ξ) dξ + (1 −x)h 0 +xh 1 . 11.2 Green’s Function for Two-Dimensional Poisson Equation Now we go through the same discussion in two dimensions. Some of the proofs use Green’s second identity _ Ω u∆v −v∆udA = _ ∂Ω (u∇v −v∇u) · ndl, This can be derived by writing Green’s first identity twice, with u and v inter- changed the second time, and subtracting. A singularity function K(x, x ) of the operator −∆ is characterised by the three properties 1. For any fixed x , lim →0 _ ∂B K(x, x ) dl = 0, where B denotes the radius- disk centred at x ; 2. For any fixed x , lim →0 _ ∂B ∇K(x, x ) · ndl = −1, where n denotes the outward unit normal to B ; 3. K is harmonic as a function of x for x = x . Note that these three properties do not define a singularity function uniquely: if K is a singularity function then so is K + H, where H(x, x ) is any function that is harmonic as a function of x. 57 A singularity function of −∆ is given by K(x, x ) = −1 2π ln |x −x |. (37) This assertion can be verified as follows. Without loss of generality we can take x = 0. In polar coordinates, we have K = −1 2π ln r with r = |x|, which is harmonic in R 2 \ {0} (see section 9.4). Also, _ ∂B K dl = −1 2π _ 2π 0 ln · dθ = − ln →0 and (because ∇K · n = ∂K/∂r) _ ∂B ∇K · ndl = −1 2π _ 2π 0 1 · dθ = −1. The Green’s function for −∆ and a domain Ω with Dirichlet boundary con- ditions is a singularity function that satisfies G(x, x ) = 0 for x ∈ ∂Ω. The Green’s function provides the solution to the Poisson equation with homogeneous Dirichlet boundary conditions: Theorem 15 If −∆u = f in Ω and u = 0 on ∂Ω then u(x ) = _ Ω G(x, x )f(x) dA (x ∈ Ω). (38) Proof. Letting v(x) = G(x, x ), we have _ Ω\B vf dA = _ Ω\B u∆v −v∆udA = _ ∂Ω (u∇v −v∇u) · ndl . ¸¸ . 0 − _ ∂B (u∇v −v∇u) · ndl ≈ −u(x ) _ ∂B v n dl . ¸¸ . →−1 + _ ∂B vu n dl, and the second term goes to zero because min ∂B u n · _ ∂B v dl . ¸¸ . →0 ≤ _ ∂B vu n dl ≤ max ∂B u n · _ ∂B v dl . ¸¸ . →0 , which completes the proof. 2 The formula (38) represents the solution as the superposition of Green’s func- tions, which can be thought of as “point source responses”. The following result tells us that the response at x to a point source located at x is equal to the response at x to a point source located at x. Theorem 16 (Reciprocity Principle) G(x, x ) = G(x , x) for x = x . 58 Proof. Let y and y be distinct points in Ω, let B and B denote -radius disks centred at y and y , and let u(x) = G(x, y ) and v(x) = G(x, y). Then 0 = _ Ω\B \B u∆v −v∆udA = _ ∂Ω (u∇v −v∇u) · ndl . ¸¸ . 0 − _ ∂B ” − _ ∂B ” ≈ −u(y) _ ∂B ∇v · ndl . ¸¸ . →−1 + _ ∂B vu n dl . ¸¸ . →0 − _ ∂B uv n dl . ¸¸ . →0 +v(y ) _ ∂B u n dl . ¸¸ . →−1 , leaving us with u(y) −v(y ) = 0, that is, G(y, y ) −G(y , y) = 0. 2 As a consequence of Theorem 4, formula (38) can be written as u(x) = _ Ω G(x, x )f(x ) dA . The singularity function (37) is called the free-space Green’s function for Pois- son’s equation. It is a Green’s function for Poisson’s equation with the boundary condition u(x) ∼ 1 |x| as |x| →∞. The free-space Green’s function doesn’t satisfy this boundary condition, but the boundary condition does ensure that the term _ ∂Ω (u∇v −v∇u) · ndl in the proof of Theorem 3 goes to zero when Ω is taken to be a disk of radius R centred at x and R →∞. The method of images can be used to find Green’s functions for other domains. For example, using the idea that a unit point source located at x = (x , y ) with y > 0 and a point source of strength −1 located at (x , −y ) will cancel each other on the x-axis, we find the Green’s function G(x, x ) = −1 2π ln _ (x −x ) 2 + (y −y ) 2 _ 1 2 + 1 2π ln _ (x −x ) 2 + (y +y ) 2 _ 1 2 for the Poisson equation in the half-plane y > 0. Using similar ideas, one can derive the formula for Green’s function for the origin-centred disk of radius a as G(x, x ) = −1 2π ln |x −x | + 1 2π ln ¸ ¸ ¸x |x| 2 −xa 2 ¸ ¸ ¸ a|x| . Representing x and x in polar coordinates as (r, θ) and (ρ, θ ), and using the cosine law |x − x | 2 = |x| 2 + |x | 2 − 2|x||x | cos γ with γ = θ − θ , the disk Green’s function can be written G(x, x ) = 1 2π ln ¸ a 4 +r 2 ρ 2 −2a 2 rρ cos γ a 2 (r 2 +ρ 2 −2rρ cos γ) . (39) 59 The Green’s function G((x, y), (0, 0.5)) for the half-plane and the unit-radius disk are shown below. !1 0 1 0 0.5 1 2 0 0.1 0.2 0.3 x y G !1 0 1 !1 0 1 0 0.1 0.2 0.3 0.4 x y G The Green’s function also provides the solution of Laplace’s equation with nonhomogeneous Dirichlet boundary conditions: Theorem 17 If ∆u = 0 in Ω and u = h on ∂Ω then u(x ) = − _ ∂Ω h(x)∇G(x, x ) · ndl. Proof. Similar to the proof of Theorem 4. 2 For the half-plane y > 0 the unit normal points in the negative y direction and we have ∂G ∂n ¸ ¸ ¸ ¸ ∂Ω = − ∂G ∂y ¸ ¸ ¸ ¸ y=0 = −y /π (x −x ) 2 + (y ) 2 . The solution of Laplace’s equation ∆u = 0 in the half-plane with u(x, 0) = h(x) is therefore u(x , y ) = 1 π _ ∞ −∞ y h(x) (x −x ) 2 + (y ) 2 dx. For the origin-centred disk, the unit outward normal points in the radial direc- tion and we have ∂G ∂n ¸ ¸ ¸ ¸ ∂Ω = ∂G ∂r ¸ ¸ ¸ ¸ r=a = −1 2πa × a 2 −ρ 2 a 2 +ρ 2 −2aρ cos γ . The solution of Laplace’s equation on the disk with u = h on the boundary r = a is therefore u(ρ, θ ) = 1 2π _ 2π 0 (a 2 −ρ 2 )h(θ) a 2 +ρ 2 −2aρ cos(θ −θ ) dθ, which is Poisson’s integral formula (section 10.1). 11.3 Green’s functions from eigenfunctions The Poisson problem can also be solved by the method of eigenfunctions. To introduce the technique, we start with a one-dimensional problem. 60 Consider the differential equation −u = f with boundary conditions u(0) = 0, u(a) = 0. The associated eigenvalue problem is φ + λφ = 0 with the same boundary conditions. The eigenvalues and eigenfunctions are λ m = m 2 π 2 a 2 , φ m (x) = sin mπx a . Substituting a trial solution of the form m ≥1 A m φ m (x) into the differential equation, multiplying through by φ m (x), and integrating gives A m λ m _ a 0 sin 2 mπx a dx . ¸¸ . a/2 = _ a 0 f(x) sin mπx a dx, Thus the A m are 1 λ m ×the Fourier sine coefficients of f, and the solution at a point ξ ∈ (0, 1) is u(ξ) = _ a 0 f(x) _ m≥1 2a m 2 π 2 sin mπx a sin mπξ a _ dx. Comparing this with formula (35), we deduce the Green’s function to be the term in brackets, that is, G(x, ξ) = m≥1 2a m 2 π 2 sin mπx a sin mπξ a . When a = 1, this is the Fourier sine expansion of the Green’s function presented in section 1. Next, consider the two-dimensional Poisson equation −∆u = f on the do- main (0, a) × (0, b), with u = 0 on the boundary. The associated eigenvalue problem is ∆u + λu = 0, with the same boundary conditions. Assuming a solu- tion of the form u(x, y) = X(x)Y (y) yields, with α 2 as separation constant, the two eigenvalue problems X +α 2 X = 0, Y + (λ −α 2 )Y = 0 with homogeneous boundary conditions X(0) = X(a) = Y (0) = Y (b) = 0. The eigenfunctions of the one-dimensional problems are X m (x) = sin mπx a , Y n (y) = sin nπy b . and the eigenvalues are λ mn = π 2 _ m 2 a 2 + n 2 b 2 _ . Substituting a trial solution of the form m ≥1 n ≥1 A m ,n X m (x)Y n (y) into the Poisson equation, multiplying through by X m Y n , and integrating gives A mn λ mn _ a 0 sin 2 mπx a dx . ¸¸ . a/2 _ b 0 sin 2 nπy b dy . ¸¸ . b/2 = _ b 0 _ a 0 f(x, y) sin mπx a sin nπy b dx dy 61 Thus the A mn are 1 λ mn × the two-dimensional Fourier sine coefficients of f, and the solution at a point x is u(x , y ) = _ a 0 _ b 0 f(x, y)G(x, y, x , y ) dx dy with G(x, y, x , y ) = 4ab π 2 m≥1 n≥1 1 m 2 b 2 +n 2 a 2 sin mπx a sin nπy b sin mπx b sin nπy b . The Green’s function G(x, y, a/2, a/4) for a square domain is plotted below. 0 0.5 1 0 0.25 1 0 0.1 0.2 0.3 x/a y/a G 62
Copyright © 2024 DOKUMEN.SITE Inc.