Skip to main content

Module symbolic_ode

Module symbolic_ode 

Source
Expand description

Symbolic differential equations (Gap analysis §3.4) — closed-form solutions for the standard solvable classes of ODE, plus first-order-linear PDE (method of characteristics) and second-order-linear PDE type classification.

Honest scope (everything outside it returns OdeError::NotSupported — never a fabricated solution):

ODE

  • Separable y' = g(x)·h(y) → implicit ∫dy/h(y) = ∫g(x)dx + C, using the CAS integrator (crate::specialized_libs::symbolic_integration); fails closed when either integral is outside the integrator’s table.
  • Linear first-order, constant coefficients y' + a·y = b → explicit.
  • Linear second-order, constant coefficients a·y'' + b·y' + c·y = 0 → explicit, via the characteristic equation (distinct-real / repeated / complex roots).

PDE

  • First-order linear homogeneous a·uₓ + b·u_y = 0u = F(b·x − a·y) (an arbitrary differentiable F; the characteristic invariant is returned).
  • Second-order linear A·uₓₓ + B·u_xy + C·u_yy + … → elliptic / parabolic / hyperbolic classification by the discriminant B² − 4AC.

A general nonlinear/variable-coefficient PDE solver is not attempted — that is genuinely beyond a bounded module, and the contract here is “solve the supported classes exactly, refuse the rest”, not “pretend”.

Enums§

OdeError
OdeSolution
The solution of an ODE.
PdeClass
The type of a second-order linear PDE.
PdeSolution
The solution of a (supported) PDE.

Functions§

classify_second_order_pde
Classify the second-order linear PDE A·uₓₓ + B·u_xy + C·u_yy + … = … by the discriminant B² − 4AC.
solve_first_order_linear_pde
Solve a·uₓ + b·u_y = 0 by the method of characteristics: u is an arbitrary function of the invariant b·x − a·y. Requires (a, b) ≠ (0, 0).
solve_linear_first_order
Solve the linear first-order constant-coefficient ODE y' + a·y = b.
solve_linear_second_order
Solve the linear second-order homogeneous constant-coefficient ODE a·y'' + b·y' + c·y = 0 via its characteristic equation a·r² + b·r + c = 0. a = 0 is not second-order → OdeError::NotSupported.
solve_separable
Solve the separable ODE y' = g(x)·h(y) as ∫ dy/h(y) = ∫ g(x) dx + C. The two antiderivatives are computed by the CAS integrator; either being non-integrable yields OdeError::NotIntegrable.