PDE Quick Reference Card
Topic:
advanced.pde.quick_reference
One-page cheat sheet for Method of Characteristics covering standard forms, solution templates, common patterns, shock formation, and troubleshooting guide. Includes code templates, decision trees, and physical applications.
Mathematical Definition
General Quasi-Linear Form:
Characteristic equations:
Transport Equation: Solution:
Burgers' Equation: Solution: where (implicit)
Shock speed (Rankine-Hugoniot):
Entropy condition (Lax):
PDE Quick Reference Card
One-page cheat sheet for Method of Characteristics
When to Use Method of Characteristics
| PDE Type | Method Applies? | Alternative |
|---|---|---|
| First-order quasi-linear | ✅ YES | - |
| Second-order (heat, wave, Laplace) | ❌ NO | Separation of variables, Fourier |
| Fully nonlinear | ❌ NO | Specialized techniques |
| Two independent variables | ✅ YES | - |
| Three+ independent variables | ⚠️ COMPLEX | Requires generalization |
Standard Forms
Transport Equation
Solution: where is initial condition
Physical meaning: Wave propagates right at speed
Burgers' Equation (Nonlinear)
Solution: where (implicit)
Warning: Shocks can form! Use Rankine-Hugoniot for shock speed.
General Quasi-Linear Form
Characteristic equations:
5-Step Solution Template
1. EXTRACT coefficients: a, b, c from PDE
2. BUILD characteristic system:
dx/ds = a(x,y,u)
dy/ds = b(x,y,u)
du/ds = c(x,y,u)
3. SOLVE ODEs with IC: (x₀, y₀, u₀) = (ξ, 0, g(ξ))
4. ELIMINATE parameter s: solve for u(x,y)
5. VERIFY: Check PDE and IC satisfaction
Common Patterns
Pattern 1: Constant Coefficients
If , , are constants:
- Characteristics are straight lines
- Solution: where determined by IC
Pattern 2: Linear PDEs
If coefficients don't depend on :
- Characteristics don't intersect
- Smooth solution exists globally
Pattern 3: Nonlinear PDEs
If coefficients depend on :
- Characteristics can intersect → shocks form
- Use weak solutions + Rankine-Hugoniot + entropy condition
Shock Formation Checklist
When do shocks form?
- ✅ PDE is nonlinear (coefficients depend on )
- ✅ Initial data has compression region ()
- ✅ Characteristics with different slopes intersect
Shock speed (Rankine-Hugoniot):
Entropy condition (Lax): (Characteristics converge INTO shock)
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
InvalidVariableCount | Not 2 independent variables | Use exactly 2 vars (e.g., t, x) |
NotFirstOrder | PDE has second derivatives | Use separation of variables |
SingularCoefficients | Both and | Check PDE formulation |
| Solution multi-valued | Characteristics intersect | Use weak solution + shock theory |
| Solution not smooth | Shock forms | Apply Rankine-Hugoniot condition |
Reference Formulas
Characteristic Equations
General Solution Form
where , are independent integrals of characteristic equations
Verification (PDE satisfaction)
Verification (IC satisfaction)
Physical Applications
| Application | PDE | Key Feature |
|---|---|---|
| Wave propagation | Rigid translation | |
| Traffic flow | Shocks (traffic jams) | |
| Gas dynamics | Nonlinear steepening | |
| Groundwater transport | Contaminant advection | |
| Acoustics | Sound waves |
Decision Tree: Which Method?
Is PDE first-order?
├─ YES → Is it quasi-linear?
│ ├─ YES → METHOD OF CHARACTERISTICS ✓
│ └─ NO → Specialized nonlinear techniques
└─ NO → What order?
├─ Second-order → Separation of variables, Fourier
├─ Higher-order → Advanced techniques
└─ System → Vector method of characteristics
Performance Tips
- Reuse PDE structures: Create
Pdeonce, solve multiple times - Adjust ODE step size: Larger step = faster but less accurate
- Simplify sparingly: Only when presenting results (expensive)
- Parallel characteristics: Trace multiple characteristics in parallel
Common Mistakes (Avoid!)
❌ Wrong: Mixing up coefficient order ( vs ) ✅ Right: Write PDE in standard form first
❌ Wrong: Forgetting to apply initial condition ✅ Right: General solution , IC determines
❌ Wrong: Using Symbol::new("x") instead of macros
✅ Right: Always use symbol!(x) and expr!(...)
❌ Wrong: Ignoring shock formation in nonlinear PDEs ✅ Right: Check for characteristic intersection, apply shock theory
Print this page and keep it handy while solving PDEs!
Examples
Quick Code Template
Standard template for solving PDEs with method of characteristics
Rust
#![allow(unused)] fn main() { // Define symbols let u = symbol!(u); let t = symbol!(t); let x = symbol!(x); // Build PDE let equation = expr!(u); let pde = Pde::new(equation, u, vec![t, x]); // Solve let result = method_of_characteristics(&pde).unwrap(); // Apply IC and verify let solution = expr!(f(x - c*t)); // Example for transport }
Python
# Define symbols
u = symbol('u')
t = symbol('t')
x = symbol('x')
# Build PDE
equation = expr(u)
pde = Pde.new(equation, u, [t, x])
# Solve
result = method_of_characteristics(pde)
# Apply IC and verify
solution = expr(f(x - c*t)) # Example for transport
JavaScript
// Define symbols
const u = symbol('u');
const t = symbol('t');
const x = symbol('x');
// Build PDE
const equation = expr(u);
const pde = Pde.new(equation, u, [t, x]);
// Solve
const result = methodOfCharacteristics(pde);
// Apply IC and verify
const solution = expr(f(x - c*t)); // Example for transport
Performance
Time Complexity: N/A (Reference guide)
API Reference
- Rust:
mathhook_core::pde::method_of_characteristics - Python:
mathhook.pde.method_of_characteristics - JavaScript:
mathhook.pde.method_of_characteristics