Solution of Partial Differential Equations
Open in the Padhaiko app6.1 Introduction and classification
A partial differential equation (PDE) relates an unknown multivariable function (or ) and its partial derivatives. In engineering applications, the most important class is the general second-order linear PDE in two independent variables:
where may be constants or functions of . Just like conic sections, the equation is classified at any point by the sign of its discriminant :
| Type | Discriminant Condition | Prototype Equation | Physical Meaning & Boundary/Initial Data |
|---|---|---|---|
| Elliptic | Laplace: Poisson: | Steady-state temperature, electrostatics, potential flow (Boundary Value Problem on closed domain) | |
| Parabolic | 1D Heat: | Transient heat conduction, diffusion (Initial + Boundary Value Problem) | |
| Hyperbolic | 1D Wave: | Vibrating strings, wave propagation (2 Initial conditions + Boundary conditions) |
6.2 Finite difference approximations of partial derivatives
Consider a uniform rectangular grid in the -plane with spacings and , where , , and . Expanding and via Taylor's theorem gives the standard finite-difference quotients:
Finite Difference Approximations of Partial Derivatives
- First Partial Derivatives:
- Forward difference ():
- Backward difference ():
- Central difference ():
- Second Partial Derivatives (Central, and ):
6.3 Solution of elliptic equations
6.3.1 Laplace equation
On a square mesh (), substituting the central differences into Laplace's equation yields:
Standard and Diagonal 5-Point Formulas
- Standard Five-Point Formula: Every interior value is the arithmetic mean of its four orthogonal neighbors (East, West, North, South):
- Diagonal Five-Point Formula (rotated ; useful for computing initial estimates at grid centers from corner boundaries):
Writing the standard 5-point formula at all interior grid points creates a sparse linear system, solved either directly (for small grids) or iteratively using Liebmann's method (Gauss–Seidel iteration on the grid, immediately substituting newly updated neighbors):
6.3.2 Poisson’s equation
For Poisson's equation on a square mesh ():
Rearranging gives the 5-point stencil for Poisson's equation:
or equivalently in iterative form:
6.4 Solution of parabolic and hyperbolic equations
6.4.1 One-dimensional heat equation: Bendre-Schmidt method, Crank-Nicolson method
Consider the 1D unsteady heat conduction equation:
with spatial step , time step , grid notation , and the dimensionless mesh ratio:
Explicit Scheme and Bendre–Schmidt Method
Using a forward difference in time () and central difference in space ():
Bendre–Schmidt Explicit Formula
The explicit scheme is numerically stable only when . Choosing the special step ratio (so ) eliminates the center term and yields the Bendre–Schmidt (Bender–Schmidt) recurrence:
Crank–Nicolson Implicit Method
To remove the severe step-size restriction and achieve second-order accuracy in both space and time (), the Crank–Nicolson method averages the central spatial second difference across time levels and :
Crank–Nicolson Implicit Scheme
Rearranging with gives a tridiagonal linear system at each time step:
- Unconditionally stable for every .
- For , this simplifies to .
6.4.2 Solution of wave equation
Consider the 1D wave equation for a vibrating string:
Replacing both second derivatives with central differences and letting (the Courant number):
Explicit Finite-Difference Scheme for the 1D Wave Equation
- General time-stepping formula ():
The scheme is stable for (CFL condition). When (), it simplifies to the exact characteristic recurrence:
- Starting step (): Using central difference to eliminate the ghost value :
(When and , this reduces to .)
Worked Out Examples
6.1
Solve Laplace's equation on the square region with grid spacing and boundary conditions:
- Top ():
- Bottom ():
- Left ():
- Right ():
Labeling the four interior grid points: Let , , , and .
100 100
+----+-------+----+
50 | u1 --- u2 | 150
| | | |
50 | u3 --- u4 | 150
+----+-------+----+
0 0Applying the standard 5-point formula at each interior node: Using :
Solving the linear system: Adding the first and fourth equations gives . Adding the second and third equations gives , which implies . Moreover, subtracting equation 4 from equation 1 gives . Hence:
Substituting into the second and third equations:
The steady-state interior grid values are , , , and .
6.2
Solve the 1D heat equation () subject to and , taking :
- Using the Bendre–Schmidt method (, ) up to .
- Using the Crank–Nicolson method (, ) for time step ().
Evaluating the initial profile at :
Part 1 — Bendre–Schmidt method (): Using with :
- At ():
- At ():
Part 2 — Crank–Nicolson method (): With , the Crank–Nicolson equations are :
By symmetry, . From the first equation, . Substituting into the second:
At ():
- Bendre–Schmidt ():
- Crank–Nicolson ():
6.3
Solve the 1D wave equation () for with boundary conditions and initial conditions , . Take and , and compute the solution up to .
Checking and tabulating (): Here . At :
Computing time level () and ():
- At : Since and , the starting formula gives :
- At : Using :
(Physically, at half the fundamental half-period , the symmetric string passes instantaneously through the horizontal equilibrium position.)
The displacements at are:
- :
- :
Exercises
Exercise — Solution of Partial Differential Equations
Classify each of the following second-order PDEs as elliptic, parabolic, or hyperbolic:
- ()
Also compare the Bendre–Schmidt and Crank–Nicolson methods for the 1D heat equation in terms of stability and accuracy.
Classifying using :
- Parabolic.
- Elliptic.
- (for ) Hyperbolic.
Comparing Bendre–Schmidt and Crank–Nicolson:
- Bendre–Schmidt is an explicit scheme () that requires (conditionally stable only for ), forcing tiny time steps when is small.
- Crank–Nicolson is an implicit scheme () that is unconditionally stable for any , at the cost of solving a tridiagonal linear system at each time step.
- Parabolic, 2. Elliptic, 3. Hyperbolic. Bendre–Schmidt is explicit and conditionally stable (, fixed at ), whereas Crank–Nicolson is implicit, second-order accurate in time and space, and unconditionally stable for all .
Solve Poisson's equation over the square with and on all four boundaries.
Setting up the 5-point Poisson equations at the four interior points: Let , , , and . With and , the equation gives:
- At :
- At :
- At :
- At :
Solving the linear system: By symmetry across the diagonal , . Then the second and third equations become:
Substituting into :
Hence , , and .
The interior nodal values are , , , and .
Apply iterations of Liebmann's (Gauss–Seidel) method to solve Laplace's equation on a grid ( interior nodes ) starting from initial guess , given boundary values:
- Top:
- Right:
- Bottom and Left: everywhere.
Writing Liebmann's update equations in row-by-row order ():
Performing two Liebmann iterations:
- First iteration ():
- Second iteration ():
After Liebmann iterations, , , , and .
Solve on with and for time step using the Crank–Nicolson method with and ().
Setting up initial values and the Crank–Nicolson system (): At , the nodal values at are . Substituting into :
Multiplying through by gives .
Solving for and : With :
By symmetry , so .
At , and .
Solve the 1D wave equation on with , initial displacement , and zero initial velocity . Take and , and compute up to .
Evaluating and initial displacements at : Here , so . At :
Computing () and ():
- At ( since and ):
- At ():
At :
- :
- :