THE ONE-DIMENSIONAL HEAT EQUATION. 1. Derivation. Imagine a Dilute Material Species Free to Diffuse Along One Dimension
Total Page:16
File Type:pdf, Size:1020Kb
THE ONE-DIMENSIONAL HEAT EQUATION. 1. Derivation. Imagine a dilute material species free to diffuse along one dimension; a gas in a cylindrical cavity, for example. To model this mathematically, we consider the concentration of the given species as a function of the linear dimension and time: u(x; t), defined so that the total amount Q of diffusing material contained in a given interval [a; b] is equal to (or at least proportional to) the integral of u: Z b Q[a; b](t) = u(x; t)dx: a Then the conservation law of the species in question says the rate of change of Q[a; b] in time equals the net amount of the species flowing into [a; b] through its boundary points; that is, there exists a function d(x; t), the ‘diffusion rate from right to left', so that: dQ[a; b] = d(b; t) − d(a; t): dt It is an experimental fact about diffusion phenomena (which can be under- stood in terms of collisions of large numbers of particles) that the diffusion rate at any point is proportional to the gradient of concentration, with the right-to-left flow rate being positive if the concentration is increasing from left to right at (x; t), that is: d(x; t) > 0 when ux(x; t) > 0. So as a first approximation, it is natural to set: d(x; t) = kux(x; t); k > 0 (`Fick's law of diffusion’ ): Combining these two assumptions we have, for any bounded interval [a; b]: d Z b u(x; t)dx = k(ux(b; t) − ux(a; t)): dt a Since b is arbitrary, differentiating both sides as a function of b we find: ut(x; t) = kuxx(x; t); the diffusion (or heat) equation in one dimension. (In the case of heat we take u(x; t) to be the temperature, and assume there is a function c(x) > 0 throughout the conducting medium so that the thermal energy dQ added to the system by a `lump' of material of mass 1 ρ(x)dx (where ρ(x) is the mass density) at temperature u(x; t) is dQ = c(x)ρ(x)u(x; t)dx. Taking c; ρ to be constant, we are back in the earlier situation.) We'll consider four types of problems for the heat equation: (i) The Cauchy problem for the equation on the whole real line, where the initial temperature (or concentration) u0(x) is given and we seek u(x; t), the solution giving its evolution in time; (ii) Boundary-value problems on the half-line x > 0, where we assume either the temperature is held constant at x = 0 (so heat flows in or out of the system at the origin), or that there is no diffusion of heat at x = 0 (so ux = 0 at the origin.) (iii) Boundary-value problems on a bounded interval [0;L], or periodic boundary conditions on [−L; L]. (iv) Non-homogeneous problems, corresponding to a heat source inside the conducting material: ut − kuxx = f(x; t), on the whole line or on an interval. Basic observations: (i) The time-independent solutions of the heat equa- tion are linear functions, u = Ax + B. By subtracting an appropriate linear function, for the boundary condition where u is held constant at the end- points we can always assume the constants are zero (Dirichlet BC). For Neumann-type boundary conditions ux = 0, or periodic, the con- stants are always solutions. (iii) In general we expect the equation to gradually `smoothe out' any oscillations in u0 and drive it towards the simplest time-independent solution consitent with the boundary conditions (linear, or a constant.) If the limit as t ! 1 is a constant, it has to be zero for Dirichlet BC, and the average value of the initial data u0, for Neumann or periodic BC on a bounded interval. The reason is that the integral of u over the whole interval (and therefore its average value) is constant in time (under these BC): d Z L Z L Z L u(x; t)dx = ut(x; t)dx = k uxx(x; t)dx = k(ux(L; t)−ux(0; t)) = 0; dt 0 0 0 under Neumann BC, and similarly under periodic BC. (iv) Scaling. The change of variables t 7! s = kt; x 7! x changesp the equation ut = kuxx to us = uxx; the change of variables t 7! t; x 7! y = pkx changes it to ut = uyy: The simultaneous change t 7! s = λt, x 7! y = λx (with λ > 0) leads back to the original equation: us = kuyy (verify these 2 statments). Thus we see that \one time dimension corresponds to two space dimensions", in thep sense that any scaling of the variables that doesn't change the ratio x= t also leaves the equation unchanged. We also see that one can always assume the constant k equals one, by rescaling the time variable. We will usually do that, and the correct expres- sions for the equation with general k > 0 can be recovered simply by making the change t ! kt. 2. The heat kernel on the real line. 2.1 Derivation. To look for exact solutions of ut = uxx on R (for t > 0), we remember the scaling fact just observed and try to find solutions of the form: x u(x; t) = p(p ); p = p(y): t The heat equation quickly leads to the ODE for p(y): y p00(y) = − p0(y); 2 and setting q(y) = p0(y), we find a first-order linear ODE with an easily derived general solution: y 2 q0(y) = − q(y) −! q(y) = Ce−y =4; C > 0; y 2 : 2 R Thus the function P (x; t) below is a solution of the heat equation on the real line: p p x= T x= 4t Z 2 1 Z 2 P (x; t) = e− =4dy = e−p dp: 0 2 0 Now recall the well-known fact from Calculus: 1 p Z 2 π e−p dp = 0 2 and the related definition of the \Error Function": Z z 1 1 −p2 ERF (z) = + p e dp; z 2 R: 2 π 0 This function has the properties: 1 1 lim ERF (z) = 0; lim ERF (z) = 1; ERF (0) = ; ERF (z)− is an odd function of z: z→−∞ z!1 2 2 3 And so instead of using P (x; t) we define: x H(x; t) = ERF (p ); 4t a solution of the heat equation ut − uxx = 0. The normalization constants are chosen so that the limit of this solution as t ! 0+ is (pointwise in x) the (discontinuous!) function θ(x) defined by: 1 θ(x) = 0; x < 0; θ(0) = ERF (0) = ; θ(x) = 1; x > 0: 2 (Engineers will recognize this as \Heaviside's unit step function at zero".) Unfortunately we only found an exact solution of the heat equation given as an integral, so just in case we check whether u(x; t) = exp(−x2=4t) is a solution of ut = uxx and find that it is not. Computing its integral over the whole real line, we find (check!): Z 1 2 p − x e 4t dx = 4πt: −∞ This moves us to consider the function: 2 1 − x h(x; t) = p e 4t ; 4πt and it turns out this one works (and is called the heat kernel on the real line): Exercise: Show that h(x; t) is a solution of ut = uxx for x 2 R; t > 0, R 1 and satisfies: −∞ h(x; t)dx = 1: 2.2 Relation with the normal distribution. To understand the behavior of h(x; t), we note that its graph is an even \bell-shaped curve" centered at 0 and with \thickness" of the peak apparently related to t (sharper peak, the smaller t > 0 is.) Recall the \standard normal probability density function" from Probability: 2 1 − x p(x; 0; 1) = p e 2 ; 2π as well as the more general \normal probability density function with mean value µ 2 R and standard deviation σ > 0": 2 1 − (x−µ) p(x; µ, σ) = p e 2σ2 : σ 2π 4 Its graph is the \bell-shaped curve" with peak value at x = µ and peak width proportional to σ. Its integral over the whole real line is one, for all µ 2 R; σ > 0. If you've studied some probability (and you should), you'll recall that for a normally distributed random variable X taking values on R, with expected value (mean) µ and standard deviation σ (or variance σ2), we have the probabilities: Z b P rµ,σ[a ≤ X ≤ b] = p(x; µ, σ)dx: a The cumulative distribution function for p(x; 0; 1) is exactly ERF ! Z z P r0;1[X ≤ z] = p(x; 0; 1)dx = ERF (z); −∞ and with mean µ and standard deviation σ: Z x x − µ P rµ,σ[X ≤ x] = p(y; µ, σ)dy = ERF ( p ): −∞ σ 2 The connection with the heat equation then is: we have the correspondence σ2 $ 2t (time corresponds to variance). For the heat kernel and normal probability density function.: 1 σ2 p(x; 0; 1) = h(x; ); p(x; µ, σ) = h(x − µ, ): 2 2 For the integrated solution H(x; t) and normal cumulative distribution func- tion: 1 x − µ σ2 ERF (z) = H(z; ); ERF ( p ) = H(x − µ, ): 2 σ 2 2 2.3 Solutions for step-function initial data. It is easy to use linearity and the `translation invariance' (u(x − a; t) is a solution of the heat equation if u(x; t) is) to write down the solutions of ut = uxx with for simple discontinuous initial data.