Partial Differential Equations (PDEs)

Comprehensive overview of partial differential equations in MathHook CAS. Covers mathematical foundations, classification, solution methods, and current capabilities.

📐

Mathematical Definition

A second-order linear PDE in two independent variables has the general form:

A∂2u∂x2+B∂2u∂x∂y+C∂2u∂y2+D∂u∂x+E∂u∂y+Fu=GA \frac{\partial^2 u}{\partial x^2} + B \frac{\partial^2 u}{\partial x \partial y} + C \frac{\partial^2 u}{\partial y^2} + D \frac{\partial u}{\partial x} + E \frac{\partial u}{\partial y} + Fu = G

where: - u(x,y)u(x,y) is the unknown function - A,B,C,D,E,F,GA, B, C, D, E, F, G are coefficients (may depend on xx, yy, or uu) - x,yx, y are independent variables (typically spatial coordinates or time)

Code Examples

Registry-Based Solver Dispatch

Automatic PDE classification and solver selection using O(1) registry lookup

use mathhook::prelude::*;

// Create registry (auto-registers all solvers)
let registry = PDESolverRegistry::new();

// Define PDE
let u = symbol!(u);
let x = symbol!(x);
let t = symbol!(t);
let equation = expr!(add: x, t);  // Heat equation pattern
let pde = Pde::new(equation, u, vec![x, t]);

// Automatic classification and solving
let solution = registry.solve(&pde)?;

println!("Solution: {}", solution.solution);
println!("Eigenvalues: {:?}", solution.get_eigenvalues());

🔗 Related Topics