Skip to content

Introduction to Partial Differential Equations

8.1 Classification of Second-Order PDEs

The general second-order linear PDE in two variables is

Auxx+Buxy+Cuyy+Dux+Euy+Fu=GA u_{xx} + B u_{xy} + C u_{yy} + D u_x + E u_y + F u = G

  • Elliptic (B24AC<0B^2 - 4AC \lt 0): e.g., Laplace”s equation uxx+uyy=0u_{xx} + u_{yy} = 0.
  • Parabolic (B24AC=0B^2 - 4AC = 0): e.g., the heat equation ut=α2uxxu_t = \alpha^2 u_{xx}.
  • Hyperbolic (B24AC>0B^2 - 4AC > 0): e.g., the wave equation utt=c2uxxu_{tt} = c^2 u_{xx}.

8.2 The Heat Equation

ut=α2uxx,0<x<L,t>0u_t = \alpha^2 u_{xx}, \quad 0 \lt x \lt L, \quad t > 0

With boundary conditions u(0,t)=u(L,t)=0u(0, t) = u(L, t) = 0 and initial condition u(x,0)=f(x)u(x, 0) = f(x).

8.3 Derivation of the Heat Equation

Consider a thin rod of length LL with uniform cross-section and density ρ\rho. Let u(x,t)u(x, t) be the Temperature at position xx and time tt. By Fourier’s law of heat conduction, the heat flux Through a cross-section is proportional to the negative temperature gradient:

q=κuxq = -\kappa u_x

Where κ\kappa is the thermal conductivity. Conservation of energy on [x,x+Δx][x, x + \Delta x]:

ρcutΔx=q(x)q(x+Δx)=κux(x)+κux(x+Δx)\rho c \frac{\partial u}{\partial t} \Delta x = q(x) - q(x + \Delta x) = -\kappa u_x(x) + \kappa u_x(x + \Delta x)

Dividing by Δx\Delta x and taking Δx0\Delta x \to 0:

ρcut=κuxx    ut=κρcuxx=α2uxx\rho c \, u_t = \kappa u_{xx} \implies u_t = \frac{\kappa}{\rho c} u_{xx} = \alpha^2 u_{xx}

Where α2=κ/(ρc)\alpha^2 = \kappa/(\rho c) is the thermal diffusivity.

8.4 Solving the Heat Equation by Separation of Variables

Assume u(x,t)=X(x)T(t)u(x, t) = X(x)T(t). Substituting:

XT=α2XT    Tα2T=XX=λX T' = \alpha^2 X'' T \implies \frac{T'}{\alpha^2 T} = \frac{X''}{X} = -\lambda

This gives two ODEs:

X+λX=0,X(0)=X(L)=0X'' + \lambda X = 0, \quad X(0) = X(L) = 0 T+α2λT=0T' + \alpha^2 \lambda T = 0

The boundary value problem for XX has solutions only for λn=(nπ/L)2\lambda_n = (n\pi/L)^2 n=1,2,3,n = 1, 2, 3, \ldotsWith Xn(x)=sin(nπx/L)X_n(x) = \sin(n\pi x/L).

The corresponding Tn(t)=eα2(nπ/L)2tT_n(t) = e^{-\alpha^2 (n\pi/L)^2 t}.

By superposition:

u(x,t)=n=1bnsinnπxLeα2(nπ/L)2tu(x, t) = \sum_{n=1}^{\infty} b_n \sin\frac{n\pi x}{L} e^{-\alpha^2 (n\pi/L)^2 t}

Where bn=2L0Lf(x)sinnπxLdxb_n = \frac{2}{L}\int_0^L f(x)\sin\frac{n\pi x}{L}\, dx (the sine series coefficients of ff).

8.5 Worked Example: Heat Equation

Problem. Solve ut=uxxu_t = u_{xx} for 0<x<π0 \lt x \lt \pi, t>0t > 0With u(0,t)=u(π,t)=0u(0, t) = u(\pi, t) = 0 And u(x,0)=sin(2x)+3sin(5x)u(x, 0) = \sin(2x) + 3\sin(5x).

Solution. Here α=1\alpha = 1 and L=πL = \pi. The initial condition is already a sine series.

λn=n2\lambda_n = n^2, Xn=sin(nx)X_n = \sin(nx), Tn=en2tT_n = e^{-n^2 t}.

u(x,t)=e4tsin(2x)+3e25tsin(5x)u(x, t) = e^{-4t}\sin(2x) + 3e^{-25t}\sin(5x). \blacksquare

8.6 The Wave Equation

utt=c2uxx,0<x<L,t>0u_{tt} = c^2 u_{xx}, \quad 0 \lt x \lt L, \quad t > 0

With boundary conditions u(0,t)=u(L,t)=0u(0, t) = u(L, t) = 0And initial conditions u(x,0)=f(x)u(x, 0) = f(x) ut(x,0)=g(x)u_t(x, 0) = g(x).

8.7 Derivation of the Wave Equation

Consider a string of length LL under tension TT. Let u(x,t)u(x, t) be the vertical displacement. For A small segment [x,x+Δx][x, x + \Delta x]Newton’s second law in the vertical direction gives:

ρΔxutt=Tsinθ(x+Δx)Tsinθ(x)\rho \Delta x \, u_{tt} = T\sin\theta(x + \Delta x) - T\sin\theta(x)

For small displacements, sinθtanθ=ux\sin\theta \approx \tan\theta = u_xSo:

ρutt=Tux(x+Δx)ux(x)ΔxΔx0Tuxx\rho \, u_{tt} = T \frac{u_x(x + \Delta x) - u_x(x)}{\Delta x} \xrightarrow{\Delta x \to 0} T u_{xx}

utt=Tρuxx=c2uxx,c=T/ρu_{tt} = \frac{T}{\rho} u_{xx} = c^2 u_{xx}, \quad c = \sqrt{T/\rho}

8.8 Solving the Wave Equation

Separation of variables u(x,t)=X(x)T(t)u(x, t) = X(x)T(t) gives:

X+λX=0,T+c2λT=0X'' + \lambda X = 0, \quad T'' + c^2 \lambda T = 0

With λn=(nπ/L)2\lambda_n = (n\pi/L)^2:

Xn(x)=sinnπxL,Tn(t)=ancoscnπtL+bnsincnπtLX_n(x) = \sin\frac{n\pi x}{L}, \quad T_n(t) = a_n \cos\frac{cn\pi t}{L} + b_n \sin\frac{cn\pi t}{L}

u(x,t)=n=1sinnπxL(ancoscnπtL+bnsincnπtL)u(x, t) = \sum_{n=1}^{\infty} \sin\frac{n\pi x}{L}\left(a_n \cos\frac{cn\pi t}{L} + b_n \sin\frac{cn\pi t}{L}\right)

Where an=2L0Lf(x)sinnπxLdxa_n = \frac{2}{L}\int_0^L f(x)\sin\frac{n\pi x}{L}\, dx and bn=2cnπ0Lg(x)sinnπxLdxb_n = \frac{2}{cn\pi}\int_0^L g(x)\sin\frac{n\pi x}{L}\, dx.

8.9 D’Alembert’s Solution

For the wave equation on <x<-\infty \lt x \lt \infty:

u(x,t)=f(x+ct)+f(xct)2+12cxctx+ctg(s)dsu(x, t) = \frac{f(x + ct) + f(x - ct)}{2} + \frac{1}{2c}\int_{x - ct}^{x + ct} g(s)\, ds

This represents the solution as a superposition of right-moving and left-moving waves.

8.10 Laplace’s Equation

uxx+uyy=0u_{xx} + u_{yy} = 0

On a domain ΩR2\Omega \subseteq \mathbb{R}^2With boundary conditions on Ω\partial\Omega.

Theorem 8.1 (Maximum Principle). A harmonic function uu (satisfying Laplace’s equation) on a Bounded domain attains its maximum and minimum on the boundary.

Theorem 8.2 (Uniqueness). The Dirichlet problem for Laplace’s equation has at most one solution.

Proof. If u1u_1 and u2u_2 are two solutions with the same boundary data, then v=u1u2v = u_1 - u_2 is Harmonic with v=0v = 0 on Ω\partial\Omega. By the maximum principle, v0v \equiv 0. \blacksquare

8.11 Worked Example: Wave Equation

Problem. A string of length π\pi with fixed ends is plucked: u(x,0)=x(πx)u(x, 0) = x(\pi - x) ut(x,0)=0u_t(x, 0) = 0. Find u(x,t)u(x, t).

Solution. With c=1c = 1 and L=πL = \pi: an=2π0πx(πx)sin(nx)dxa_n = \frac{2}{\pi}\int_0^{\pi} x(\pi - x)\sin(nx)\, dx bn=0b_n = 0 (since g=0g = 0).

Integrating by parts twice:

0πx(πx)sin(nx)dx=[x(πx)cos(nx)n]0π+1n0π(π2x)cos(nx)dx\int_0^{\pi} x(\pi - x)\sin(nx)\, dx = \left[-\frac{x(\pi - x)\cos(nx)}{n}\right]_0^{\pi} + \frac{1}{n}\int_0^{\pi}(\pi - 2x)\cos(nx)\, dx

=0+1n[(π2x)sin(nx)n]0π+2n20πsin(nx)dx= 0 + \frac{1}{n}\left[\frac{(\pi - 2x)\sin(nx)}{n}\right]_0^{\pi} + \frac{2}{n^2}\int_0^{\pi}\sin(nx)\, dx

=0+2n2[cos(nx)n]0π=2n3(1(1)n)= 0 + \frac{2}{n^2}\left[-\frac{\cos(nx)}{n}\right]_0^{\pi} = \frac{2}{n^3}(1 - (-1)^n)

For even nn: an=0a_n = 0. For odd n=2k+1n = 2k + 1: an=2π4n3=8πn3a_n = \frac{2}{\pi} \cdot \frac{4}{n^3} = \frac{8}{\pi n^3}.

u(x,t)=8πk=0sin((2k+1)x)(2k+1)3cos((2k+1)t)u(x, t) = \frac{8}{\pi}\sum_{k=0}^{\infty} \frac{\sin((2k+1)x)}{(2k+1)^3}\cos((2k+1)t). \blacksquare

8.12 Worked Example: Laplace’s Equation on a Rectangle

Problem. Solve uxx+uyy=0u_{xx} + u_{yy} = 0 on 0<x<π0 \lt x \lt \pi, 0<y<10 \lt y \lt 1 with u(0,y)=u(π,y)=u(x,1)=0u(0, y) = u(\pi, y) = u(x, 1) = 0 and u(x,0)=f(x)=x(πx)u(x, 0) = f(x) = x(\pi - x).

Solution

Solution. Separate variables: u(x,y)=X(x)Y(y)u(x, y) = X(x)Y(y).

X/X=Y/Y=λX''/X = -Y''/Y = -\lambda.

X+λX=0X'' + \lambda X = 0, X(0)=X(π)=0X(0) = X(\pi) = 0: λn=n2\lambda_n = n^2, Xn=sin(nx)X_n = \sin(nx).

Yn2Y=0Y'' - n^2 Y = 0, Y(1)=0Y(1) = 0: Yn=sinh(n(1y))Y_n = \sinh(n(1 - y)).

u(x,y)=n=1bnsin(nx)sinh(n(1y))u(x, y) = \sum_{n=1}^{\infty} b_n \sin(nx)\sinh(n(1-y)).

bn=2πsinhn0πx(πx)sin(nx)dx=2πsinhn2(1(1)n)n3b_n = \frac{2}{\pi \sinh n}\int_0^{\pi} x(\pi - x)\sin(nx)\, dx = \frac{2}{\pi \sinh n} \cdot \frac{2(1 - (-1)^n)}{n^3}.

For odd n=2k+1n = 2k + 1: bn=8πn3sinhnb_n = \frac{8}{\pi n^3 \sinh n}.

u(x,y)=8πk=0sin((2k+1)x)sinh((2k+1)(1y))(2k+1)3sinh(2k+1)u(x, y) = \frac{8}{\pi}\sum_{k=0}^{\infty} \frac{\sin((2k+1)x)\sinh((2k+1)(1-y))}{(2k+1)^3 \sinh(2k+1)}. \blacksquare

8.13 Sturm-Liouville Theory (Brief)

A Sturm-Liouville problem consists of the ODE

(p(x)y)+[λw(x)q(x)]y=0(p(x)y')' + [\lambda w(x) - q(x)]y = 0

On [a,b][a, b] with homogeneous boundary conditions, where p,w>0p, w > 0 and p,p,q,wp, p', q, w are continuous.

Key properties:

  1. The eigenvalues are real and form an infinite increasing sequence λ1<λ2<\lambda_1 \lt \lambda_2 \lt \cdots \to \infty.
  2. Eigenfunctions corresponding to distinct eigenvalues are orthogonal with respect to the weight w(x)w(x): abym(x)yn(x)w(x)dx=0\int_a^b y_m(x) y_n(x) w(x)\, dx = 0 for mnm \neq n.
  3. The eigenfunctions form a complete set in the weighted L2L^2 space.

Remark. The boundary value problems encountered in the heat and wave equations (X+λX=0X'' + \lambda X = 0 with X(0)=X(L)=0X(0) = X(L) = 0) are special cases of Sturm-Liouville problems With p=1p = 1, q=0q = 0, w=1w = 1.

8.14 Neumann Boundary Conditions

When the boundary specifies the derivative (heat flux) rather than the value, we have Neumann Conditions. For the heat equation:

ux(0,t)=0,ux(L,t)=0u_x(0, t) = 0, \quad u_x(L, t) = 0

(insulated ends). The separation of variables gives X(0)=X(L)=0X'(0) = X'(L) = 0Yielding eigenvalues λ0=0\lambda_0 = 0 with X0=1X_0 = 1And λn=(nπ/L)2\lambda_n = (n\pi/L)^2 for n1n \geq 1 with Xn=cos(nπx/L)X_n = \cos(n\pi x/L).

The solution is

u(x,t)=a02+n=1ancosnπxLeα2(nπ/L)2tu(x, t) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos\frac{n\pi x}{L} e^{-\alpha^2 (n\pi/L)^2 t}

Where an=2L0Lf(x)cosnπxLdxa_n = \frac{2}{L}\int_0^L f(x)\cos\frac{n\pi x}{L}\, dx.

Remark. As tt \to \inftyAll exponential terms decay, and u(x,t)a0/2u(x, t) \to a_0/2The average Value of the initial temperature. Physically, an insulated rod reaches a uniform steady-state Temperature.

8.15 Worked Example: Heat Equation with Non-Trivial Initial Data

Problem. Solve ut=uxxu_t = u_{xx} for 0<x<π0 \lt x \lt \pi, t>0t > 0With u(0,t)=u(π,t)=0u(0, t) = u(\pi, t) = 0 And u(x,0)=x(πx)u(x, 0) = x(\pi - x).

Solution

Solution. The sine series of f(x)=x(πx)f(x) = x(\pi - x) on [0,π][0, \pi] has coefficients

bn=2π0πx(πx)sin(nx)dx=4(1(1)n)πn3b_n = \frac{2}{\pi}\int_0^{\pi} x(\pi - x)\sin(nx)\, dx = \frac{4(1 - (-1)^n)}{\pi n^3}.

(Computed in Section 8.11.)

For even nn: bn=0b_n = 0. For odd n=2k+1n = 2k + 1: bn=8πn3b_n = \frac{8}{\pi n^3}.

u(x,t)=8πk=0sin((2k+1)x)(2k+1)3e(2k+1)2tu(x, t) = \frac{8}{\pi}\sum_{k=0}^{\infty} \frac{\sin((2k+1)x)}{(2k+1)^3} e^{-(2k+1)^2 t}. \blacksquare

8.16 Worked Example: D’Alembert’s Solution

Problem. Solve utt=4uxxu_{tt} = 4u_{xx} for <x<-\infty \lt x \lt \infty with u(x,0)=ex2u(x, 0) = e^{-x^2} and ut(x,0)=0u_t(x, 0) = 0.

Solution

Solution. Here c=2c = 2. By D’Alembert’s formula with g=0g = 0:

u(x,t)=f(x+2t)+f(x2t)2=e(x+2t)2+e(x2t)22u(x, t) = \frac{f(x + 2t) + f(x - 2t)}{2} = \frac{e^{-(x+2t)^2} + e^{-(x-2t)^2}}{2}.

This represents two Gaussian pulses traveling in opposite directions at speed 2. \blacksquare