Search Knowledge

© 2026 LIBREUNI PROJECT

Calculus & Analysis / Overview

Partial Differential Equations

Partial Differential Equations (PDEs)

Ordinary Differential Equations (ODEs) deal with functions of one variable (usually time). Partial Differential Equations (PDEs) deal with functions of multiple variables, such as the temperature u(x,t)u(x, t) at a position xx and time tt.

The Mother of All PDEs: The Laplacian

Most physical PDEs involve the Laplacian (2u=Δu\nabla^2 u = \Delta u), which is the divergence of the gradient (u\nabla \cdot \nabla u). In 1D, this is just uxxu_{xx} (the second spatial derivative). It measures how much the value at a point differs from the average of its neighbors.

Three Classic PDEs

1. The Heat Equation (Diffusion)

ut=α2uu_t = \alpha \nabla^2 u Meaning: The rate of change in temperature (utu_t) is proportional to how much “different” a point is from its neighbors. Heat flows from hot to cold to “smooth out” the distribution.

2. The Wave Equation

utt=c22uu_{tt} = c^2 \nabla^2 u Meaning: Acceleration (uttu_{tt}) is proportional to the local “curvature” of the medium. This models everything from guitar strings to light waves.

3. Laplace’s Equation (Equilibrium)

2u=0\nabla^2 u = 0 Meaning: The system has reached a state where every point is the average of its neighbors. This describes electric potentials in vacuum or the steady-state temperature of a plate.

Numerical Solution: The Finite Difference Method

Solving PDEs analytically is hard. Engineers use the Finite Difference Method, which replaces derivatives with differences on a grid.

python
1import numpy as np
2 
3# Simulate 1D Heat Diffusion in a rod
4L = 1.0 # Length
5nx = 50 # Number of points
6dx = L / (nx - 1)
7alpha = 0.01 # Thermal diffusivity
8dt = 0.001 # Time step
9 
10# Initial condition: hot spot in the middle
11u = np.zeros(nx)
12u[int(0.4*nx):int(0.6*nx)] = 100.0
13 
14# Time loop: simplified explicit scheme
15for _ in range(100):
16 u_new = u.copy()
17 for i in range(1, nx-1):
18 # u_t = alpha * u_xx
19 u_new[i] = u[i] + alpha * dt / dx**2 * (u[i+1] - 2*u[i] + u[i-1])
20 u = u_new
21 
22print(f"Temperature at middle: {u[nx//2]:.2f}")
23print("The heat has started to spread from the center to the edges.")
24 

Exercises

If a function satisfies Laplace's Equation ($\nabla^2 u = 0$), what can be said about its local behavior?

In the Heat Equation ($u_t = \alpha u_{xx}$), what happens if the second derivative $u_{xx}$ is positive?

Why are PDEs harder to solve than ODEs?