A Gentle Guide to Partial Differential Equations

Table of contents

Note: it is highly recommended to navigate by clicking links in the table of contents! It means you can use the back button in your browser to go back to any section you were reading, so you can jump back and forth between sections!

This is a short guide/mini-book on introducing various topics in partial differential equations, including analytical methods of finding solutions, boundary-value problems, and discussions of widely-known PDEs.

This guide is dedicated to Professor Yuri Lvov of Rensselaer Polytechnic Institute, who teaches the course on which this guide is based, and to whom I am greatly thankful. They are freely-sharable and released to the public domain. This guide also closely follows the book Partial Differential Equations, 2nd. Ed. by Walter A. Strauss, which is highly recommended for following on while reading the guide.

Note: familiarity with vector calculus and ordinary differential equations is assumed. Full length guides for both are available if a refresher is needed; they can be found on the vector calculus guide and the introduction to differential equations.

Introduction to partial differential equations

A partial differential equation (PDE) is an equation that describes a function of several variables in terms of its partial derivatives. For instance, let u(x,y,z,)u(x, y, z, \dots) be an arbitrary function of several variables; a PDE takes the form:

F(u,u,2u,uxixj)=g(r) F\left(u, \nabla u, \nabla^2u, \dfrac{\partial u}{\partial x_i \partial x_j}\right) = g(\mathbf{r})

A few of the most well-known partial differential equations are listed in the table below:

PDE nameMathematical form
1D heat equationut=α22ux2\dfrac{\partial u}{\partial t} = \alpha^2 \dfrac{\partial^2 u}{\partial x^2}
1D transport equationut+cux=0\dfrac{\partial u}{\partial t} + c\dfrac{\partial u}{\partial x} = 0
1D inviscid Burger's equationut+uux=0\dfrac{\partial u}{\partial t} + u \dfrac{\partial u}{\partial x} = 0
1D viscous Burger's equationut+uux=ν2ux2\dfrac{\partial u}{\partial t} + u\dfrac{\partial u}{\partial x} = \nu \dfrac{\partial^2 u}{\partial x^2}
1D Wave equation2ut2=c22ux2\dfrac{\partial^2 u}{\partial t^2} = c^2 \dfrac{\partial^2 u}{\partial x^2}
Korteweg–De Vries (KdV) equationut+3ux36uux=0\dfrac{\partial u}{\partial t} + \dfrac{\partial^3 u}{\partial x^3} - 6 u \dfrac{\partial u}{\partial x} = 0
2D Laplace's equation2ux2+2uy2=0\dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} = 0
3D Laplace's equation2ux2+2uy2+2uz2=0\dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} + \dfrac{\partial^2 u}{\partial z^2} = 0
Incompressible Euler equationsut+(u)u+1ρp=g\dfrac{\partial u}{\partial t} + (\mathbf{u} \cdot \nabla) \mathbf{u} + \dfrac{1}{\rho} \nabla p = \mathbf{g}, u=0\nabla \cdot \mathbf{u} = 0

We want to solve PDEs because they provide mathematical descriptions which allow us to understand the dynamics of a physical system. The processes of solving and analyzing PDEs are the focus of this guide.

Linearity

A crucial distinction that must be made before attempting any solution of a PDE is whether it is linear or nonlinear. A linear PDE has no terms involving its unknown function multiplied to partial derivatives, and only linear terms involving its unknown function anywhere else. For instance, consider the PDE shown:

xux=yuy+3u x \dfrac{\partial u}{\partial x} = y \dfrac{\partial u}{\partial y} + 3u

It may be illuminating to write it in expanded form:

xu(x,y)x=yu(x,y)y+3u(x,y) x\dfrac{\partial u(x, y)}{\partial x} = y\dfrac{\partial u(x, y)}{\partial y}+ 3u(x, y)

Notice that the PDE consists of an unknown function u(x,y)u(x, y). On each of the derivatives, there is no term involving uu. The only time u(x,y)u(x, y) appears is the term 3u(x,y)3u(x, y) (which is not multiplied to a derivative, and is linear in form). We therefore say that the PDE is linear. All of the following cases are similarly linear:

Linear modificationReason for linearity
x2ux=xyuy+3ux^2 \dfrac{\partial u}{\partial x} = xy \dfrac{\partial u}{\partial y} + 3 uOnly terms involving uu (the unknown function) matter when analyzing linearity; any terms in x,yx, y, etc. don't matter
xux=yuy+(1x2)ux \dfrac{\partial u}{\partial x} = y \dfrac{\partial u}{\partial y} + (1 - x^2)uSame; only terms involving uu matter when analyzing linearity, so the 1x21 - x^2 factor does not change the linearity of the differential equation
x2ux2=yuy+3ux \dfrac{\partial^2 u}{\partial x^2} = y \dfrac{\partial u}{\partial y} + 3uIt doesn't matter whether the partial derivatives are first derivatives, second-derivatives, nth-derivatives, etc.

By contrast, any of the following cases are nonlinear:

Nonlinear modificationReason for nonlinearity
uux=yuy+3uu \dfrac{\partial u}{\partial x} = y \dfrac{\partial u}{\partial y} + 3uThere is a term in uu multiplied to the first derivative ux\dfrac{\partial u}{\partial x}
xux=yuy+3u2x \dfrac{\partial u}{\partial x} = y \dfrac{\partial u}{\partial y} + 3u^2There is a squared term in uu (the u2u^2 term) which is not a linear term
uxux=yuy+3cos(u)u x \dfrac{\partial u}{\partial x} = y \dfrac{\partial u}{\partial y} + 3\cos(u)Both a term in uu on one of the derivatives and a nonlinear term in uu
(xux)3=yuy+3u2\left(x \dfrac{\partial u}{\partial x}\right)^3 = y \dfrac{\partial u}{\partial y} + 3u^2Taking powers of derivatives makes a PDE nonlinear

Linear differential equations allow us to write a PDE in terms of a linear differential operator, denoted L\mathcal{L}. For instance, consider the heat equation:

ut=α22ux2 \dfrac{\partial u}{\partial t} = \alpha^2 \dfrac{\partial^2 u}{\partial x^2}

We note that we can rewrite the heat equation as follows:

(tα22x2)u(x,t)=0 \left(\dfrac{\partial}{\partial t} - \alpha^2 \dfrac{\partial^2}{\partial x^2}\right) u(x, t) = 0

The quantity in the brackets on the left-hand side of the equation is the linear operator. If we let:

L=(tα22x2) \mathcal{L} = \left(\dfrac{\partial}{\partial t} - \alpha^2 \dfrac{\partial^2}{\partial x^2}\right)

Then we may write the heat equation as Lu=0\mathcal{L} u = 0. As L\mathcal{L} is a linear operator, it has the properties that for two solutions uu and vv and a constant cc, L(cu)=cLu\mathcal{L}(c u) = c\mathcal{L}u and L(u+v)=L(u)+L(v)\mathcal{L}(u + v) = \mathcal{L}(u) + \mathcal{L}(v). Linearity means that any sum of two solutions is a solution to a PDE, so it is possible to write a general solution as:

u(x,t)=ncnun(x,t) u(x, t) = \sum_n c_n u_n(x, t)

Homogeneity

Linear PDEs can further be divided into two main types: homogenous linear PDEs, which take the form Lu=0\mathcal{L} u = 0, or inhomogenous (also called nonhomogenous) linear PDEs, which take the form Lu=f(x)\mathcal{L} u = f(\mathbf{x}). That is to say, roughly speaking, if one rearranges a linear PDE such that every term involving derivatives is moved to the left-hand side, then the right-hand side will be zero for homogenous PDEs and some function f(x)f(\mathbf{x}) for inhomogenous PDEs.

For instance, the following PDE is a homogenous linear PDE:

2ux2+2uy2=0 \dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} = 0

Whereas the following PDE is an inhomogenous linear PDE:

2ux2+2uy2=k2u \dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} = k^2 u

Note how in both cases, all the terms involving derivatives have been moved over to the left-hand side of the equation, and the value of the right-hand side of the equation determines the homogeneity (whether the equation is homogeneous or inhomogeneous).

Solving by direct integration

Without any additional knowledge, we may begin our study of PDEs by examining the direct integration approach, which is applicable to a few very simple PDEs. Consider, for instance, the following PDE:

2ux2=0 \dfrac{\partial^2 u}{\partial x^2} = 0

If we take the partial integral once with respect to xx twice, we have:

u(x,y)=(2ux2+u)dx=0dx=0+A(y)dy=xA(y)+B(y) \begin{align*} u(x, y) &=\iint\left( \dfrac{\partial^2 u}{\partial x^2} + u \right) dx \\ &= \iint 0 \, dx \\ &= \int 0 + A(y) \, dy \\ &= x A(y) + B(y) \end{align*}

Thus our general solution is:

u(x,y)=xA(y)+B(y) u(x, y)= x A(y) + B(y)

The reason for why the general solution contains two functions of yy, namely A(y)A(y) and B(y)B(y), is because we are performing partial integration since this is a partial differential equation. Thus, the constants of integration are actually functions A(y)A(y) and B(y)B(y), these can be arbitrary functions of yy. For instance, the following are all valid solutions to our PDE:

u(x,y)=3xy+5y2u(x,y)=xcosy+eysinyu(x,y)=xlny+y2(5+3y)3/2u(x,y)=0 \begin{gather*} u(x, y) = 3xy + 5y^2 \\ u(x, y) = x \cos y + e^y \sin y \\ u(x, y) = x \ln y + y^2(5 + 3y)^{3/2} \\ u(x, y) = 0 \end{gather*}

Similarly, consider the PDE:

2ux2+k2u=0 \dfrac{\partial^2 u}{\partial x^2} + k^2 u = 0

The general solution is given by u(x,y)=A(y)sinkx+B(y)coskxu(x, y) = A(y) \sin k x + B(y) \cos k x, which means that all of the following are also solutions:

u(x,y)=3y2sinkx+y4coskxu(x,y)=5ysinkx+574y3coskxu(x,y)=y1/4coskxu(x,y)=sinkx \begin{gather*} u(x, y) = 3y^2 \sin kx + \sqrt{y-4} \cos k x \\ u(x, y) = \dfrac{5}{y} \sin kx + 574y^3 \cos k x \\ u(x, y) = y^{1/4} \cos k x \\ u(x, y) = \sin k x \end{gather*}

The sheer diversity of solutions - and yes, all of these are valid solutions - means that finding general solutions is not very useful when solving PDEs, since there are always degrees of freedom from the arbitrary functions that could make the particular solution very, very different. Therefore, we usually need to specify boundary conditions, specific mathematical requirements that PDEs must satisfy on a particular domain, to find a unique (and useful) solution.

Boundary conditions

As we have seen, when solving PDEs, one must be careful to recognize that a general solution to a PDE does not uniquely specify the solution to a given physical scenario. A particular solution (which is usually synonymous with unique solution) can only be found if one additionally requires that the solution take a certain value at the boundaries of the PDE's domain.

Let us consider an example. Consider solving Laplace's equation 2ux2=2uy2=0\dfrac{\partial^2 u}{\partial x^2} = \dfrac{\partial^2 u}{\partial y^2} = 0 on a unit square, i.e. the domain defined by 0x1,0y10 \leq x \leq 1, 0\leq y \leq 1. We will call this domain Ω\Omega. The boundary of the domain would be the perimeter of the unit square. We will call this boundary Ω\partial \Omega for "boundary of Ω\Omega".

A boundary condition for finding a unique equation to Laplace's equation could be specifiying that:

u(x,y)Ω=C u(x, y) \big |_{\partial \Omega} = C

This means that u(x,y)=Cu(x, y) = C at all points along the boundary (which is the perimeter of the unit square). Using this information, the PDE can be solved for exactly, and a (much more useful) unique solution can be found.

Separation of variables

For any PDE more complex than the most basic examples, direct integration no longer suffices. Another technique is necessary to tackle these more complicated PDEs, and this is the method of separation of variables.

To demonstrate this method, let us consider the wave equation:

2ut2=c22ux2 \dfrac{\partial^2 u}{\partial t^2} = c^2 \dfrac{\partial^2 u}{\partial x^2}

When performing the separation of variables, we first assume that the solution u(x,t)u(x, t) may be written as a product of two functions of a single variable, which we will call v(t)v(t) and w(x)w(x). That is:

u(x,t)=w(x)v(t) u(x, t) = w(x) v(t)

In this form, we are able to take the partial derivatives explicitly:

2ut2=2t2w(x)v(t)=w(x)d2vdt22ux2=2x2w(x)v(t)=v(t)d2wdx2 \begin{align*} \dfrac{\partial^2 u}{\partial t^2} = \dfrac{\partial^2}{\partial t^2} w(x) v(t) = w(x)\dfrac{d^2v}{dt^2} \\ \dfrac{\partial^2 u}{\partial x^2} = \dfrac{\partial^2}{\partial x^2} w(x) v(t) = v(t) \dfrac{d^2w}{dx^2} \end{align*}

By substitution of these partial derivatives into the wave equation we have:

w(x)d2vdt2=c2v(t)d2wdx2 w(x)\dfrac{d^2v}{dt^2} = c^2 v(t) \dfrac{d^2w}{dx^2}

If we divide by c2w(x)v(t)c^2 w(x) v(t) from both sides, we have:

1c2w(x)v(t)w(x)d2vdt2=1c2w(x)v(t)c2v(t)d2wdx21c2v(t)d2vdt2=1w(x)d2wdx2 \begin{gather*} \dfrac{1}{c^2 w(x)v(t)}w(x)\dfrac{d^2v}{dt^2} = \dfrac{1}{c^2 w(x)v(t)}c^2 v(t) \dfrac{d^2w}{dx^2} \\ \dfrac{1}{c^2 v(t)}\dfrac{d^2v}{dt^2} = \dfrac{1}{w(x)}\dfrac{d^2w}{dx^2} \end{gather*}

We now have an expression with only tt and derivatives of tt on the left-hand side and only xx and derivatives of xx on the right-hand side. This is only possible if both expressions are equal to an arbitrary constant k2k^2, called the separation constant (we could just as well choose kk or ss or aa but this form simplifies the mathematical analysis later on). So now we have separated the variables and are left with two ordinary differential equations:

1c2v(t)d2vdt2=k21w(x)d2wdx2=k2 \begin{align*} \dfrac{1}{c^2 v(t)}\dfrac{d^2v}{dt^2} &= k^2 \\ \dfrac{1}{w(x)}\dfrac{d^2w}{dx^2} &= k^2 \end{align*}

These can be written in more traditional form as:

d2vdt2=k2c2vd2wdx2=k2w \begin{align*} \dfrac{d^2 v}{dt^2} &= k^2 c^2 v \\ \dfrac{d^2 w}{dx^2} &= k^2 w \end{align*}

Which have the general solutions:

v(t)=A1cos(kct)+B1sin(kct)w(x)=A2cos(kx)+B2sin(kx) \begin{align*} v(t) = A_1\cos(k c t) + B_1 \sin (k c t) \\ w(x) = A_2 \cos(kx ) + B_2 \sin (kx) \end{align*}

Where A1,A2,B1,B2A_1, A_2, B_1, B_2 are undetermined constants that can be solved for by applying the boundary conditions. It is common to write ωkc\omega \equiv kc (the greek letter omega, not to be confused with ww) to simplify the equations:

v(t)=A1cos(ωt)+B1sin(ωt)w(x)=A2cos(kx)+B2sin(kx) \begin{align*} v(t) = A_1\cos(\omega t) + B_1 \sin (\omega t) \\ w(x) = A_2 \cos(kx ) + B_2 \sin (kx) \end{align*}

So the general solution to the wave equation is:

u(x,t)=w(x)v(t)=(A2cos(kx)+B2sin(kx))(A1cos(ωt)+B1sin(ωt)) u(x, t) = w(x) v(t) = (A_2 \cos(kx ) + B_2 \sin (kx))(A_1\cos(\omega t) + B_1 \sin (\omega t))

This can be simplified further using trigonometric identities, and is the end result of our successful separation of variables.

Note: In many cases, a PDE may be separable in one coordinate system and not separable in another. This is famously the case for the Schrödinger equation, which is an inhomogeneous linear PDE; when its inhomogeneous term is a term that is proportional to 1r\dfrac{1}{r}, as is the case for many atomic solutions, then the Schrödinger equation is no longer separable in Cartesian coordinates, but remains separable in spherical coordinates.

Useful calculus identities for PDEs

By nature of partial differentiation, there are several results that are incredibly crucial for the study of PDEs. First, the order of differentiation does not matter. That is to say:

2fxy=2fyx \dfrac{\partial^2 f}{\partial x \partial y} = \dfrac{\partial^2 f}{\partial y \partial x}

Second, integration and partial differentiation can (in some cases) be order-swapped:

ddtx=ax=bf(x,t)dx=x=ax=btf(x,t)dx \dfrac{d}{dt} \int_{x=a}^{x=b} f(x, t) dx = \int_{x=a}^{x=b} \dfrac{\partial}{\partial t} f(x, t) dx

This is known as the Leibnitz rule. Note that when applying the Leibnitz rule, it is important to recognize that the above rule applies only in the case of definite integrals where f(x,t)f(x, t) is integrated over xx. Notice that integrating f(x,t)f(x, t) over bounds in xx results in a new function we may call G(t)G(t) that is purely in terms of tt, by the Fundmental Theorem of Calculus:

x=ax=bf(x,t)dx=F(b,t)F(a,t)=G(t) \int_{x=a}^{x=b} f(x, t) dx = F(b, t) - F(a, t) = G(t)

Therefore, we write ddt\dfrac{d}{dt} for the left-hand-side integral, as G(t)G(t) is only in terms of tt, whereas we write t\dfrac{\partial}{\partial t} for the right-hand-side integral, as f(x,t)f(x, t) is in terms of both xx and tt. In the more general form, where a=a(t)a = a(t) and b=b(t)b = b(t) rather than constants, we have:

ddtx=a(t)x=b(t)f(x,t)dx=f(b,t)dbdtf(a,t)dadt+x=a(t)x=b(t)tf(x,t)dx \dfrac{d}{dt} \int_{x=a(t)}^{x=b(t)} f(x, t) dx = f(b, t) \dfrac{db}{dt} - f(a, t) \dfrac{da}{dt} + \int_{x=a(t)}^{x=b(t)} \dfrac{\partial}{\partial t} f(x, t) dx

Another very useful relationship used extensively in studying PDEs is the divergence theorem, which relates the volume integral of the divergence of a vector-valued function over a volume Ω\Omega to its surface integral across the boundary surface of Ω\Omega, written Ω\partial \Omega:

ΩFdA=Ω(F)dV \oiint \limits_{\partial \Omega} \mathbf{F} \cdot d\mathbf{A} = \iiint \limits_\Omega (\nabla \cdot \mathbf{F})\, dV

Note that this can also be written with slightly different but mathematically-equivalent notation as:

ΩFdA=Ω(F)dV \oint \limits_{\partial \Omega} \mathbf{F} \cdot d\mathbf{A} = \int \limits_\Omega (\nabla \cdot \mathbf{F})\, dV

That is to say, the number of integral signs does not matter, that is a notational choice; only the integration variables (dAd\mathbf{A} and dVdV) matter. However, the multiple-integral notation often used since it is sometimes more illustrative to write a volume integral with triple integral signs to signify it is computed over a three-dimensional volume, and a surface integral with double integral signs to signify it is computed over a two-dimensional surface.

From the divergence theorem, it is possible to derive the vanishing theorem:

ΩF(r)dV=0F(r)=0 \begin{matrix*} \displaystyle \iiint \limits_\Omega F(\mathbf{r})\, dV = 0& \Leftrightarrow &F(\mathbf{r}) = 0 \end{matrix*}

Solutions to 1st-order linear PDEs

Up to this point, we have discussed two methods of solving PDEs: direct integration and separation of variables. We will now examine a few more ways to solve PDEs of a specific form: first-order linear PDEs.

Solving for homogenous vs. inhomogenous PDEs

Before we actually solve a PDE, it is important to first identify whther it is homogenous, inhomogenous, or neither. Consider a linear differential operator L\mathcal{L}, similar to the ones we have already studied. A solution to a homogenous linear PDE is a function u(x,y,z)u(x, y, z) that satisfies:

Lu=0 \mathcal{L}u = 0

For an inhomogenous linear PDE in the form Lu=f(x)\mathcal{L}u = f(\mathbf{x}), the general solution u(x,y,z)u(x, y, z) to the PDE is a combination of the general solution u0u_0 to the corresponding homogenous PDE Lu0=0\mathcal{L}u_0 = 0 and the particular solution u1u_1 to the inhomogenous PDE Lu1=f(x)\mathcal{L} u_1 = f(\mathbf{x}). That is:

u=u0+u1 u = u_0 + u_1

In simpler terms, to solve for the general solution to a inhomogenous linear PDE Lu=f(x)\mathcal{L} u = f(\mathbf{x}) (e.g., (x+y)u=f(x,y)\left(\dfrac{\partial}{\partial x} + \dfrac{\partial}{\partial y}\right)u = f(x, y) where L=(x+y)\mathcal{L} = \left(\dfrac{\partial}{\partial x} + \dfrac{\partial}{\partial y}\right):

The method of characteristics

The method of characteristics is a technique to solve first-order linear PDEs. We will first overview the simplest case, where we additionally require that the PDE is homogenous and has constant coefficients That is, we consider PDEs similar to the transport equation:

aux+buy=0 a \dfrac{\partial u}{\partial x} + b \dfrac{\partial u}{\partial y} = 0

Note that this may be cast in an alternative form (this will be important later) given by:

ux+bauy=0 \dfrac{\partial u}{\partial x} + \dfrac{b}{a} \dfrac{\partial u}{\partial y} = 0

To solve this PDE, we use a geometric argument from vector calculus. Recall that the directional derivative vu\nabla_\mathbf{v} u is given by:

vu=uv=vxux+vyuy \begin{align*} \nabla_\mathbf{v} u &= \nabla u \cdot \mathbf{v} \\ &= v_x \dfrac{\partial u}{\partial x} + v_y \dfrac{\partial u}{\partial y} \end{align*}

We can therefore reinterpret the transport PDE aux+buy=0a \dfrac{\partial u}{\partial x} + b \dfrac{\partial u}{\partial y} = 0 as the equation of a directional derivative vxux+vyuyv_x \dfrac{\partial u}{\partial x} + v_y \dfrac{\partial u}{\partial y}, such that a,ba, b are the components of a vector v\mathbf{v}, and vx=a,vy=bv_x = a, v_y = b. Therefore, the transport equation reduces to:

vu=ua,b=0 \nabla_\mathbf{v} u = \nabla u \cdot \langle a, b\rangle = 0

Notice how this equation is equivalent to saying that the directional derivative of uu along the vector v=a,b\mathbf{v} = \langle a, b\rangle is zero. This means that u(x,y)u(x, y) does not change along v\mathbf{v}, and thus for all points (x,y)(x, y) along the direction v\mathbf{v}, u(x,y)u(x, y) must be equal to a constant CC, or more generally, some function of a constant f(C)f(C) (because if CC is a constant, then f(C)f(C) is also a constant).

The curves traced by the collection of these points (x,y)(x, y) are known as characteristic curves (sometimes also called integral curves). Each curve would mathematically take the form (x,y(x))(x, y(x)), where yy is some function of xx, so the solution u(x,y)u(x, y) can be found by just substituting in y(x)y(x) to have u(x,y(x))u(x, y(x)). Therefore, once we can determine the expression for the characteristic curve y(x)y(x), we know the solution u(x,y)u(x, y). Thus the method of characteristics reduces the problem of solving a PDE into a problem of finding the characteristic curves y(x)y(x) along which u(x,y)=const.u(x, y) = \text{const.}

But how do we go about finding y(x)y(x)? Let us consider moving along u(x,y)u(x, y) following a characteristic curve y(x)y(x). Since u(x,y)=const.u(x, y) = \text{const.} along the characteristic curve, we know that dudx=0\dfrac{du}{dx} = 0. But we also know that we may expand dudx\dfrac{du}{dx} using the chain rule to have:

dudx=ux+uydydx=0 \dfrac{du}{dx} = \frac{\partial u}{\partial x} + \dfrac{\partial u}{\partial y}\dfrac{dy}{dx} = 0

If we compare this with the alternate form (given previously) of our PDE:

ux+bauy=0 \dfrac{\partial u}{\partial x} + \dfrac{b}{a} \dfrac{\partial u}{\partial y} = 0

We immediately notice that ba=dydx\dfrac{b}{a} = \dfrac{dy}{dx}, then:

dudx=ux+bauy \dfrac{du}{dx} = \dfrac{\partial u}{\partial x} + \dfrac{b}{a} \dfrac{\partial u}{\partial y}

Which perfectly matches our PDE! Thus we have reduced the PDE to a problem of finding the characteristic curves y(x)y(x). To be able to solve for the characteristic curves, we need only solve the system of ordinary differential equations we have derived:

dudx=0dydx=ba \begin{align*} \dfrac{du}{dx} = 0 \\ \dfrac{dy}{dx} = \dfrac{b}{a} \end{align*}

The second differential equation has the straightforward solution, by inspection, of y(x)=bax+cy(x) = \dfrac{b}{a}x + c, where cc is some arbitrary constant of integration. For the first differential equation, however, we must be more careful, because dudx=du(x,y)dx\dfrac{du}{dx} = \dfrac{du(x, y)}{dx} is a total derivative of the multivariable function u(x,y)u(x, y). Therefore, we must perform partial integration:

dudx=0du(x,y)dx=0du(x,y)dxdx=0dxu(x,y)=F(y) \begin{align*} \dfrac{du}{dx} &= 0 \\ \dfrac{du(x, y)}{dx} &= 0 \\ \int \dfrac{du(x, y)}{dx}\, dx &= \int 0\, dx \\ u(x, y) &= F(y) \end{align*}

Notice here that instead of a constant of integration, we have an arbitrary function of integration F(y)F(y), since we are taking the partial integral.

Now, let us recall that since u(x,y)=const.u(x, y) = \text{const.} for all points along the characteristic curve, then this must be true for the point (0,y(0))(0, y(0)) as well, meaning that u(x,y)=u(0,y(0))=const.u(x, y) = u(0, y(0)) = \text{const.} Therefore:

x=0y=bax+cy=c \begin{matrix*} &x = 0& \Rightarrow & y = \cancel{\dfrac{b}{a} x} + c & \Rightarrow & y=c \end{matrix*}

By substitution into u(x,y)=F(y)u(x, y) = F(y), we have:

u(0,y(0))=F(y)=F(c)u(x,y)=u(0,y(0))=F(c) \begin{gather*} u(0, y(0))= F(y) = F(c) \\ u(x, y) = u(0, y(0)) = F(c) \\ \end{gather*}

But we know that y(x)=bax+cy(x) = \dfrac{b}{a}x + c, which we can rearrange to ybax=cy - \dfrac{b}{a} x = c. Therefore:

u(x,y)=F(c)=F(ybax) u(x, y) = F(c) = F\left(y - \dfrac{b}{a}x\right)

Since FF is a completely arbitrary function, we can define a new (and also arbitrary) function f(s)=F(s/a)f(s) = F(-s/a), where s=ybaxs = y - \dfrac{b}{a}x (here ss is a substitution variable). Thus we have:

f(bxay)=F(1a(bxay))=F(ybax) f(bx - ay) = F\left(-\dfrac{1}{a}(bx - ay)\right) = F\left(y - \dfrac{b}{a}x\right)

So that we may write our generalized solution as:

u(x,y)=f(bxay) u(x, y) = f(bx - ay)

This is a general solution, meaning that ff is a yet-to-be determined function and substituting in provided boundary conditions is necessary to determine the exact expression for ff.

Note: An important theme when studying general solutions of PDEs is to remember that arbitrary compositions of arbitrary functions make no difference in writing the general solution to a PDE, just like the addition of a different constant of integration makes no difference to the general solution to an ODE. The choice of arbitrary function is purely stylistic, since the solution to a PDE cannot be determined without provided boundary and initial conditions.

We may verify that our general solution is indeed a solution to our PDE aux+buy=0a \dfrac{\partial u}{\partial x} + b \dfrac{\partial u}{\partial y} = 0 by taking the derivatives of uu and substituting them back into our PDE:

ux=bf(bxay)uy=af(bxay)aux+buy=a[bf(bxay)]+b[af(bxay)]=abf(bxay)abf(bxay)=0 \begin{align*} \dfrac{\partial u}{\partial x} &= bf'(bx - ay) \\ \dfrac{\partial u}{\partial y} &= -af'(bx - ay) \\ a \dfrac{\partial u}{\partial x} + b \dfrac{\partial u}{\partial y} &= a [bf'(bx - ay)] + b[-af'(bx - ay)] \\ &= ab f'(bx - ay) - ab f'(bx - ay) \\ &= 0 \quad \checkmark \end{align*}

Again, note that the solution u(x,y)=f(bxay)u(x, y) = f(bx - ay) is a general solution for arbitrary ff. To find a unique solution, we must be provided with a condition that constrains ff. For instance, such a condition may be:

u(0,y)=tan(ky) u(0, y) = \tan(-ky)

If we substitute u(0,y)u(0, y) into our general solution, we find that:

u(0,y)=f(bx0ay)=f(ay) \begin{align*} u(0, y) &= f\left(\cancel{bx}^0 - ay\right) \\ &= f(-a y) \\ \end{align*}

Therefore we have:

f(ay)=tan(ky)f(ξ)=tan(kξ/a) \begin{align*} f(-ay) &= \tan(-ky) \\ f(\xi) &= \tan (k \xi / a) \end{align*}

where we used the substitution ξ=ay\xi = -ay to solve. Therefore, the particular solution given the condition that u(0,y)=tan(ky)u(0, y) = \tan(-ky) becomes:

u(x,y)=tan(ka(bxay))=tan(k(baxy)) \begin{align*} u(x, y) &= \tan\left(\dfrac{k}{a}(bx - a y)\right) \\ &= \tan \left(k \left(\dfrac{b}{a} x - y\right)\right) \end{align*}

Coordinate transformation method

We may alternately solve the transport equation by another means: a coordinate transformation. If we define the following transformed coordinates:

x~=ax+byy~=bxay \begin{align*} \tilde x = a x + by \\ \tilde y = bx - ay \end{align*}

Then by the chain rule, we may translate the derivatives with respect to xx and yy to derivatives with respect to x~\tilde x and y~\tilde y:

x=x~xx~+y~xy~=ax~+by~y=x~yx~+y~yy~=bx~ay~ \begin{align*} \dfrac{\partial}{\partial x} &= \dfrac{\partial \tilde x}{\partial x} \dfrac{\partial}{\partial \tilde x} + \dfrac{\partial \tilde y}{\partial x} \dfrac{\partial}{\partial \tilde y} \\ &= a \dfrac{\partial}{\partial \tilde x} + b \dfrac{\partial}{\partial \tilde y} \\ \dfrac{\partial}{\partial y} &= \dfrac{\partial \tilde x}{\partial y} \dfrac{\partial}{\partial \tilde x} + \dfrac{\partial \tilde y}{\partial y} \dfrac{\partial}{\partial \tilde y} \\ &= b \dfrac{\partial}{\partial \tilde x} - a\dfrac{\partial}{\partial \tilde y} \end{align*}

Now if we substitute these expressions back into the equation, we find that:

aux+buy=0(ax+by)u(x,y)=0[a(ax~+by~)+b(bx~ay~)]u(x,y)=0[a2x~+aby~+b2x~aby~]u(x,y)=0[a2x~+aby~+b2x~aby~]u(x,y)=0[a2x~+b2x~]u(x,y)=0(a2+b2)x~u(x,y)=0 \begin{align*} a\dfrac{\partial u}{\partial x} + b \dfrac{\partial u}{\partial y} = 0 \\ \left(a\dfrac{\partial}{\partial x} + b \dfrac{\partial}{\partial y}\right)u(x, y) = 0 \\ \left[a\left( a \dfrac{\partial}{\partial \tilde x} + b \dfrac{\partial}{\partial \tilde y}\right) + b\left(b \dfrac{\partial}{\partial \tilde x} - a\dfrac{\partial}{\partial \tilde y}\right)\right]u(x, y) = 0 \\ \left[a^2 \dfrac{\partial}{\partial \tilde x} + a b \dfrac{\partial}{\partial \tilde y} + b^2 \dfrac{\partial}{\partial \tilde x} - a b \dfrac{\partial}{\partial \tilde y}\right]u(x, y) = 0 \\ \left[a^2 \dfrac{\partial}{\partial \tilde x} + \cancel{a b \dfrac{\partial}{\partial \tilde y}} + b^2 \dfrac{\partial}{\partial \tilde x} - \cancel{a b \dfrac{\partial}{\partial \tilde y}}\right]u(x, y) = 0 \\ \left[a^2 \dfrac{\partial}{\partial \tilde x} + b^2 \dfrac{\partial}{\partial \tilde x} \right]u(x, y) = 0 \\ (a^2 + b^2) \dfrac{\partial}{\partial \tilde x} u(x, y) = 0 \end{align*}

Where we notice how this transformation of coordinates means that the equation greatly simplifies. Since a,b0a, b \neq 0, then the only way for (a2+b2)x~u(x,y)=0(a^2 + b^2) \dfrac{\partial}{\partial \tilde x} u(x, y) = 0 to be true is if x~u(x,y)=0\dfrac{\partial}{\partial \tilde x} u(x, y) = 0. Now, if we take the partial integral, we find that:

x~u(x,y)=0x~u(x,y)dx~=0dx~u(x,y)=f(y~) \begin{align*} \dfrac{\partial}{\partial \tilde x} u(x, y) = 0 \\ \int \dfrac{\partial}{\partial \tilde x} u(x, y)\, d\tilde x = \int 0\, d\tilde x \\ u(x, y) = f(\tilde y) \end{align*}

Where we remember that we always have to add a constant of integration (technically, function of integration, which we represent with ff here) when taking the partial integral. Recall now that we defined our transformed coordinates such that:

x~=ax+byy~=bxay \begin{align*} \tilde x = a x + by \\ \tilde y = bx - ay \end{align*}

Therefore, by substitution of the bottom equation for y~\tilde y, we have:

u(x,y)=f(y~)=f(bxay) u(x, y) = f(\tilde y) = f(bx - ay)

Where the function ff must be determined by the boundary conditions supplied to the problem. Note that this is the same solution as we arrived by the method of characteristics, showing that the two methods yield identical results (it would be mathematically inconsistent if they didn't!)

Generalized method of characteristics

We may generalize the method of characteristics for first-order linear PDEs with variable coefficients (rather than constant ones). These PDEs are in the form:

f(x,y)ux+g(x,y)uy=0 f(x, y) \dfrac{\partial u}{\partial x} + g(x, y) \dfrac{\partial u}{\partial y} = 0

As with before, we can interpret the left-hand side of the PDE as the directional derivative vu\nabla_\mathrm{v} u along the direction of v=f(x,y),g(x,y)\mathbf{v} = \langle f(x, y), g(x, y)\rangle. Since the directional derivative is equal to zero, there exist characteristic curves along which u(x,y)u(x, y) does not change, instead taking a constant value, just as we saw previously.

To be able to solve for the characteristic curves, we again rewrite the equation into the form:

ux+g(x,y)f(x,y)uy=0 \dfrac{\partial u}{\partial x} + \dfrac{g(x, y)}{f(x, y)} \dfrac{\partial u}{\partial y} = 0

And we still use the multivariable chain rule to find that:

dudx=ux+uydydx \dfrac{du}{dx} = \dfrac{\partial u}{\partial x} + \dfrac{\partial u}{\partial y} \dfrac{dy}{dx}

From which we make the identification that if we set dydx=gf\dfrac{dy}{dx} = \dfrac{g}{f}, then dudx\dfrac{du}{dx} becomes identical to the left-hand side of the PDE. Thus, we need only solve for the differential equation:

dydx=g(x,y)f(x,y) \dfrac{dy}{dx} = \dfrac{g(x, y)}{f(x, y)}

This results in some solution in the form y(x)=G(x)+cy(x) = G(x) + c where cc is a constant. Afterwards, the steps match near-identically from prior discussion of the simpler case.

PDEs from physical phenomena

One of the motiving reasons for the study of partial differential equations is in their close relationship with physics. PDEs model many physical phenomena, such as flows, vibrations, oscillations, diffusion, advection, and heat conduction, just to name a few. In many cases, PDEs can be derived from physical principles, and we will show that this is the case with several examples.

The transport equation

We will first derive the transport equation, with a derivation partially based on the following guide. The transport equation is given by:

ut+cux=0 \dfrac{\partial u}{\partial t} + c\dfrac{\partial u}{\partial x} = 0

To begin our analysis, consider a moving distribution of mass (for instance, spreading cement or some syrup slowly flowing down a spoon), modelled by a mass density function u(r,t)u(\mathbf{r}, t), which varies with time as the distribution moves. For simplicity, we can consider a linear distribution of mass, such that the distribution is confined to move along one axis. Thus, the mass density function depends only on one spatial and one time coordinate, and simplifies to u(x,t)u(x, t). Let us call the velocity at which u(x,t)u(x, t) moves as cc (which we will call the speed of propagation).

Let the mass density at time tt be distributed between two endpoints x=ax = a and x=bx = b. The total mass at tt is found by integrating the mass density between the endpoints x=ax = a and x=bx = b. That is:

M=abu(x,t)dx M = \int_a^b u(x, t) dx

We may find the rate of change of the mass within the region of x=ax = a to x=bx = b as follows:

dMdt=ddtabu(x,t)dx=abutdx \dfrac{dM}{dt} = \dfrac{d}{dt}\int_a^b u(x, t)\, dx =\int_a^b \dfrac{\partial u}{\partial t}\, dx

But by the law of the conservation of mass:

dMdt=ΦM \dfrac{dM}{dt} = -\Phi_M

The quantity on the right-hand side is the mass flux, meaning the net amount of mass flow from the amount of mass leaving the region x=[a,b]x = [a, b] and the amount of mass entering the region at the same time. The flux is thus given by:

ΦM=cdMdxx=bmass flow outcdMdxx=amass flow in \Phi_M = c\underbrace{\dfrac{dM}{dx}\bigg|_{x = b}}_\text{mass flow out} - c\underbrace{\dfrac{dM}{dx} \bigg|_{x = a}}_\text{mass flow in}

Where cc is a factor to ensure the units are dimensionally consistent. But dMdx\dfrac{dM}{dx}, that is, the mass per unit length, is simply the mass density! Thus we may equivalenly write:

ΦM=c[u(b,t)u(a,t)] \Phi_M = c[u(b, t) - u(a, t)]

Where u(b,t)u(b, t) is the mass density at x=bx = b at time tt, and u(a,t)u(a, t) is the mass density at x=ax = a at the same time. We note that by the fundamental theorem of calculus, we have:

c[u(b,t)u(a,t)]=abcuxdx c[u(b, t) - u(a, t)] = \int_a^b c\dfrac{\partial u}{\partial x} dx

So we have:

ΦM=abcuxdx \Phi_M = \int_a^b c\dfrac{\partial u}{\partial x} dx

Recall from earlier that dMdt=ΦM\dfrac{dM}{dt} = -\Phi_M. If we now substitute our derived expressions for dMdt\dfrac{dM}{dt} and ΦM\Phi_M, we have

dMdt=abutdx=abcuxdx \dfrac{dM}{dt} = \int_a^b \dfrac{\partial u}{\partial t}\, dx = -\int_a^b c\dfrac{\partial u}{\partial x} dx

And therefore we have:

abutdx=abcuxdxab(ut+cux)dx=0ut+cux=0 \begin{gather*} \int_a^b \dfrac{\partial u}{\partial t}\, dx = -\int_a^b c\dfrac{\partial u}{\partial x} dx \\ \int_a^b \left(\dfrac{\partial u}{\partial t} + c\dfrac{\partial u}{\partial x}\right) d x = 0 \\ \dfrac{\partial u}{\partial t} + c\dfrac{\partial u}{\partial x} = 0 \end{gather*}

We have arrived at the transport equation. More advanced readers may note that the transport equation is actually the 1D case of the more general continuity equation:

ρt=(Jxx+Jyy+Jzz)=J \begin{align*} \dfrac{\partial \rho}{\partial t} &= -\left(\dfrac{\partial J_x}{\partial x} + \dfrac{\partial J_y}{\partial y} + \dfrac{\partial J_z}{\partial z}\right) \\ &= \nabla \cdot \mathbf{J} \end{align*}

Various forms of the continuity equation appear in nearly all fields in physics, from fluid dynamics to electromagnetic theory to special and general relativity to even quantum mechanics. Thus, studying the transport equation is crucial to understanding its more complex derivatives.

The wave equation

The next PDE we will derive is the wave equation. In its most common form, the one-dimensional wave equation is given by:

2ut2c22ux2=0 \dfrac{\partial^2 u}{\partial t^2} - c^2 \dfrac{\partial^2 u}{\partial x^2} = 0

The standard derivation of the wave equation comes from the study of a vibrating string, in which the tensile force of a string, together with a fair bit of mathematical wizardry, is used to arrive at the PDE. We will take an alternative route and offer a simpler - although less mathematically-rigorous - derivation.

Recall that Newton's second law, in one dimension, is given by:

md2xdt2=Fx(x,t) m\dfrac{d^2 x}{dt^2} = F_x(x, t)

where FxF_x is a force in the xx direction. Now once again, consider a distribution of mass that can be modelled as a mass density function u(x,t)u(x, t). Since we are considering a mass density (i.e. mass over length) rather than a singular mass, the left-hand side of Newton's second law becomes:

md2xdt22ut2 m \dfrac{d^2 x}{dt^2} \Rightarrow \dfrac{\partial^2 u}{\partial t^2}

Now suppose that at time t=0t = 0, an external force is applied that causes a disturbance in the mass distribution. In the traditional derivation of the wave equation, this is stretching a string under tension; but our mass distribution doesn't have to be a string. The mass distribution would respond to the disturbance with a restoring force that "smooths out" the disturbance throughout the mass distribution to try to restore itself to equilibrium. Thus we would expect this force to be proportional to the curvature of the function u(x,t)u(x, t) in space. But recall that the second derivative encodes information about curvature - this is why we use it to determine concavity (concave-up or concave-down) in optimization problems. So we could expect the restoring force to take the form:

Fc22ux2 F \Rightarrow c^2 \dfrac{\partial^2 u}{\partial x^2}

Where c2c^2 is some constant to get the units right (we will discuss its physical significance later). Now, susbtituting everything into Newton's second law, we have:

md2xdt2=2ut2=c22ux2 m\dfrac{d^2 x}{dt^2} = \dfrac{\partial^2 u}{\partial t^2} = c^2 \dfrac{\partial^2 u}{\partial x^2}

Thus, with just a bit of rearrangement, we have arrived at the wave equation:

2ut2c22ux2=0 \dfrac{\partial^2 u}{\partial t^2} - c^2 \dfrac{\partial^2 u}{\partial x^2} = 0

Note that interestingly, the wave equation can be factored into two transport equations, one that gives leftward-traveling (i.e. x-x direction) solutions and one that gives rightward-traveling (i.e. xx direction) solutions:

2ut2c22ux2=(ut+cux)(utcux)(ut+cux)(utcux)=0ut+cux=0,utcux=0 \begin{gather*} \dfrac{\partial^2 u}{\partial t^2} - c^2 \dfrac{\partial^2 u}{\partial x^2} = \left(\dfrac{\partial u}{\partial t} + c\dfrac{\partial u}{\partial x}\right)\left(\dfrac{\partial u}{\partial t} - c\dfrac{\partial u}{\partial x}\right) \\ \left(\dfrac{\partial u}{\partial t} + c\dfrac{\partial u}{\partial x}\right)\left(\dfrac{\partial u}{\partial t} - c\dfrac{\partial u}{\partial x}\right) = 0 \\ \Rightarrow \dfrac{\partial u}{\partial t} + c\dfrac{\partial u}{\partial x} = 0, \\ \dfrac{\partial u}{\partial t} - c\dfrac{\partial u}{\partial x} = 0 \end{gather*}

This is a tremendously-helpful fact, as it means that solving the transport equation already brings us halfway to solving the wave equation.

The diffusion equation

Consider some distribution of mass given by mass density u(r,t)u(\mathbf{r}, t) confined in a volume Ω\Omega. For instance, this may be a gas, which has regions of varying density. The total mass of the gas within the volume would be given by the volume integral of uu over the region:

M=Ωu(r,t)dV M = \int_\Omega u(\mathbf{r}, t)\, dV

By the conservation of mass, any gas that flows out of the volume must flow across the boundary of the volume. For instance, some gas flowing out of an (imaginary) spherical region must flow across the surface of the (imaginary) sphere. The rate at which gas flows, or diffuses, per unit area, is given by Fick's law:

j=nku j = -\mathbf{n} \cdot k \nabla u

To find the total rate of diffusion across the entire boundary of the volume (this is called the flux, denoted Φ\Phi), we need to take the surface integral across the entire surface area of the volume's boundary:

Φ=ΩjdA=ΩnkudA \Phi = \oint_{\partial \Omega} j \, dA = -\oint_{\partial \Omega} \mathbf{n} \cdot k\nabla u\, dA

To ensure the conservation of mass, the reduction in mass of the gas within the volume must be equal to the flux (amount of diffusion out of the volume). Therefore, we have:

Φ=dMdt \Phi = -\dfrac{dM}{dt}

Therefore, by substitution of the expression for MM and Φ\Phi:

ΩnkudA=ddtΩu(r,t)dV -\oint_{\partial \Omega} \mathbf{n} \cdot k\nabla u\, dA = -\dfrac{d}{dt}\int_\Omega u(\mathbf{r}, t)\, dV

Now, recalling the divergence theorem, we can rewrite the surface integral on the left-hand side as a volume integral, as follows:

ΩnkudAΩ(ku)dV -\oint_{\partial \Omega} \mathbf{n} \cdot k\nabla u\, dA \Rightarrow -\int_\Omega \nabla \cdot (k \nabla u)\, dV

Therefore we have:

Ω(ku)dV=ddtΩu(r,t)dV -\int_\Omega \nabla \cdot (k \nabla u)\, dV = -\dfrac{d}{dt}\int_\Omega u(\mathbf{r}, t)\, dV

We may combine this into one integral by using the Leibnitz rule (for differentiation under the integral sign):

ddtΩu(r,t)dV=Ωtu(r,t)dV \dfrac{d}{dt}\int_\Omega u(\mathbf{r}, t)\, dV = \int_\Omega \dfrac{\partial}{\partial t} u(\mathbf{r}, t)\, dV

So that we have:

Ω(tu(r,t)(ku))dV=0 \int_\Omega \left(\dfrac{\partial}{\partial t} u(\mathbf{r}, t) - \nabla \cdot (k \nabla u)\right)\, dV = 0

By the vanishing theorem, the quantity inside the brackets must also be zero. Therefore, we have:

ut(ku)=0 \dfrac{\partial u}{\partial t} - \nabla \cdot (k \nabla u) = 0

Written slightly differently, we have the diffusion equation:

ut=(ku) \dfrac{\partial u}{\partial t} = \nabla \cdot (k \nabla u)

Note that this is the homogeneous case. In the case where there is a source f(r,t)f(\mathbf{r}, t) and k=k(r)k = k(\mathbf{r}), the linear inhomogeneous case becomes:

ut=(k(r)u)+f(r,t) \dfrac{\partial u}{\partial t} = \nabla \cdot (k(\mathbf{r}) \nabla u) + f(\mathbf{r}, t)

In the other case, if there is no source f(r)=0f(\mathbf{r}) = 0, and k=const.k = \text{const.}, then we have (ku)=k2u\nabla \cdot (k \nabla u) = k\nabla^2 u and thus we have:

ut=k2u \dfrac{\partial u}{\partial t} = k \nabla^2 u

If uu does not change with time, then ut=0\dfrac{\partial u}{\partial t} = 0 and thus we have Laplace's equation:

2u=0 \nabla^2 u = 0

Another particular case of the diffusion equation is the heat equation, where the diffusing substance is heat. The distribution of heat is given by the temperature T(r,t)T(\mathbf{r}, t) and the heat equation takes the form:

Tt=α22T \dfrac{\partial T}{\partial t} = \alpha^2 \nabla^2 T

The heat equation's physical basis is Fourier's law: for two regions of temperatures T1,T2T_1, T_2, the rate of heat flow between the regions is proportional to the gradient of the temperature TT. This is very similar to Fick's law for diffusion, and thus the heat equation is classified as a type of diffusion equation.

Finally, a famous case of the diffusion equation (albeit where u=Ψ(r,t)u = \Psi(\mathbf{r}, t) is a complex-valued function) is the Schrödinger equation, which takes the form:

iΨt=22m2Ψ+V(r)Ψ i\hbar \dfrac{\partial \Psi}{\partial t} = -\dfrac{\hbar^2}{2m} \nabla^2 \Psi + V(\mathbf{r}) \Psi

Due to the conservation of probability, the Schrödinger equation requires that the normalization condition to be satisfied:

ΩΨ(r)2dV=1 \int_\Omega |\Psi (\mathbf{r})|^2 dV = 1

Initial and boundary-value problems

We have discussed previously that knowledge of only the PDE is insufficient to provide a unique solution to a given physical problem. Thus, while we may have derived (or at least know) a particular PDE, we can only write down a unique solution when we are provided with initial and boundary conditions.

Let us take the example of the wave equation. Recall that the wave equation can be factored into two transport equations:

(2t2c22x2)u=(t+cx)(tcx)u=0 \left(\dfrac{\partial^2}{\partial t^2} - c^2\dfrac{\partial^2}{\partial x^2}\right) u = \left(\dfrac{\partial}{\partial t} + c\dfrac{\partial}{\partial x}\right)\left(\dfrac{\partial}{\partial t} - c\dfrac{\partial}{\partial x}\right) u = 0

This means that for a solution to be found, we must provide initial and boundary conditions by specifying the values of both the function u(x,t)u(x, t) and its derivatives at specific points along our area of interest. The possible types of initial and boundary conditions for a generalized quantity u(r,t)u(\mathbf{r}, t) described by a PDE are as follows:

Initial/Boundary conditionMathematical formPhysical descriptionExample
Initial conditionu(r,0)=f(r)u(\mathbf{r}, 0) = f(\mathbf{r})The quantity u(r,t)u(\mathbf{r}, t) takes the value f(r)f(\mathbf{r}) at t=0t = 0Initial heat distribution before heat flow for heat equation
Dirichlet boundary conditionu(r,t)Ω=f(r)u(\mathbf{r}, t) \bigg|_{\partial \Omega} = f(\mathbf{r})The quantity u(r,t)u(\mathbf{r}, t) takes a specified value at the boundaries of the area of interestThe initial height of a vibrating membrame for Laplace's equation of a vibrating membrane
Neumann boundary conditionun(r,t)Ω=f(r)\dfrac{\partial u}{\partial n}(\mathbf{r}, t) \bigg|_{\partial \Omega} = f(\mathbf{r})The derivative of the quantity u(r,t)u(\mathbf{r}, t) takes a specified value at the boundaries of the area of interest (note: n\mathbf{n} is the normal vector of the boundary and un=nu\dfrac{\partial u}{\partial n} = \mathbf{n} \cdot \nabla u)The rate of heat spreading away from the edges of a hot object. When uxΩ=0\dfrac{\partial u}{\partial x} \big|_{\partial \Omega} = 0, the object is perfectly insulative, meaning no heat escapes from the object
Robin boundary conditionaun+bu(r,t)Ω=f(r)a\dfrac{\partial u}{\partial n} + b u(\mathbf{r}, t) \bigg|_{\partial \Omega} = f(\mathbf{r})A linear combination of the quantity u(r,t)u(\mathbf{r}, t) and its derivative takes a specified value at the boundaries of the area of interestA linear relation between the spread gas across the boundary and the gas density at that boundary.
Periodic boundary conditionu(r,t)=u(r+b,t)u(\mathbf{r}, t) = u(\mathbf{r} + \mathbf{b}, t)The quantity u(r,t)u(\mathbf{r}, t) repeats such that its vaulue at two points is the sameThe height of a sinusoidal wave at two locations (periodic boundary conditions are often used for oscillating or wave-like phenomena)
Vanishing boundary conditionlimru(r,t)=0\displaystyle \lim_{\mathbf{r} \to \infty} u(\mathbf{r}, t) = 0The quantity u(r,t)u(\mathbf{r}, t) vanishes at infinity (often used for quantities where the total amount is finite)Normalization condition of Schrödinger's equation (which demands that u0u \to 0 as r0\mathbf{r} \to 0)

For instance, suppose our area of interest is a linear region between endpoints x1,x2x_1, x_2, and we want to solve the wave equation. We would then want to specify the initial condition u(x,0)u(x, 0), the boundary conditions u(x1,t)u(x_1, t) and u(x2,t)u(x_2, t), which are Dirichlet boundary conditions, as well as $\dfrac{\partial u(x, 0)}{\partial x} \bigg|{x = x_1}and and \dfrac{\partial u(x, 0)}{\partial x} \bigg|{x = x_2}$ which are Neumann boundary conditions. This combination is called an initial boundary-value problem (IBVP) and allows for finding a unique solution. For partial differential equations that are time-independent, we simply refer to a combination of boundary conditions and the PDE as a boundary-value problem (BVP).

Solving and classifying second-order PDEs

A second-order PDE is a PDE describing a function u(x1,x2)u(x_1, x_2) which has the standard form:

a(x1,x2)2ux12+b(x1,x2)ux1x2+c(x1,x2)2ux22+F(x1,x2,u,ux1,ux2)lower-order terms=0 a(x_1, x_2)\dfrac{\partial^2 u}{\partial x_1^2} + b (x_1, x_2) \dfrac{\partial u}{\partial x_1 \partial x_2} + c(x_1, x_2) \dfrac{\partial^2 u}{\partial x_2^2} + \underbrace{F\left(x_1, x_2, u, \dfrac{\partial u}{\partial x_1}, \dfrac{\partial u}{\partial x_2}\right)}_\text{lower-order terms} = 0

In general, any second-order PDE can be transformed via a coordinate transformation into this standard form. Furthermore, we can distinguish between three main categories of second-order PDEs, based on the coefficients a(x,y)a(x, y), b(x,y)b(x, y), and c(x,y)c(x, y):

Why do we care about the coefficients? The reason is because the qualitative behavior of second-order PDEs is almost entirely determined by its second-order derivative terms. The lower order terms do not really matter as they do not contribute as broadly to the characteristics of the solution. Thus, we are very much interested in whether a second-order PDE is hyperbolic, parabolic, or elliptic.

As a quick non-rigorous guide, we can visually tell whether a solution is hyperbolic, parabolic, or elliptic by the general form they take:

{Hyperbolic:C12ux2C22uy2+lower order terms=0Parabolic:C12ux2+lower order terms=0Elliptic:C12ux2+C22uy2+lower order terms=0 \begin{cases} \text{Hyperbolic:} & C_1\dfrac{\partial^2 u}{\partial x^2} - C_2\dfrac{\partial^2 u}{\partial y^2} + \text{lower order terms} = 0 \\[10pt] \text{Parabolic:} & C_1\dfrac{\partial^2 u}{\partial x^2} + \text{lower order terms} = 0 \\[10pt] \text{Elliptic:} & C_1\dfrac{\partial^2 u}{\partial x^2} + C_2\dfrac{\partial^2 u}{\partial y^2} + \text{lower order terms} = 0 \end{cases}

Source: Stanford MATH220A course

However, it is worth it to familiarize ourselves with each specific type in detail. We will now look at the three standard second-order PDEs, the first one hyperbolic, the second one parabolic, and the third one elliptic.

Note: the names hyperbolic, parabolic, and elliptic originate from the geometric terms of the hyperbola, parabola, and ellipse that are the three standard conic sections. It may seem like PDEs have nothing in common with geometry; on the surface level this can be presumed to be the case (although there is a deeper mathematical connection that comes up in more advanced studies). One can (for now) take the main utility of the geometry-inspired classification system to be a a convenient way to distinguish between the three types of 2nd-order PDEs that is based on familiar terminology.

The standard hyperbolic second-order PDE is the 1D wave equation, which (physically) describes a propagating wave u(x,t)u(x, t):

2ut2c22ux2=0 \dfrac{\partial^2 u}{\partial t^2} -c^2\dfrac{\partial^2 u}{\partial x^2} = 0

While the standard 1D wave equation describes a function of the form u(x,t)u(x, t), one may also write a perfectly valid wave equation that describes a function of the form u(x,y)u(x, y) that takes the form:

2ux2c22uy2=0 \dfrac{\partial^2 u}{\partial x^2} -c^2\dfrac{\partial^2 u}{\partial y^2} = 0

It may not be very apparent how the wave equation fits the standard form of a second-order PDE we looked at previously. To show explicitly that the wave equation does indeed fit the standard form, we may perform a coordinate transformation of the wave equation. Let our transformed coordinates x1,x2x_1, x_2 be given by:

x1=xctx2=x+ct \begin{align*} x_1 &= x - ct \\ x_2 &= x + ct \end{align*}

We then find that in these transformed coordinates, the wave equation takes the form:

2ux1x2=0 \dfrac{\partial^2 u}{\partial x_1 \partial x_2} = 0

We can show this by manually computing the coordinate-transformed partial derivatives by the chain rule:

t=x1tx1+x2tx2=cx1+cx2=c(x2x1)x=x1xx1+x2xx2=x1+x2 \begin{align*} \dfrac{\partial}{\partial t} &= \dfrac{\partial x_1}{\partial t} \dfrac{\partial}{\partial x_1} + \dfrac{\partial x_2}{\partial t} \dfrac{\partial}{\partial x_2} \\ &= -c \dfrac{\partial}{\partial x_1} + c \dfrac{\partial}{\partial x_2} \\ &= c \left(\dfrac{\partial}{\partial x_2}- \dfrac{\partial}{\partial x_1}\right) \\ \dfrac{\partial}{\partial x} &= \dfrac{\partial x_1}{\partial x} \dfrac{\partial}{\partial x_1} + \dfrac{\partial x_2}{\partial x} \dfrac{\partial}{\partial x_2} \\ &= \dfrac{\partial}{\partial x_1} + \dfrac{\partial}{\partial x_2} \end{align*}

From which we obtain:

2t2=t(t)=c(x2x1)c(x2x1)=c2(2x2222x1x2+2x12)2x2=x(x)=(x1+x2)(x1+x2)=(2x12+22x1x2+2x22) \begin{align*} % time derivative \dfrac{\partial^2}{\partial t^2} &= \dfrac{\partial}{\partial t}\left(\dfrac{\partial}{\partial t}\right) \\ &=c \left(\dfrac{\partial}{\partial x_2}- \dfrac{\partial}{\partial x_1}\right)c \left(\dfrac{\partial}{\partial x_2}- \dfrac{\partial}{\partial x_1}\right) \\ &= c^2 \left(\dfrac{\partial^2}{\partial x_2^2} - 2\dfrac{\partial^2}{\partial x_1 \partial x_2} + \dfrac{\partial^2}{\partial x_1^2}\right) \\ % spatial derivative \dfrac{\partial^2}{\partial x^2} &= \dfrac{\partial}{\partial x}\left(\dfrac{\partial}{\partial x}\right) \\ &= \left(\dfrac{\partial}{\partial x_1} + \dfrac{\partial}{\partial x_2}\right) \left(\dfrac{\partial}{\partial x_1} + \dfrac{\partial}{\partial x_2}\right) \\ &= \left(\dfrac{\partial^2}{\partial x_1^2} + 2\dfrac{\partial^2}{\partial x_1 \partial x_2} + \dfrac{\partial^2}{\partial x_2^2}\right) \end{align*}

Therefore substituting into the wave equation we have:

2ut2c22ux2=0c2(2x2222x1x2+2x12)uc2(2x12+22x1x2+2x22)=0c2(2x2222x1x2+2x122x1222x1x22x22)=0c2(2x2222x1x2+2x122x1222x1x22x22)=04c22x1x2=02x1x2=0 \begin{align*} &\dfrac{\partial^2 u}{\partial t^2} -c^2\dfrac{\partial^2 u}{\partial x^2} = 0\\ &c^2 \left(\dfrac{\partial^2}{\partial x_2^2} - 2\dfrac{\partial^2}{\partial x_1 \partial x_2} + \dfrac{\partial^2}{\partial x_1^2}\right)u - c^2 \left(\dfrac{\partial^2}{\partial x_1^2} + 2\dfrac{\partial^2}{\partial x_1 \partial x_2} + \dfrac{\partial^2}{\partial x_2^2}\right) = 0 \\ &c^2 \left(\dfrac{\partial^2}{\partial x_2^2} - 2\dfrac{\partial^2}{\partial x_1 \partial x_2} + \dfrac{\partial^2}{\partial x_1^2} -\dfrac{\partial^2}{\partial x_1^2} - 2\dfrac{\partial^2}{\partial x_1 \partial x_2} - \dfrac{\partial^2}{\partial x_2^2}\right) = 0 \\ &c^2 \left(\cancel{\dfrac{\partial^2}{\partial x_2^2}} - 2\dfrac{\partial^2}{\partial x_1 \partial x_2} + \cancel{\dfrac{\partial^2}{\partial x_1^2}} -\cancel{\dfrac{\partial^2}{\partial x_1^2}} - 2\dfrac{\partial^2}{\partial x_1 \partial x_2} - \cancel{\dfrac{\partial^2}{\partial x_2^2}}\right) = 0 \\ &-4c^2 \dfrac{\partial^2}{\partial x_1 \partial x_2} = 0\\ &\Rightarrow \dfrac{\partial^2}{\partial x_1 \partial x_2} = 0 \end{align*}

Thus we have a(x,y)=c(x,y)=0a(x, y) = c(x, y) = 0 and b(x,y)=1b(x, y) = 1, making the wave equation hyperbolic. The hyperbolic nature of wave equation has some unique consequences for its solutions. First, in solutions to the wave equation, a disturbance (e.g. pulse) in one region propagates at a finite speed in space, where cc is the propagation speed. That is to say, information about one part of a solution can only be transmitted at a finite speed to other parts of the solution. Thus hyperbolic equations in physics typically describe waves, including waves of light (electromagnetic waves), vibrations of a string, and acoustic (sound) waves. Second, hyperbolic equations do not "smooth out" shocks that arise at one point in time. These shocks propagate throughout the solution, but once again, at a finite speed.

Note: the 2D and 3D wave equations can be written as a system of 1D wave equations via a coordinate transformation, which are hyperbolic. Therefore, the 2D and 3D wave equations are also hyperbolic.

The standard parabolic second-order PDE, meanwhile, is the 1D heat equation, which (physically) describes a temperature distribution u(x,t)u(x, t) through time:

ut=α22ux2 \dfrac{\partial u}{\partial t} = \alpha^2 \dfrac{\partial^2 u}{\partial x^2}

Recall that the time derivative on the left-hand side is a lower-order term, and therefore it does not matter. It also does not matter if the left-hand side is a first-order derivative with respect to another variable; the following would still be a heat equation (although not the heat equation):

ux=α22ux2 \dfrac{\partial u}{\partial x} = \alpha^2 \dfrac{\partial^2 u}{\partial x^2}

Since we ignore all lower-order terms when classifying PDEs, the first derivative can be effectively ignored. Therefore, we can place the heat equation in standard form as follows:

α22ux2+=0 \alpha^2 \dfrac{\partial^2 u}{\partial x^2} + \dots = 0

Where we use the notation that \dots represents the lower order ut\dfrac{\partial u}{\partial t} term. In this form, we can tell that a(x,y)=α2a(x, y) = \alpha^2 while b(x,y)=c(x,y)=0b(x, y) = c(x, y) = 0, and thus b24ac=0b^2 - 4 ac = 0, which is the defining characteristic of a parabolic PDE (as we would expect).

Note: As with the wave equation, the 2D and 3D heat equations can also be put in parabolic form by rewriting them as a first-order system; each equation in the system would then take a parabolic form. Therefore, the 2D and 3D heat equations are also parabolic.

Just as the wave equation possesses specific properties due to it being hyperbolic, the heat equation possesses specific properties due to it being parabolic. One property is that maxima and minima in the solution tend to be "smoothed out" as the solution u(x,t)u(x, t) evolves in time, resulting in (mostly) smooth solutions. The behavior happens *globally (i.e. across the entire solution) at the same time. That is to say, unlike the wave equation, the heat equation assumes infinite propagation speed and thus describes phenomena where a bulk quantity uniformly stabilizes towards equilibrium (as opposed to the non-uniform delayed propagation of information in the wave equation). Thus the heat equation physically describes diffusion and diffusion-like phenomena, making it the natural choice to describe heat transfer.

Lastly, the the standard elliptic second-order PDE is Laplace's equation (in 2D), which describes a wide variety of phenomena in physics. It takes the form:

2ux2+2uy2=0 \dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} = 0

Note that the positive sign matters here - if the plus sign were a negative sign, we would instead have a hyperbolic PDE. Laplace's equation can also be written in terms of the Laplacian operator 2\nabla^2 as:

2u=0 \nabla^2 u = 0

Where the Laplacian in two dimensions takes the form 2=2x2+2y2\nabla^2 = \dfrac{\partial^2}{\partial x^2} + \dfrac{\partial^2}{\partial y^2}, and thus gives Laplace's equation:

2ux2+2uy2=0 \dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} = 0

The Laplace equation, in this form, is already in the standard form of a 2nd-order PDE (that we covered at the beginning of this section). As it has the coefficients a(x,y)=c(x,y)=1a(x, y) = c(x, y) = 1 and b(x,y)=0b(x, y) = 0, we have b24ac<0b^2 - 4ac < 0, which makes the PDE elliptic.

Note: Laplace's equation in 3D (which also takes the form 2u=0\nabla^2 u = 0, just with the 3D Laplacian, so it reads 2ux2+2uy2+2uz2=0\dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} + \dfrac{\partial^2 u}{\partial z^2} = 0) is also elliptic, which can be shown (again) by rewriting it as a system of PDEs). However, Laplace's equation in 1D is not elliptic (rather, it is parabolic).

As the standard elliptic PDE, Laplace's equation demonstrates several of the defining characteristics of elliptic PDEs. First, note that Laplace's equation is usually written in a time-independent form - therefore, it describes steady-state systems (i.e. systems at equilibrium) that are slowly-evolving or constant in time. For instance, in electrostatics, the electric potential V(x,y)V(x, y) satisfies Laplace's equation. Second, the solutions to Laplace's equation are always smooth. This is because, just like parabolic PDEs, information about parts of a solution can be thought of as travelling instantly between different parts of the solution; the nuance being that physical scenarios modelled by Laplace's equation are ones that already reached equilibrium. This also means that for tt \to \infty, the 2D heat equation becomes Laplace's equation as ut0\dfrac{\partial u}{\partial t} \to 0.

The three representative 2nd-order PDEs - the wave equation, heat equation, and Laplace's equation - are unique in that any second-order hyperbolic, parabolic, and elliptic PDE can be transformed into one of those equations (ignoring the lower-order terms, which are not significant). Thus the study of these three 2nd-order PDEs provides results that carry over to all 2nd-order PDEs. Therefore, we can summarize our general conclusions about 2nd-order PDEs as follows:

Type of 2nd-order PDERepresentative equationRepresentative form
HyperbolicWave equation2ut2c22u+F(x,y,z,t,xu,yu,zu,tu)=0\dfrac{\partial^2 u}{\partial t^2} -c^2\nabla^2 u + F(x, y, z, t, \partial_x u, \partial_y u, \partial_z u, \partial_t u) = 0
ParabolicHeat equationutα22u+F(x,y,z,t,xu,yu,zu,tu)=0\dfrac{\partial u}{\partial t} -\alpha^2\nabla^2 u + F(x, y, z, t, \partial_x u, \partial_y u, \partial_z u, \partial_t u) = 0
EllipticLaplace's equation2uF(x,y,z,xu,yu,zu)=0\nabla^2 u - F(x, y, z, \partial_x u, \partial_y u, \partial_z u) = 0

It is also possible to condense this information in a matrix, as follows:

A=(ab/2b/2c)=(a(x,y)b(x,y)/2b(x,y)/2c(x,y)) A = \begin{pmatrix} a & b/2 \\ b/2 & c \end{pmatrix} = \begin{pmatrix} a(x, y) & b(x, y)/2 \\ b(x, y)/2 & c(x, y) \end{pmatrix}

We may find the eigenvalues of the matrix by solving eigenvalue equation:

det(AλI)=0aλb/2b/2cλ=0(aλ)(cλ)b24=0 \begin{align*} &\det(A - \lambda I) = 0 \\ &\Rightarrow \begin{vmatrix} a -\lambda & b/2 \\ b/2 & c-\lambda \end{vmatrix} = 0 \\ &\Rightarrow (a-\lambda)(c - \lambda) - \dfrac{b^2}{4} = 0 \end{align*}

The solutions λ\lambda to the above equation are the eigenvalues of AA. The eigenvalues of the matrix can then be used to determine the classification of the PDE:

Type of 2nd-order PDEEigenvalues of AA
HyperbolicOpposite signs
ParabolicAt least one eigenvalue is zero
EllipticSame signs

Mixed-type 2nd-order PDEs

We have seen that 2nd-order PDEs may be classified, based on their coefficients, as hyperbolic, parabolic, or elliptic. But these distinctions are not as clear-cut as they may first appear; in fact, a 2nd-order PDE may be of mixed type, which means it can be hyperbolic in one region, parabolic in another region, and elliptic in yet another region. Consider the following 2nd-order PDE:

2ux2+(x2y2)2uy2=0 \dfrac{\partial^2 u}{\partial x^2} + (x^2 - y^2) \dfrac{\partial^2 u}{\partial y^2} = 0

From first appearance, this PDE may appear to be elliptic, as evidenced by the positive sign. But we must exercise caution, as this is not always so; in fact, it is only true for x>y|x| > |y|. Notice what happens at the origin, where x=y=0|x| = |y| = 0: then second term becomes zero, and we are left with:

2ux2=0 \dfrac{\partial^2 u}{\partial x^2} = 0

Which is a parabolic differential equation. Finally, if we have x<y|x| < |y|, the second term would then become negative, which is a hyperbolic differential equation. This is why we classify this PDE as a mixed-type, as it is classified differently depending on region. Below is a graph of the regions in which the PDE takes each type (red represents x>y|x|>|y| and thus elliptic, blue represents x<y|x| < |y| and thus hyperbolic, and the dashed black line represents x=y|x| = |y| and thus parabolic):

A graph showing the PDE's different regions, with regions between the lines y = x and y = -x being elliptic, regions on either line being parabolic, and all other regions being hyperbolic.

Existence, uniqueness, and stability

Up to this point, we have been solving PDEs with the assumption that solutions always exist and are unique and that solutions are stable. That is, a solution satisfies the following characteristics:

It may be odd to think that solutions may not even exist for a given PDE and boundary conditions, but this is possible. Typically, the most straightforward to show that a solution does not exist is to (attempt to) solve a given problem with the provided boundary conditions, and show that the boundary conditions are impossible to be satisfied.

Furthermore, even if a solution exists, there may be multiple solutions possible - a good check is to see if the trivial solution u=0u = 0 is a solution to the BVP in addition to some other solution, or if a solution u+Cu + C where CC is some constant is still a solution to the BVP. If multiple solutions are possible, then we say that the solution is non-unique. For example, consider the following BVP for the transport equation:

ux=uyu(0,y)=0u(L,y)=0 \begin{gather*} \dfrac{\partial u}{\partial x} = -\dfrac{\partial u}{\partial y} \\ u(0, y) = 0 \\ u(L, y)= 0 \end{gather*}

In this case through just guess-and-check we find that one particular solution to the BVP is the function u(x,y)=sin(πL(xy))u(x, y) = \sin \left(\dfrac{\pi}{L}(x - y)\right). There is, however, another solution: u(x,y)=0u(x, y) = 0. Thus the solution is certainly not unique.

In many cases, physical intuition can be enough to deduce whether the boundary conditions lead to nonexistent or non-unique solutions. If a PDE doesn't have sufficiently many boundary conditions, a solution often exists but is not unique. For instance.

Finally, a PDE (and particularly hyperbolic PDEs) may have numerical instabilities that make a solution useless to compute even if found. If a problem satisfies all of the three criteria, for which we say that the problem is well-posed. This is particularly true for hyperbolic PDEs, which are in the form of the modified wave equation:

2ux22uy2+=0 \dfrac{\partial^2 u}{\partial x^2} - \dfrac{\partial^2 u}{\partial y^2} + \dots = 0

Such PDEs are highly sensitive to their initial conditions and thus stability depends on the smoothness (i.e. no abrupt jumps, discontinuities, and asymptotic behavior) of their initial conditions. The same is often true with nonlinear PDEs. Again, instability is hard to show without explicitly solving the BVP and examining the resulting solution.

It is rarely possible to prove existence, uniqueness, and stability for a general class of boundary-value (or initial-value) problems. It is often much easier to give a counterexample (i.e. disprove existence, uniqueness, and stability). Even when the conditions of existence, uniqueness, and stability are satisfied, it may be impossible to prove this or a proof may only be possible on a case-by-case basis. In this introductory treatment of PDEs, we will not delve into the intricacies of proving existence, uniqueness, and stability, which involves very advanced mathematics.

It is, however, useful to mention several theorems for specific PDEs that provide for existence and uniqueness (and in some cases, stability):

Theorem 1: The solution to Poisson's equation 2f=0\nabla^2 f = 0 (as well as its limiting case, Laplace's equation, given by 2f=0\nabla^2 f = 0) is a unique solution for the boundary condition u(r)boundary=f(r)u(\mathbf{r})_\text{boundary} = f(\mathbf{r}) as well as for the boundary condition un=g(r)\dfrac{\partial u}{\partial n} = g(\mathbf{r}). That is to say, if the values of uu are specified on the boundary, or if the values of the derivative of uu are specified on the boundary (but not specifying both), then a solution will always exist and is unique.

Theorem 2: By the Cauchy–Kowalewskaya Theorem, any second-order PDE in the form of the wave equation or diffusion equation with the Cauchy (initial) conditions u(r,0)boundary=f(r)u(\mathbf{r}, 0)_\text{boundary} = f(\mathbf{r}), ut(r,0)=g(r)\dfrac{\partial u}{\partial t}(\mathbf{r}, 0) = g(\mathbf{r}) yields a unique solution if both conditions are provided and ff and gg are both functions with well-defined power series.

Theorem 3: Assuming theorem (2) holds, the solution to the diffusion equation 2ut2=k2u\dfrac{\partial^2 u}{\partial t^2} = k \nabla^2 u is always stable for t0t \geq 0 (although unstable for t<0t < 0).

Theorem 4: Assuming theorem (1) holds, the solution to Poisson's equation and Laplace's equation is always stable.

Solutions of the wave equation

We have previously seen that the wave equation is the prototypical hyperbolic PDE, and is given by:

2ut2=c22ux2 \dfrac{\partial^2 u}{\partial t^2} = c^2 \dfrac{\partial^2 u}{\partial x^2}

Note: The fact that the equation has c2c^2 instead of cc as a constant is significant. c2c^2 is guaranteed to be positive, while cc can be positive or negative, and this makes a massive difference in the behavior of the PDE (and therefore, its solutions).

As the prototypical hyperbolic PDE, the wave equation has a special significance because any hyperbolic PDE can be transformed into the wave equation by a change of coordinates. In addition, it has the desirable characteristic that its general solution is actually rather simple:

u(x,t)=f(xct)+g(x+ct) u(x, t) = f(x - ct) + g(x + ct)

Which we can find by the method of characteristics or by the method of coordinate transforms and then direct integration (which we previously showed). Particular solutions for the wave equation can be found by giving initial conditions. Let us consider the specific initial-value problem given by:

u(x,0)=φ(x)ut(x,0)=ψ(x) \begin{align*} u(x, 0) = \varphi(x) \\ \dfrac{\partial u}{\partial t}(x, 0) = \psi(x) \end{align*}

Where φ(x),ψ(x)\varphi(x), \psi(x) are arbitrary functions. This initial-value problem possesses a particular solution, given by:

u(x,t)=12[φ(xct)+φ(x+ct)]+12cxctx+ctψ(x)dx u(x, t) = \dfrac{1}{2} [\varphi(x - ct) + \varphi(x + ct)] + \dfrac{1}{2c} \int_{x - ct}^{x + ct}\psi(x')dx'

In the special case where we have ut(x,0)=φ(x)=0\dfrac{\partial u}{\partial t}(x, 0) = \varphi(x) = 0, then the particular solution reduces to:

u(x,y)=12φ(xct)+12φ(x+ct) u(x, y) = \dfrac{1}{2} \varphi(x - ct) + \dfrac{1}{2}\varphi(x + ct)

Meanwhile in the special case we have u(x,0)=ψ(x)=0u(x, 0) = \psi(x) = 0, then the particular solution reduces to:

u(x,t)=12cxctx+ctψ(x)dx u(x, t) = \dfrac{1}{2c} \int_{x - ct}^{x + ct}\psi(x')dx'

Solutions of relevance in physics

One of the most useful particular solutions to the wave equation (particularly in Physics) is found by imposing the additional periodic boundary conditions that u(x,t)=u(x+λ,t)u(x, t) = u(x + \lambda, t) and u(x,t)=u(x,t+T)u(x, t) = u(x, t + T). The solution then becomes:

u(x,t)=Acos(2πxλ2πTt)+Bsin(2πxλ+2πTt) u(x, t) = A\cos \left(\dfrac{2\pi x}{\lambda} - \dfrac{2\pi}{T} t\right) + B \sin \left(\dfrac{2\pi x}{\lambda} + \dfrac{2\pi}{T} t\right)

Which can also be written in a more compact form if we define ω=2πT\omega = \dfrac{2\pi}{T} and k=2πλk = \dfrac{2\pi}{\lambda}, as follows:

u(x,t)=Acos(kxωt)+Bsin(kx+ωt) u(x, t) = A \cos (k x - \omega t) + B\sin (kx + \omega t)

In physics, each of these quantities has a very specific physical interpretation - λ\lambda is called the wavelength, TT is called the period, ω\omega is the angular frequency and kk is called the wavenumber. Such solutions are known as plane-wave solutions (also called traveling waves) as they describe waves that propagate sinusoidally to infinity, with their wavefronts being uniform (thus, planar). See the guide on waves and oscillations in physics for more details.

Note: we can construct a more general solution if we write this solution as u(x,t)=Ceikxiωtu(x, t) = C e^{ikx - i\omega t} by Euler's formula eiϕ=cosϕ+isinϕe^{i\phi} = \cos \phi + i \sin \phi. As the wave equation is linear, we can sum over an infinite number of plane waves spaced out in space (with different values of kk) to have u(x,t)=12πC(k)eikxiωtdku(x, t) = \dfrac{1}{\sqrt{2\pi}} \displaystyle \int C(k) e^{ikx - i\omega t} dk. This is also a form often used in physics.

Note that a particular case of this particular solution can also be found with the following boundary conditions:

u(x,0)=0ux(x,0)=ψ(x)=cosx \begin{align*} u(x, 0) &= 0 \\ \dfrac{\partial u}{\partial x}(x, 0) &= \psi(x) \\ &=\cos x \end{align*}

Where we have:

u(x,t)=12cxctx+ctψ(x)dx=12cxctx+ctcosxdx=12c(sinx)xctx+ct=12c[sin(x+ct)sin(xct)] \begin{align*} u(x, t) &= \dfrac{1}{2c} \int_{x - ct}^{x + ct}\psi(x')dx' \\ &= \dfrac{1}{2c} \int_{x - ct}^{x + ct} \cos x' dx' \\ &= \dfrac{1}{2c} (\sin x) \bigg|_{x - ct}^{x + ct} \\ &= \dfrac{1}{2c}[ \sin(x + ct) - \sin(x - ct)] \end{align*}

We may verify that this solution does, indeed, satisfy the wave equation:

2ux2=12c[sin(x+ct)sin(xct)]2ut2=12c[sin(x+ct)sin(xct)]2ut2c22ux2=12c[sin(x+ct)sin(xct)]c2sin(x+ct)c2(12c)[sin(x+ct)sin(xct)]=0 \begin{align*} \frac{\partial^2 u}{\partial x^2} &= -\dfrac{1}{2c}[\sin(x + ct) - \sin(x - ct)] \\ \frac{\partial^2 u}{\partial t^2} &= -\dfrac{1}{2}c[\sin(x + ct) - \sin(x - ct)] \\ \frac{\partial^2 u}{\partial t^2} - c^2\frac{\partial^2 u}{\partial x^2} &= -\dfrac{1}{2}c[\sin(x + ct) - \sin(x - ct)]-c^2\sin(x + ct) \\ &-c^2\left(-\dfrac{1}{2c}\right)[ \sin(x + ct) -\sin(x - ct)] \\ &=0\quad \checkmark \end{align*}

As we saw previously, solutions to the wave equation (waves) have the universal feature that the wave travels to the right, that is, f(xct)f(x - ct), and travels to the left, that is, f(x+ct)f(x +ct), at a speed of propagation of cc. Since cc is a constant, cc is also the maximal speed at which information at a particular point xx of a solution can affect another particular point x=x±ctx' = x \pm ct. This has important consequences in physics: light is described in physics as an electromagnetic wave, and thus the cc is the famous speed of light, which is invariant (the same everywhere) and directly led to the development of the theory of relativity.

But remember that the wave equation describes all types of waves, one of which being the vibrations of a string, attached at its two ends. In this case, u(x,t)u(x, t) represents the displacement of the string from its equilibrium point. If we let the string be of length LL and have density ρ\rho under tension force TT, then the boundary-value problem for the string reads:

2ut2=v22ux2,v=Tρ,u(x,0)={0,x<0f(x),0xL0,x>0,ut(0,t)=ut(L,t)=0 \begin{align*} &\dfrac{\partial^2 u}{\partial t^2} =v^2 \dfrac{\partial^2 u}{\partial x^2}, \\ & v = \sqrt{\frac{T}{\rho}}, \\ &u(x, 0) = \begin{cases} 0, & x< 0 \\ f(x), &0 \leq x \leq L \\ 0, & x> 0 \end{cases}, \\ &\dfrac{\partial u}{\partial t}(0, t) = \dfrac{\partial u}{\partial t}(L, t) = 0 \end{align*}

We note that the wave equation for a string can be equivalently written (by expanding out v2v^2 and distributing) as:

ρ2ut2=T2ux2 \rho\dfrac{\partial^2 u}{\partial t^2} = T\dfrac{\partial^2 u}{\partial x^2}

The expression for the kinetic energy of the string is given by:

K=12mv2=120Lρ(ut)2dx K = \dfrac{1}{2} mv^2 = \dfrac{1}{2} \int_0^L \rho \left(\dfrac{\partial u}{\partial t}\right)^2 dx

Where we must integrate over xx as ρ=dmdx\rho = \dfrac{dm}{dx} and thus to find the total mass we have to integrate the mass density across the string. If we assume constant density, we have:

K=12ρ0L(ut)2dx K = \dfrac{1}{2} \rho\int_0^L \left(\dfrac{\partial u}{\partial t}\right)^2 dx

If we differentiate the kinetic energy we have:

dKdt=ddt[12ρ0L(ut)2dx]=12ρ0Lt(ut)2Leibnitz ruledx=ρ0Lutt(ut)Chain ruledt=ρ0Lut2ut2dt \begin{align*} \dfrac{dK}{dt} &= \dfrac{d}{dt}\left[ \dfrac{1}{2} \rho\int_0^L \left(\dfrac{\partial u}{\partial t}\right)^2 dx\right] \\ &= \dfrac{1}{2} \rho\int_0^L \underbrace{\dfrac{\partial}{\partial t}\left(\dfrac{\partial u}{\partial t}\right)^2}_\text{Leibnitz rule} dx \\ &= \rho \int_0^L \underbrace{\dfrac{\partial u}{\partial t} \dfrac{\partial}{\partial t}\left(\dfrac{\partial u}{\partial t}\right)}_\text{Chain rule}dt \\ &= \rho \int_0^L \dfrac{\partial u}{\partial t} \dfrac{\partial^2 u}{\partial t^2}dt \end{align*}

But remember the wave equation for a string reads ρ2ut2=T2ux2\rho\dfrac{\partial^2 u}{\partial t^2} = T\dfrac{\partial^2 u}{\partial x^2}. Therefore, substituting in, we have:

dKdt=ρ0Lut2ut2dt=T0Lut2ux2dt=Tutux0LT0Lx(ut)uxdxintegration by parts=Tutux0LT0L2uxtuxdx=Tutux0Lsince u(0,t)=u(0,t)=0T0L2uxtuxdx=T0L2uxtuxdx=Tddt0L12(ux)2dxtotal derivative - reverse chain rule \begin{align*} \dfrac{dK}{dt} &=\rho \int_0^L \dfrac{\partial u}{\partial t} \dfrac{\partial^2 u}{\partial t^2}dt \\ &= T \int_0^L \dfrac{\partial u}{\partial t} \dfrac{\partial^2 u}{\partial x^2}dt \\ &= \underbrace{T \dfrac{\partial u}{\partial t}\dfrac{\partial u}{\partial x}\bigg|_0^L - T \int_0^L \dfrac{\partial}{\partial x}\left(\dfrac{\partial u}{\partial t}\right) \dfrac{\partial u}{\partial x} dx}_\text{integration by parts} \\ &= T \dfrac{\partial u}{\partial t}\dfrac{\partial u}{\partial x}\bigg|_0^L - T \int_0^L \dfrac{\partial^2 u}{\partial x \partial t} \dfrac{\partial u}{\partial x} dx \\ &= \underbrace{\cancel{T \dfrac{\partial u}{\partial t}\dfrac{\partial u}{\partial x}\bigg|_0^L}}_{\text{since } u(0, t) = u(0, t) = 0} - T \int_0^L \dfrac{\partial^2 u}{\partial x \partial t} \dfrac{\partial u}{\partial x} dx \\ &= - T \int_0^L \dfrac{\partial^2 u}{\partial x \partial t} \dfrac{\partial u}{\partial x} dx \\ &= \underbrace{-T\dfrac{d}{dt}\int_0^L \dfrac{1}{2}\left(\dfrac{\partial u}{\partial x}\right)^2 dx}_\text{total derivative - reverse chain rule} \end{align*}

Meanwhile, the potential energy of a string (which we will not derive, but it comes from the work-energy theorem K=UK = -U) is given by:

U=dKdt=12T0L(ux)2dx U = -\dfrac{dK}{dt} =\dfrac{1}{2} T\int_0^L \left(\dfrac{\partial u}{\partial x}\right)^2 dx

Thus we find that the total mechanical energy, given by the sum of the kinetic and potential energies, is given by:

E=K+U=12ρ0L(ut)2dx+12T0L(ux)2dx=120Lρ(ut)2+T(ux)2dx \begin{align*} E &= K + U \\ &= \dfrac{1}{2} \rho\int_0^L \left(\dfrac{\partial u}{\partial t}\right)^2 dx + \dfrac{1}{2} T\int_0^L \left(\dfrac{\partial u}{\partial x}\right)^2 dx \\ &= \dfrac{1}{2} \int_0^L \rho \left(\dfrac{\partial u}{\partial t}\right)^2 + T\left(\dfrac{\partial u}{\partial x}\right)^2\, dx \end{align*}

But since K=UK = -U, then dKdt=dUdt\dfrac{dK}{dt} = -\dfrac{dU}{dt}, and therefore dEdt=dKdt+dUdt=0\dfrac{dE}{dt} = \dfrac{dK}{dt} + \dfrac{dU}{dt} = 0. Therefore, total mechanical energy is always constant, as required by the law of the conservation of energy, and this constant value of energy is equal to:

E=120Lρ(ut)2+T(ux)2dx E = \dfrac{1}{2} \int_0^L \rho \left(\dfrac{\partial u}{\partial t}\right)^2 + T\left(\dfrac{\partial u}{\partial x}\right)^2\, dx

Solutions of the diffusion equation

As we recall, the diffusion equation is the prototypical parabolic equation. It is given by:

ut=k2ux2 \dfrac{\partial u}{\partial t} = k \dfrac{\partial^2 u}{\partial x^2}

As the prototypical parabolic PDE, the wave equation has a special significance because any hyperbolic PDE can be transformed into the diffusion equation by a change of coordinates.

Note: A special case of the diffusion equation is the well-studied heat equation, which many texts use in place of the diffusion equation. The diffusion equation, however, is more general.

Let us consider the following intial-boundary-value problem (IVBP) for the diffusion equation:

ut=k2ux2u(x,0)=φ(x)u(L1,t)=g(t)u(L2,t)=f(t)t0,L1xL2 \begin{gather*} \dfrac{\partial u}{\partial t} = k \dfrac{\partial^2 u}{\partial x^2} \\[10pt] u(x, 0) = \varphi(x) \\ u(L_1, t) = g(t) \\ u(L_2, t) = f(t) \\ t \geq 0, L_1 \leq x \leq L_2 \end{gather*}

The first (initial) condition for u(x,0)u(x, 0) describes the initial spatial distribution of the function u(x,t)u(x, t) at t=0t = 0, whereas the second and third (boundary) conditions describe the value of uu through time on the boundaries x=L1,x=L2x = L_1, x = L_2. The two boundary conditions must satisfy the consistency condition f(0)=φ(L2),g(0)=φ(L1)f(0) = \varphi(L_2), g(0) = \varphi(L_1). The heat equation satisfies four important conditions (which we will not prove and simply state, as the proofs are very lengthy):

Maximum principle: For any solution u(x,t)u(x, t) for a well-posed initial-boundary-value problem, then u(x,t)u(x,0)u(x, t) \leq u(x, 0) at all times t0t \geq 0. The maximum of u(x,t)u(x, t) must lie on either t=0t = 0 or at one of the boundaries x[0,L]x \in [0, L]

Minimum principle: For any solution u(x,t)u(x, t) for a well-posed initial-boundary-value problem, then minu(x,t)min[φ(x),f(t),g(t)]\operatorname{min}u(x, t) \geq \operatorname{min} [\varphi(x), f(t), g(t)]. The minimum must lie on either t=0t = 0 or at one of the boundaries x[0,L]x \in [0, L]

Well-posedness theorem for the heat equation: For the aforementioned boundary-value problem, a solution always exists, is unique, and is stable: a small perturbation u(x+δx,0)u(x + \delta x, 0) does not strongly affect the solution u(x,t)u(x, t). That is, for two given points (x1,0),(x2,0)(x_1, 0), (x_2, 0) for which (x1,0)(x2,0)ϵ1|(x_1, 0) - (x_2, 0)| \leq \epsilon_1 (where ϵ1\epsilon_1 is a small number), then one may always find a unique solution, and u(x1,t)u(x2,t)ϵ2|u(x_1, t) - u(x_2, t)| \leq \epsilon_2 for all times tt (i.e. two points initially close together stay together).

Linear property of solutions: For any solution u(x,t)u(x, t), then u(xa,t)u(x - a, t) and u(ax,at)u(\sqrt{a}x, a t) is also a solution.

Differentiation and integration of solutions: For any solution u(x,t)u(x, t) that possesses a derivative v=utv = \dfrac{\partial u}{\partial t}, vv also satisfies a diffusion equation vt=k2vt2\dfrac{\partial v}{\partial t} = k\dfrac{\partial^2 v}{\partial t^2}. Likewise, for any solution u(x,t)u(x, t) that possesses an integral I=abu(x,t),dxI = \displaystyle \int_a^b u(x, t),dx, II also satisfies a diffusion equation It=k2It2\dfrac{\partial I}{\partial t} = k\dfrac{\partial^2 I}{\partial t^2}. The same applies for I=abu(xy,t)g(y),dyI = \displaystyle \int_a^b u(x - y, t)g(y),dy This directly results from the linearity of the diffusion equation (i.e. the sum u1+u2u_1 + u_2 of two solutions u1,u2u_1, u_2 is also a solution).

Intuitively, these results makes the diffusion equation extremely easy (and powerful) to work with. In addition, they allow us to write the general solution of the diffusion equation either in terms of an infinite series:

u(x,t)=i=1nanun(x,t)=a1u1(x,t)+a2u2(x,t)++anun(x,t) u(x, t) = \sum_{i = 1}^n a_n u_n(x, t) = a_1 u_1(x, t) + a_2 u_2(x, t) + \dots + a_n u_n(x, t)

Or in terms of an integral:

u(x,t)=u(x,t)dx u(x, t) = \int_{-\infty}^\infty u(x', t)\, dx'

Note: Whether the general solution should be written as a sum or integral typically depends on the boundary conditions (though it can also depend on other factors).

Let us now consider solving the initial-boundary-value problem for the diffusion equation, as shown:

ut=α2ux2u(x,0)=φ(x)limx±φ(x)=0 \begin{gather*} \dfrac{\partial u}{\partial t} = \alpha \dfrac{\partial^2 u}{\partial x^2} \\ u(x, 0) = \varphi(x) \\ \lim_{x \to \pm \infty} \varphi(x) = 0 \end{gather*}

This initial-boundary-value problem is often called diffusion on the real line. We may solve this problem as follows. It should be noted that this is not the conventional way it is derived and is not a rigorous derivation at all. To start, let us assume a solution in the form u(x,t)=φ(x)Q(t)u(x, t) = \varphi(x) Q(t) (this is actually a valid assumption because the diffusion equation is separable). In this form, if we differentiate, we find that:

ut=Q(t)φ(x),2ux2=Q(t)φ(x) \begin{matrix*} \dfrac{\partial u}{\partial t} = Q'(t) \varphi(x), &\dfrac{\partial^2 u}{\partial x^2} = Q(t) \varphi''(x) \end{matrix*}

Where we can effectively treat φ\varphi as a constant when differentiating with respect to tt since QQ doesn't depend on time, and likewise, we can treat Q(t)Q(t) as a constant when differentiating with respect to xx since QQ doesn't depend on position. If we substitute into the PDE then divide both sides by QφQ \varphi, we have:

ut=α2ux2Qφ=αQφ1QφQφ=1QφαQφQQ=φαφ=const. \begin{gather*} \dfrac{\partial u}{\partial t} = \alpha \dfrac{\partial^2 u}{\partial x^2} \\ Q' \varphi = \alpha Q \varphi'' \\ \dfrac{1}{Q\varphi}Q' \varphi = \dfrac{1}{Q\varphi}\alpha Q \varphi'' \\ \dfrac{Q'}{Q} = \dfrac{\varphi''}{\alpha \varphi} = \text{const.} \end{gather*}

The last line arises from the property that when two derivatives are equal, both must be equal to a constant. This means we now have two differential equations, Q/Q=const.Q'/Q = \text{const.} and φ/αφ=const.\varphi'' / \alpha \varphi = \text{const.} Let us look at just the first equation. If we call the constant in the equation κ-\kappa (the sign does not matter as the constant is arbitrary), then we have:

Q=κQ Q' = -\kappa Q

Which has the solution:

Q(t)=eκt Q(t) = e^{-\kappa t}

Thus our solution becomes:

u(x,t)=φ(x)eκt u(x, t) = \varphi(x) e^{-\kappa t}

But this is not a general solution (yet) because due to the property of linearity of the diffusion equation (which we showed previously), u1+u2u_1 + u_2 is also a solution. Therefore, the more general solution is a linear sum of solutions:

u(x,t)=nAnφ(x)eκnt u(x, t) = \sum_n A_n \varphi(x) e^{-\kappa_n t}

In the limiting case, this becomes the general solution (at least for the given initial and boundary conditions):

u(x,t)=A(x)φ(x~)eκtdx~ u(x, t) = \int_{-\infty}^\infty A(x) \varphi(\tilde x) e^{-\kappa t} d \tilde x

Where we must switch the bounds for the φ\varphi term from xyx \to y to distinguish the variables we are integrating over versus the variables that represent the coordinates of u(x,t)u(x, t) - this is due to the fundamental theorem of calculus 0xf(x~)dy=f(x~)\displaystyle \int_0^x f'(\tilde x) dy = f'(\tilde x). The above equation is true for any A(x)A(x) that allows u(x,t)u(x, t) to satisfy the given boundary conditions. An intuitive explanation is as follows: if we sum infinitely-many "clones" of the solution φ(x)\varphi(x) spaced-out at different positions xx and different times tt (as governed by A(x)A(x)), then the solutions can add up to form an arbitrary function (in some ways, similar to Taylor series or Fourier series if that is familiar).

Now, recall the property (which we showed before) that for any solution v(x,t)v(x, t), any shift of the solution u(x,t)=v(xa,t)u(x, t) = v(x -a, t) is also a solution. If we let our previous solution be written v(x,t)v(x, t), that is:

v(x,t)=A(x)φ(x~)eκtdx~ v(x, t) = \int_{-\infty}^\infty A(x) \varphi(\tilde x) e^{-\kappa t} d \tilde x

then we have:

u(x,t)=A(xa)φ(x~a)eκtdx~ u(x, t) = \int_{-\infty}^\infty A(x-a) \varphi(\tilde x-a) e^{-\kappa t} d \tilde x

We can write this in a simpler form if we use the change of variables y=x~ay = \tilde x- a, for which the solution simplifies to:

u(x,t)=A(y(x))φ(y)eκtdy u(x, t) = \int_{-\infty}^\infty A(y(x)) \varphi(y) e^{-\kappa t} dy

The final step is require that the solution does indeed satisfy the boundary conditions - that is, φ0\varphi \to 0 for x±x \to \pm \infty (the other boundary condition u(x,0)=φ(x)u(x, 0) = \varphi(x) is automatically-satisfied from our separation of variables procedure). A specific A(x,y,t)A(x, y, t) that does indeed satisfy the boundary conditions is the Gaussian (which in this case is a shifted Gaussian to accomodated our shifted solution):

A(x)=14πκte(xy)2/4κt+κt A(x) = \dfrac{1}{\sqrt{4\pi \kappa t}}e^{-(x-y)^2/4\kappa t + \kappa t}

Therefore substituting A(k)A(k) we have:

u(x,t)=[14πκte(xy)2/4κt+κt]φ(y)eκtdy=14πκte(xy)2/4κt+κtκtφ(y)dy=14πκte(xy)2/4κtφ(y)dy \begin{align*} u(x, t) &= \int_{-\infty}^\infty \left[\dfrac{1}{\sqrt{4\pi \kappa t}}e^{-(x-y)^2/4\kappa t + \kappa t}\right] \varphi(y) e^{-\kappa t} d y \\ &= \int_{-\infty}^\infty \dfrac{1}{\sqrt{4\pi \kappa t}} e ^{-(x - y)^2/4\kappa t + \cancel{\kappa t - \kappa t}} \varphi(y) dy \\ &= \int_{-\infty}^\infty \dfrac{1}{\sqrt{4\pi \kappa t}} e ^{-(x - y)^2/4\kappa t} \varphi(y) dy \end{align*}

Since tt is not integrated over, we can pull out the factor in tt outside the integral:

u(x,t)=14πκte(xy)2/4κtφ(y)dy u(x, t) = \dfrac{1}{\sqrt{4\pi \kappa t}}\int_{-\infty}^\infty e ^{-(x - y)^2/4\kappa t} \varphi(y) dy

Thus the particular solution to the diffusion equation for the given initial-boundary-value problem is then:

u(x,t)=14πκte(xy)2/(4κt)φ(y)dy u(x, t) = \dfrac{1}{\sqrt{4\pi \kappa t}} \int_{-\infty}^\infty e^{-(x - y)^2 / (4 \kappa t)} \varphi(y) dy

Where the integrand 14πκte(xy)2/(4κt)\dfrac{1}{\sqrt{4\pi \kappa t}} e^{-(x - y)^2 / (4 \kappa t)} is known as a Green's function (other names include source function, propagator, kernel, or fundamental solution). The Green's function may be thought of as something that "pushes" (evolves) the initial condition u(x,0)=φ(x)u(x, 0) = \varphi(x) to bring it to u(x,t)u(x, t) by time tt (for those familiar with the term, it can be thought of as an operator). This may be a bit easier to see if we write the solution as follows:

u(x,t)=14πκte(xx)2/(4κt)at t=0 this is equal to δ(xx)u(x,0)dx u(x, t) = \int_{-\infty}^\infty \underbrace{\dfrac{1}{\sqrt{4\pi \kappa t}} e^{-(x - x')^2 / (4 \kappa t)}}_{\text{at } t = 0 \text{ this is equal to }\delta(x - x')} u(x', 0) dx'

In this form, we can see that the Green's function serves as a multiplication factor that starts out at e(xx)2/(4κ(0))=e^{-(x - x')^2/(4\kappa (0))} = \infty at t=0t = 0 (but luckily, since it also starts out as infinitely thin, the integral is finite). We call this initial state of the Green's function as the Dirac delta or delta function, written as δ(xx)\delta(x - x'). The delta function has the special property that:

δ(xx)u(x,0)=u(x,0) \int_{-\infty}^\infty \delta(x - x') u(x', 0) = u(x, 0)

Which means that if we evaluate u(x,t)u(x, t) at t=0t = 0 we do indeed get back the initial condition. Now, as tt increases, the value of e(xx)2/(4κt)e^{-(x - x')^2/(4\kappa t)} rapidly diminishes. Thus, we find that the maximum principle is also satisfied - that u(x,t)u(x,0)u(x, t) \leq u(x, 0). Since our Green's function e(xx)2/(4κt)e^{-(x - x')^2/(4\kappa t)} smoothly decays to infinity as x±x \to \pm \infty, multiplying u(x,0)u(x, 0) by it and integrating results in the solution being "spread out" over time, exactly analogous to our intuitive understanding of diffusion. Our way of writing the general solution previously was just a renaming - φ(x)=u(x,0)\varphi(x) = u(x, 0), and we changed integration variable we used from xx' to yy, as well as pulling out the factor at the front outside the integral, but otherwise the mathematics are identical:

u(x,t)=14πκte(xy)2/(4κt)φ(y)dy u(x, t) = \dfrac{1}{\sqrt{4\pi \kappa t}} \int_{-\infty}^\infty e^{-(x - y)^2 / (4 \kappa t)} \varphi(y) dy

We may use this solution to solve the initial-boundary-value problem given by:

ut=κ2ux2u(x,0)=φ(x)={1,x10,x>1limx±φ(x)=0 \begin{gather*} \dfrac{\partial u}{\partial t} = \kappa \dfrac{\partial^2 u}{\partial x^2} \\ u(x, 0) =\varphi(x) = \begin{cases} 1, & |x| \leq 1 \\ 0, & |x| > 1\end{cases} \\ \lim_{x \to \pm \infty} \varphi(x) = 0 \end{gather*}

This is simply a matter of substituting φ(y)=1\varphi(y) = 1 in the integral (as long as we also remember the constraint that this is true for only x1|x| \leq 1, i.e. within 1x1-1 \leq x \leq 1). Since this is a piecewise initial condition, we need to use the integral rule for piecewise functions. For a piecewise function given by:

H(x)={f(x)x<1g(x)x>1 H(x) =\begin{cases} f(x) & |x| < 1 \\ g(x) & |x| > 1 \end{cases}

The integral of the function over x(,)x \in (-\infty, \infty) is equal to:

H(x)dx=1H(x)dx+11H(x)dx+1H(x)dx=1g(x)dx+11h(x)dx+1g(x)dx \begin{align*} \int_{-\infty}^\infty H(x) dx &= \int_{-\infty}^{-1} H(x) dx + \int_{-1}^1 H(x) dx +\int_1^\infty H(x) dx \\ &= \int_{-\infty}^{-1} g(x) dx + \int_{-1}^1 h(x) dx+ \int_1^\infty g(x) dx \\ \end{align*}

Using this identity, and substituting into the Green's function solution, we have:

u(x,t)=14πκte(xy)2/(4κt)φ(y)dy=14πκt[1e(xy)2/(4κt)(0)dy0+11e(xy)2/(4κt)(1)dy+1e(xy)2/(4κt)(0)dy]0=11e(xy)2/(4κt)dy \begin{align*} u(x, t) &= \dfrac{1}{\sqrt{4\pi \kappa t}} \int_{-\infty}^\infty e^{-(x - y)^2 / (4 \kappa t)} \varphi(y) dy \\ &= \dfrac{1}{\sqrt{4\pi \kappa t}} \bigg[\cancel{\int_{-\infty}^{-1} e^{-(x - y)^2 / (4 \kappa t)} (0) dy}^0 \\ &\qquad +\int_{-1}^{1} e^{-(x - y)^2 / (4 \kappa t)} (1) dy \\ &\qquad + \cancel{\int_{1}^\infty e^{-(x - y)^2 / (4 \kappa t)} (0) dy\bigg]}^0 \\ &= \int_{-1}^{1} e^{-(x - y)^2 / (4 \kappa t)} dy \end{align*}

Thus our solution is given by:

u(x,t)=11e(xy)2/(4κt)dy u(x, t) = \int_{-1}^{1} e^{-(x - y)^2 / (4 \kappa t)} dy

There is, however, a slightly nicer-looking way to write out this solution, and that is using the error function. The error function, denoted Erf(x)\operatorname{Erf}(x), is given by:

Erf(x)=2π0xep2dp \operatorname{Erf}(x) = \dfrac{2}{\sqrt{\pi}} \int_0^x e^{-p^2} dp

To cast the solution into this "nicer" form, we start by dividing the integral into two parts, one between [0,1][0, 1] and the other between [1,0][-1, 0]:

u(x,t)=10e(xy)2/(4κt)dy+01e(xy)2/(4κt)dy u(x, t) = \int_{-1}^0 e^{-(x - y)^2 / (4 \kappa t)} dy + \int_0^1 e^{-(x - y)^2 / (4 \kappa t)} dy

Now, let p2=(xy)24κtp^2 = \dfrac{(x - y)^2}{4\kappa t}, for which we have p=xy4κtp = \dfrac{x-y}{\sqrt{4\kappa t}} and dp=14κtdydp = -\dfrac{1}{\sqrt{4\kappa t}}dy. Additionally, we must also change the integral's bounds on substitution, so we must adjust the bounds as follows:

y1=0p1=x4κty2=1p2=x14κty3=1p3=x+14κt \begin{align*} y_1 = 0 &\to p_1 = \dfrac{x}{\sqrt{4\kappa t}} \\ y_2 = 1 &\to p_2 = \dfrac{x-1}{\sqrt{4\kappa t}} \\ y_3 = -1 &\to p_3 = \dfrac{x+1}{\sqrt{4\kappa t}} \end{align*}

Thus, after substitution our integral becomes:

u(x,t)=(4κt(x+1)/4κtx/4κtep2dp)+(4κtx/4κt(x1)4κtep2dp)=4κt(x+1)/4κt0ep2dp4κt0x/4κtep2dp4κtx/4κt0ep2dp4κt0(x1)4κtep2dp=4κt0(x+1)/4κtep2dp4κt0x/4κtep2dp+4κt0x/4κtep2dp4κt0(x1)4κtep2dp=4κt0(x+1)/4κtep2dp4κt0x/4κtep2dp+4κt0x/4κtep2dp4κt0(x1)4κtep2dp=4κt[0(x+1)/4κtep2dp0(x1)4κtep2dp]=4κtErf(x+14κt)4κtErf(x14κt)=4κt[Erf(x+14κt)Erf(x14κt)] \begin{align*} u(x, t) &= \left(-\sqrt{4\kappa t} \int_{(x + 1)/\sqrt{4\kappa t}}^{x/\sqrt{4\kappa t}}e^{-p^2}dp\right) + \left(-\sqrt{4\kappa t} \int_{x/\sqrt{4\kappa t}}^{(x - 1)\sqrt{4\kappa t}} e^{-p^2} dp\right) \\ &= -\sqrt{4\kappa t} \int_{(x + 1)/\sqrt{4\kappa t}}^0 e^{-p^2} dp - \sqrt{4\kappa t} \int_0^{x/\sqrt{4\kappa t}} e^{-p^2}dp \\ &\qquad \quad -\sqrt{4\kappa t} \int_{x/\sqrt{4\kappa t}}^0 e^{-p^2} dp - \sqrt{4\kappa t} \int_0^{(x - 1)\sqrt{4\kappa t}} e^{-p^2} dp \\ &= \sqrt{4\kappa t} \int_0^{(x + 1)/\sqrt{4\kappa t}} e^{-p^2} dp - \sqrt{4\kappa t} \int_0^{x/\sqrt{4\kappa t}} e^{-p^2}dp \\ &\qquad \quad +\sqrt{4\kappa t} \int_0^{x/\sqrt{4\kappa t}} e^{-p^2} dp - \sqrt{4\kappa t} \int_0^{(x - 1)\sqrt{4\kappa t}} e^{-p^2} dp \\ &= \sqrt{4\kappa t} \int_0^{(x + 1)/\sqrt{4\kappa t}} e^{-p^2} dp - \cancel{\sqrt{4\kappa t} \int_0^{x/\sqrt{4\kappa t}} e^{-p^2}dp} \\ &\qquad \quad + \cancel{\sqrt{4\kappa t} \int_0^{x/\sqrt{4\kappa t}} e^{-p^2} dp} - \sqrt{4\kappa t} \int_0^{(x - 1)\sqrt{4\kappa t}} e^{-p^2} dp \\ &= \sqrt{4\kappa t} \left[\int_0^{(x + 1)/\sqrt{4\kappa t}} e^{-p^2} dp - \int_0^{(x - 1)\sqrt{4\kappa t}} e^{-p^2} dp\right] \\ &= \sqrt{4\kappa t}\operatorname{Erf} \left(\dfrac{x+1}{\sqrt{4\kappa t}}\right) - \sqrt{4\kappa t} \operatorname{Erf} \left(\dfrac{x-1}{\sqrt{4\kappa t}}\right) \\ &= \sqrt{4\kappa t}\left[\operatorname{Erf} \left(\dfrac{x+1}{\sqrt{4\kappa t}}\right) - \operatorname{Erf} \left(\dfrac{x-1}{\sqrt{4\kappa t}}\right)\right] \end{align*}

Which is the solution to our boundary value problem for our chosen initial condition u(x,0)=φ(x)={1,x1 0,x>1u(x, 0) = \varphi(x) = \begin{cases} 1, & |x| \leq 1 \ 0, & |x| > 1\end{cases}. Note that this is one of the few cases in which an analytical solution can be written out; in most cases, the integral is simply impossible to evaluate by hand and can only be solved numerically.

Note for the interested reader: the solution of the diffusion equation on the half-line, which is very similar to diffusion on the real line, except that it requires the additional boundary condition u(0,t)=0u(0, t) = 0, is given by u(x,t)=14πκt(e(xy)2/4κt+e(x+y)2/4κt)φ(y)dyu(x, t) = \dfrac{1}{\sqrt{4\pi \kappa t}} \displaystyle \int_{-\infty}^\infty (e ^{-(x - y)^2/4\kappa t} + e^{-(x + y)^2/4\kappa t} )\varphi(y) dy

Concluding remarks to the diffusion and wave equation

We have studied the diffusion and wave equation in detail and constructed particular solutions to several initial-boundary value problems (IBVPs). As well as solving specific IBVPs, we have found that the wave equation and diffusion equation satisfy particular characteristics:

PDESpeed of propagationSingularities (i.e. shocks/other "not smooth" disturbances)EnergyRequirements for well-posedness
Diffusion equation (and all other parabolic PDEs)InfiniteSmoothed out immediatelyNot conservedOnly for t0t \geq 0; not well-posed for t<0t < 0
Wave equation (and all other hyperbolic PDEs)ccLost (smoothed-out) immediatelyConservedWell-posed for all time

Separation of variables for boundary-value problems

At the beginning of the guide, we gave a brief overview of the separation of variables procedure. Separation of variables is a powerful technique for solving PDEs, so to develop our understanding of it further, let us now re-examine the same procedure in more detail.

Separation of variables for the wave equation

To start, let us consider the wave equation in one dimension on the domain x[0,L],t[0,)x \in [0, L], t \in [0, \infty), with the following boundary conditions:

2ut2=c22ux2u(0,t)=0,u(L,t)=0u(x,0)=φ(x),ut(x,0)=ψ(x) \begin{gather*} \dfrac{\partial^2 u}{\partial t^2} = c^2 \dfrac{\partial^2 u}{\partial x^2} \\ u(0, t) = 0, \quad u(L, t) = 0 \\ u(x, 0) = \varphi(x), \quad \dfrac{\partial u}{\partial t}(x, 0) = \psi(x) \end{gather*}

We assume a solution in the form u(x,t)=X(x)T(t)u(x, t) = X(x) T(t), for which we find that upon taking the derivatives, we have:

2ut2=X(x)T(t)2ux2=X(x)T(t) \begin{align*} \dfrac{\partial^2 u}{\partial t^2} &= X(x)T''(t) \\ \dfrac{\partial^2 u}{\partial x^2} &= X''(x) T(t) \end{align*}

Note: You can verify this by direct calculation; the reason why the partial derivatives are so simple is that XX only depends on xx, and TT only depends on tt. This means that when taking the partial derivative with respect to xx, TT can be treated as a constant; similarly, when taking the partial derivative with respect to tt, XX can be treated as a constant.

Therefore, substituting into the wave equation and dividing by X(x)T(t)X(x)T(t) yields:

XT=c2XT1c2XT=XT1X(x)T(t)1c2XT=1X(x)T(t)XTTc2T=XX \begin{gather*} XT'' = c^2 X''T \\ \dfrac{1}{c^2} XT'' = X''T \\ \dfrac{1}{X(x)T(t)}\dfrac{1}{c^2}XT'' = \dfrac{1}{X(x)T(t)} X''T \\ \dfrac{T''}{c^2 T} = \dfrac{X''}{X} \end{gather*}

Note how that, in the last line, we have two combinations of derivatives equal to each other. This can only happen if both derivatives are a constant, so it must be the case that:

Tc2T=XX=const.T=c2T×const.X=X×const. \dfrac{T''}{c^2 T} = \dfrac{X''}{X} = \text{const.} \quad \Rightarrow \quad \begin{align*} T'' &= c^2 T \times \text{const.} \\ X'' &= X \times \text{const.} \end{align*}

This constant is what we call the separation constant; we now find that the wave equation, a partial differential equation, has reduced (relief!) to two ordinary differential equations that are much easier to solve. Let us name our separation constant k2k^2 (the square does not matter, since the square of a constant is still a constant, it just makes the mathematics easier). Since it is a constant, its value is arbitrary; k2k^2 can have a positive or negative sign, or be zero or complex. This is one of the cases where choosing the appropriate answer requires a fair bit of intuition about what the solution to the ODEs will be. In this particular case, the right choice is for k2k^2 to have a negative sign, as shown:

T=k2c2T,X=k2X \begin{matrix*} T'' = -k^2 c^2 T, & X''=-k^2 X \end{matrix*}

The reason for this is the boundary conditions. The solution to ODEs in the form y=a2yy'' = -a^2 y (where aa is a constant) is either a sine or cosine wave (or a sum of both). Such solutions can be zero at finite values. However, the solutions to ODEs in the form y=a2yy'' = a^2 y are exponential functions (or sum of exponential functions). Such solutions can only be zero at infinity. Additionally, the solutions to ODEs in the form y=0y'' = 0 are linear functions, which can only be zero at one point. Since our boundary conditions are u(0,t)=u(L,t)=0u(0, t) = u(L, t) = 0, that is, u(x,t)u(x, t) is zero at x=0x = 0 and x=Lx = L (which are not at infinity and are zero at two locations), we must choose k2-k^2, not k2k^2 or zero. This means that our solutions are:

X(x)=Acoskx+BsinkxT(t)=Ccos(kct)+Dsin(kct) \begin{align*} X(x) &= A \cos k x + B \sin k x \\ T(t) &= C \cos (kc t) + D \sin (kct) \end{align*}

We may make the solutions look "prettier" by defining ωkc\omega \equiv kc, so we can rewrite the solutions as follows:

X(x)=Acoskx+BsinkxT(t)=Ccosωt+Dsinωt \begin{align*} X(x) &= A \cos k x + B \sin k x \\ T(t) &= C \cos \omega t + D \sin \omega t \end{align*}

Recall that we expressed our solution in the form u(x,t)=X(x)T(t)u(x, t) = X(x)T(t). Thus, substituting our found solutions for X(x)X(x) and T(t)T(t), we have:

u(x,t)=X(x)T(t)=(Acoskx+Bsinkx)(Ccosωt+Dsinωt) \begin{align*} u(x, t) &= X(x)T(t) \\ &= (A \cos k x + B \sin k x)( C \cos \omega t + D \sin \omega t) \end{align*}

To determine the values of our coefficients A,B,C,DA, B, C, D, we must apply the boundary conditions. Applying our first boundary condition u(0,t)=0u(0, t) = 0, we have:

u(0,t)=(Acos(0)1+Bsin(0)0)(Ccosωt+Dsinωt)=0=A(Ccosωt+Dsinωt)=0 \begin{align*} u(0, t) &= (A \cancel{\cos(0)}^1 + \cancel{B \sin (0)}^0)(C \cos \omega t + D \sin \omega t) = 0 \\ &= A(C \cos \omega t + D \sin \omega t) = 0 \end{align*}

To satisfy this boundary condition, since cosωt,sinωt0\cos \omega t, \sin \omega t \neq 0, it must be the case that A=0A = 0. Therefore our solution simplifies to:

u(x,t)=Bsinkx(Ccosωt+Dsinωt) u(x, t) = B \sin k x( C \cos \omega t + D \sin \omega t)

Applying our second boundary condition u(L,t)=0u(L, t) = 0, we have:

u(L,t)=Bsin(kL)(Ccosωt+Dsinωt)=0 u(L, t) = B \sin (k L)( C \cos \omega t + D \sin \omega t) = 0

Again, since cosωt,sinω0\cos \omega t, \sin \omega \neq 0, this can only be satisfied if BsinkL=0B \sin k L = 0. We find that this condition can be satisfied if kL=nπkL = n\pi, i.e. if kLkL is equal to an integer multiple of π\pi, since we know that sin(π)=sin(2π)=sin(3π)==sin(nπ)=0\sin(\pi) = \sin(2\pi) = \sin(3\pi) = \dots = \sin(n\pi) = 0. Therefore, we have found that k=nπ/Lk = n\pi/L, and now our solution becomes:

u(x,t)=Bsin(nπxL)(Ccosωt+Dsinωt) u(x, t) = B \sin \left(\dfrac{n\pi x}{L}\right)( C \cos \omega t + D \sin \omega t)

We will now take the step of distributing the constant factor of BB into each of the two terms. Defining JBC,KBDJ \equiv B\cdot C, K \equiv B \cdot D, we can rewrite the above solution as:

u(x,t)=sin(nπxL)(Jcosωt+Ksinωt) u(x, t) = \sin\left(\dfrac{n\pi x}{L}\right)(J \cos \omega t + K \sin \omega t)

The remaining two initial-boundary conditions are both initial conditions: one for u(x,0)u(x, 0), and one for ut(x,0)\dfrac{\partial u}{\partial t}(x, 0). One might wonder how these conditions can be satisfied when our solution is entirely written in terms of sines and cosines. The answer is that because the diffusion equation is linear, we can sum solutions together to form new solutions. In fact, we can sum as many solutions as we'd like! This results in a more general solution given by:

u(x,t)=n=1sin(nπxL)(Jncosωt+Knsinωt)=n=1sin(nπxL)[Jncos(nπctL)+Knsin(nπctL)] \begin{align*} u(x, t) &= \sum_{n = 1}^\infty \sin\left(\dfrac{n\pi x}{L}\right)(J_n \cos \omega t + K_n \sin \omega t) \\ &=\sum_{n = 1}^\infty \sin\left(\dfrac{n\pi x}{L}\right)\left[J_n \cos \left(\dfrac{n\pi c t}{L}\right) + K_n \sin \left(\dfrac{n\pi c t}{L}\right)\right] \end{align*}

Where we wrote the second form of the solution (in the previous line) via our definition from before, ωkc\omega \equiv kc. This is the solution to our boundary-value problem. From here, if we substitute u(x,0)u(x, 0), we have:

u(x,0)=n=1Jnsin(nπxL)=φ(x) u(x, 0) = \sum_{n = 1}^\infty J_n \sin \left(\dfrac{n\pi x}{L}\right) = \varphi(x)

This is called a Fourier sine series, and any "well-behaved" function can be written using this series expansion. For instance, if we had φ(x)=x\varphi(x) = x, then the series expansion reads:

φ(x)=2Lπ[sinπx12sin2πx+13sin3πx14sin4πx+] \varphi(x) = \dfrac{2L}{\pi}\left[\sin \pi x - \dfrac{1}{2} \sin 2\pi x + \dfrac{1}{3} \sin 3\pi x - \dfrac{1}{4} \sin 4\pi x + \dots\right]

Similarly, if we take the derivative with respect to time, we can write a Fourier series expansion for ut(x,0)=ψ(x)\dfrac{\partial u}{\partial t}(x, 0) = \psi(x). Using these series, we can effectively write out a solution to any choice of u(x,0)u(x, 0) and ut(x,0)\dfrac{\partial u}{\partial t}(x, 0). This is, indeed, one of the reasons why the separation of variables technique is so powerful.

Note: how do we determine what the correct coefficients Kn,JnK_n, J_n should be? We will discover this later, but for now (for just JnJ_n) we will provide a formula without proof: Jn=2L0Lφ(x)sin(nπxL)dxJ_n = \dfrac{2}{L} \displaystyle \int_0^L \varphi(x) \sin\left(\dfrac{n\pi x}{L}\right) dx.

Separation of variables for the diffusion equation

Let us now consider the very similar boundary-value problem for the diffusion equation across the domain x[0,L],t[0,)x \in [0, L], t \in [0, \infty):

ut=κ22ux2u(0,t)=0,u(L,t)=0u(x,0)=φ(x) \begin{gather*} \dfrac{\partial u}{\partial t} = \kappa^2 \dfrac{\partial^2 u}{\partial x^2} \\ u(0, t) = 0, \quad u(L, t) = 0 \\ u(x, 0) = \varphi(x) \end{gather*}

Here, we again assume a solution in the form u(x,t)=X(x)T(t)u(x, t) = X(x) T(t), for which we have:

ut=X(x)T(t)2ux2=X(x)T(t) \begin{align*} \dfrac{\partial u}{\partial t} &= X(x)T'(t) \\ \dfrac{\partial^2 u}{\partial x^2} &= X''(x)T(t) \end{align*}

Therefore, substituting into the diffusion equation, and dividing by X(x)T(t)X(x)T(t), we have:

XT=κ2XT1κ2XT=XT1XT1κ2XT=1XTXTTκ2T=XX=const. \begin{gather*} XT' = \kappa^2 X''T \\ \dfrac{1}{\kappa^2}XT' = X''T\\ \dfrac{1}{XT} \dfrac{1}{\kappa^2}XT' = \dfrac{1}{XT}X''T \\ \dfrac{T'}{\kappa^2 T} = \dfrac{X''}{X} = \text{const.} \end{gather*}

We choose our separation constant to be β2\beta^2 with a negative sign (with the same reasoning as before, due to our pair of finite boundary conditions). We could've equivalently called it k2k^2, but since kk and κ2\kappa^2 look too similar, we will use the letter β\beta instead. Thus we have reduced the diffusion equation into the set of two ordinary differential equations, given by:

T=β2κ2TX=β2X \begin{align*} T' &= -\beta^2\kappa^2 T \\ X'' &= -\beta^2 X \end{align*}

The general solutions to the differential equations are:

T(t)=Aeβκt+BeβκtX(x)=Ccosβx+Dsinβx \begin{align*} T(t) &= Ae^{\beta \kappa t} + Be^{-\beta \kappa t} \\ X(x) &= C \cos \beta x + D \sin \beta x \end{align*}

Our solution for u(x,t)u(x, t) therefore becomes:

u(x,t)=X(x)T(t)=(Aeβκt+Beβκt)(Ccosβx+Dsinβx) \begin{align*} u(x, t) &= X(x)T(t) \\ &= (Ae^{\beta \kappa t} + Be^{-\beta \kappa t})(C \cos \beta x + D \sin \beta x) \end{align*}

We can now individually substitute our boundary conditions. But first, there is a way that we can simplify the solution just by inspection (that is, by "being clever"). We solve on the domain t[0,)t \in [0, \infty), which means that we would want our solution to not blow up for large values of tt. This automatically means that AA must be zero; otherwise the AeβxtAe^{\beta x t} term grows exponentially as tt increases! So we have deduced that the solution must be in the following form if it is to be "reasonable":

u(x,t)=Beβκt(Ccosβx+Dsinβx) u(x, t) = Be^{-\beta \kappa t}(C \cos \beta x + D \sin \beta x)

Which we can write in a "prettier" way by defining QBC,PBDQ \equiv B \cdot C, P \equiv B \cdot D, with which the solution becomes:

u(x,t)=eβκt(Qcosβx+Psinβx) u(x, t) = e^{-\beta \kappa t} (Q \cos \beta x + P \sin \beta x)

Now, we substitute in our boundary conditions u(0,t)=0u(0, t) = 0 and u(L,t)=0u(L, t) = 0. For the first boundary condition, our solution reduces to:

u(0,t)=eβκt(Qcos(0)1+Psin(0)0)=Qeβκt=0 \begin{align*} u(0, t) &= e^{-\beta \kappa t} (Q \cancel{\cos (0)}^1 + \cancel{P \sin (0)}^0) \\ &= Q e^{-\beta \kappa t} \\ &= 0 \end{align*}

From which we deduce that Q=0Q = 0, and with which we are left with:

u(x,t)=Psin(βx)eβκt u(x, t) = P \sin(\beta x)\,e^{-\beta \kappa t}

For our other boundary condition u(L,t)=0u(L, t) = 0, we substitute to find:

u(L,t)=Psin(βL)eβκt=0sinβL=0,βL=nπ \begin{align*} u(L, t) &= P \sin(\beta L) e^{-\beta \kappa t} \\ &= 0 \\ &\Rightarrow \sin \beta L = 0,\quad \beta L = n\pi \end{align*}

Thus we find that β=nπ/L\beta = n\pi/L, just as we did for the wave equation. Our solution now becomes:

u(x,t)=Psin(nπxL)exp(κnπtL) u(x, t) = P \sin\left(\dfrac{n\pi x}{L}\right) \exp\left(-\kappa\dfrac{n\pi t}{L}\right)

To satisfy the final boundary condition u(x,0)=φ(x)u(x, 0) = \varphi(x), we again write our solution as a Fourier series:

u(x,t)=n=1Pnsin(nπxL)exp(κnπtL) u(x, t) = \sum_{n = 1}^\infty P_n \sin\left(\dfrac{n\pi x}{L}\right) \exp\left(-\kappa\dfrac{n\pi t}{L}\right)

Thus, we can also write φ(x)\varphi(x) in terms of a series:

u(x,0)=n=1Ansin(nπxL)=φ(x) u(x, 0) = \sum_{n = 1}^\infty A_n \sin\left(\dfrac{n\pi x}{L}\right) = \varphi(x)

And we find that, indeed, we have found the solution to the diffusion equation for the given boundary-value problem.

Show table of contents Back to all notes