Skip to content
Tutorials Center
My learning

Topics

Lesson 31 of 39 ยท PDEs and Applications

Introduction to Partial Differential Equations

Start with PDEs: what makes an equation partial, the heat, wave and Laplace equations, elliptic-parabolic-hyperbolic classification, boundary conditions, and transport by characteristics.

An ordinary differential equation describes something that changes in one variable, usually time. A partial differential equation (PDE) describes something that changes in several variables at once: the temperature along a rod changes with position and time, the height of a drumhead depends on x, y and t. The equation then relates the partial derivatives with respect to those variables.

PDEs are the language of physics: heat flow, waves, fluids, electromagnetism, quantum mechanics and finance all use them. This lesson introduces the vocabulary and the three archetypes. The rest of the chapter solves them.

Notation and vocabulary

For u(x, t) the partial derivatives are written u_t = โˆ‚u/โˆ‚t, u_x = โˆ‚u/โˆ‚x, u_xx = โˆ‚ยฒu/โˆ‚xยฒ. The order of a PDE is the highest derivative that appears. A PDE is linear if u and its derivatives occur only to the first power and are not multiplied together; homogeneous if every term contains u (so u = 0 is a solution). Linear homogeneous PDEs obey superposition: sums of solutions are solutions, which is what makes Fourier methods work.

Examples:

  • u_t + 3 u_x = 0 is linear, first order, homogeneous.
  • u_t = u_xx + sin(x) is linear, second order, nonhomogeneous.
  • u_t + u u_x = 0 (Burgers' equation) is nonlinear, first order.

The three classical equations

Three archetypes

Heat equation u_t = k u_xx. Diffusion, smoothing.
Wave equation u_tt = c squared u_xx. Waves travel.
Laplace equation u_xx + u_yy = 0. Steady states.

Each represents a whole family of equations.

1 / 2
  • Heat (diffusion) equation u_t = k u_xx. Temperature evens out over time; sharp features are smoothed and information moves infinitely fast in principle.
  • Wave equation u_tt = cยฒ u_xx. Disturbances travel at speed c without smoothing; a plucked string, sound, light.
  • Laplace equation u_xx + u_yy = 0. No time: the steady temperature, electric potential or ideal-fluid flow in a region. Its solutions are harmonic functions. Adding a source gives Poisson's equation u_xx + u_yy = f.

SymPy is excellent at checking whether a candidate function solves a PDE.

Python Verify solutions with SymPy

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A residual of 0 means the equation is satisfied. For xยฒ + yยฒ the residual is 4, so it is not harmonic.

Classification of second-order linear PDEs

Consider A u_xx + B u_xy + C u_yy + (lower-order terms) = 0. The sign of the discriminant Bยฒ - 4AC decides the character, by analogy with conic sections:

Bยฒ - 4AC Type Prototype Behavior
< 0 elliptic Laplace smooth, steady, boundary-determined
= 0 parabolic heat diffusion, one time direction
> 0 hyperbolic wave finite speed, waves, discontinuities travel

The type dictates which side conditions make sense and which numerical methods work. Elliptic problems need conditions on a whole closed boundary. Parabolic and hyperbolic problems need an initial condition (and boundary conditions for a bounded space).

Python Classify second-order PDEs

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Boundary and initial conditions

A PDE alone has infinitely many solutions, like an ODE without initial conditions. The usual side conditions are:

  • Dirichlet: the value of u is given on the boundary (rod ends held at fixed temperatures).
  • Neumann: the normal derivative is given (insulated end: u_x = 0, no heat flows).
  • Robin: a mix a u + b u_x = g (convective cooling).
  • Initial conditions: u(x, 0) = f(x) for the heat equation; u(x, 0) = f(x) and u_t(x, 0) = g(x) for the wave equation.

A problem is well posed (Hadamard) if a solution exists, is unique, and depends continuously on the data. The heat equation run backwards in time is the classic ill-posed problem: tiny errors in the final data explode.

The simplest PDE: transport by characteristics

The first-order equation u_t + c u_x = 0 describes something moving at constant speed c. Along the lines x - c t = const (the characteristics), u does not change, because du/dt = u_t + c u_x = 0 along x = x0 + c t. So the solution is the initial profile shifted: u(x, t) = f(x - c t).

Python Transport: characteristics versus a numerical scheme

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The upwind scheme moves the bump to the right place, but it smears it (the peak is lower than 1): numerical diffusion. Better schemes reduce it. Note the time step restriction c dt/dx <= 1 (the CFL condition): the numerical scheme must look at least as far as the true information travels.

Common mistakes

  • Mixing up a PDE's order with the number of variables.
  • Using superposition on a nonlinear PDE, where it fails.
  • Imposing too few (or too many) side conditions for the type of equation.
  • Ignoring the CFL stability limit when choosing dt and dx.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which PDE is linear?

    The heat equation u_t = u_xx is linear. The others multiply u by its derivative, square a derivative, or apply a nonlinear function to u.
  2. 2. The wave equation u_tt = c^2 u_xx is:

    With A = c^2, C = -1 the discriminant -4AC = 4c^2 is positive.
  3. 3. The solution of u_t + 2 u_x = 0 with u(x,0) = f(x) is:

    u is constant along x - 2t = const, so the profile moves right at speed 2.
  4. 4. A Neumann boundary condition fixes:

    Neumann conditions prescribe the flux, such as an insulated end with u_x = 0.

Summary

  • A PDE relates partial derivatives of a function of several variables.
  • The prototypes are the heat (parabolic), wave (hyperbolic) and Laplace (elliptic) equations.
  • Bยฒ - 4AC classifies second-order linear PDEs.
  • Dirichlet, Neumann and Robin conditions plus initial data make a well-posed problem.
  • Transport equations are solved along characteristics; numerical schemes must respect the CFL condition.

Next: Separation of Variables and Fourier Series