Expand description
Numerical methods: root finding, ODE solvers, BVP, finite differences, numerical differentiation, quadrature, matrix decompositions, eigensolvers, continuation methods, and bifurcation detection.
Structs§
- Bifurcation
Point - Detected bifurcation point.
- Rk45
State - Dormand-Prince RK45 adaptive step integrator.
- Root
Result - Result of a root-finding computation.
Enums§
- Bifurcation
Type - Bifurcation type.
Functions§
- adaptive_
simpson - Adaptive Simpson’s rule.
- arnoldi_
eigenvalues - Arnoldi iteration for finding a few eigenvalues of a large matrix.
- bisect
- Bisection method (guaranteed convergence on bracket).
- brentq
- Brent’s method (Brentq) for robust bracketed root finding.
- bvp_
shoot - Solve a second-order BVP y’‘=f(x,y,y’) with y(a)=ya, y(b)=yb.
- cholesky
- Cholesky decomposition for symmetric positive definite matrices.
- deriv_
central - Central difference derivative.
- deriv_
complex_ step - Complex-step derivative (machine precision accuracy).
- deriv_
forward - Forward difference derivative.
- detect_
bifurcations - Detect bifurcation points on a solution branch.
- euler_
ode - Euler’s method for ODEs: dy/dt = f(t, y).
- eye
- Build identity matrix.
- fd1d_
laplacian - 1D finite difference Laplacian matrix (Dirichlet BCs).
- fd2d_
laplacian - 2D finite difference Laplacian (5-point stencil).
- fd3d_
laplacian - 3D finite difference Laplacian (7-point stencil).
- frobenius_
norm - Frobenius norm of a matrix.
- gauss_
hermite_ integrate - Integrate using Gauss-Hermite quadrature.
- gauss_
hermite_ nodes - Gauss-Hermite quadrature nodes and weights (n ≤ 5).
- gauss_
legendre_ integrate - Compute ∫_a^b f(x)dx using n-point Gauss-Legendre quadrature.
- gauss_
legendre_ nodes - Gauss-Legendre quadrature nodes and weights for n-point rule (n ≤ 5).
- hessian
- Hessian via central differences (n×n matrix for n-dim function).
- infinity_
norm - Infinity norm (max row sum).
- inverse_
power_ iteration - Inverse power iteration to find smallest eigenvalue.
- jacobian
- Jacobian via central differences (n_out × n_in).
- lu_
decomp - LU decomposition with partial pivoting.
- lu_
solve - Solve Ax = b using LU decomposition.
- mat_mul
- Matrix-matrix multiply.
- mat_vec
- Matrix-vector multiply.
- newton_
raphson - Newton-Raphson root finding.
- power_
iteration - Power iteration to find the largest eigenvalue and eigenvector.
- pseudo_
arclength_ continuation - Pseudo-arclength continuation for parameter-dependent systems.
- qr_
decomp_ gs - QR decomposition via Gram-Schmidt (returns Q, R).
- qr_
eigenvalues - QR algorithm for computing all eigenvalues of a symmetric matrix.
- rk2
- Runge-Kutta 2nd order (Heun’s method).
- rk4
- Classic 4th-order Runge-Kutta.
- rk45_
adaptive - Adaptive RK45 integrator.
- rk45_
step - Perform one RK45 step. Returns (y_new, error_estimate).
- secant_
method - Secant method for root finding (no derivative required).
- solve_
poisson_ 1d - Solve the 1D Poisson equation -u’’ = f on [0,1] with u(0)=u(1)=0.
- svd_
singular_ values - Compute SVD via Golub-Reinsch (simplified: returns singular values only).
- transpose
- Transpose an m×n matrix.