Root-finding, optimization, linear systems, and differential equations.
bfgs
BFGS quasi-Newton minimization (inverse-Hessian update + Armijo line search; analytic grad optional, else central differences; optional box bounds via projection); returns { x, fval, iterations, converged }
Syntax
bfgs(f, x0[, opts])
derivativeAt
Exact scalar derivative of f: ℝ → ℝ at x via forward-mode autodiff (the Dual type; no finite differences)
Syntax
derivativeAt(f, x)
differentialEvolution
Global minimization by differential evolution (rand/1/bin, F 0.8, CR 0.9, popSize 15·dim); deterministic for a given opts.seed (default 0); returns { x, fx, iterations, evaluations, converged }; empty or inverted bounds throw RangeError
Syntax
differentialEvolution(f, bounds[, opts])
eventDetection
ODE event detection
Syntax
eventDetection(...)
findRoot
Bracketed root-finding (bisection/Brent)
Syntax
findRoot(f, a, b[, opts])
finiteDifferenceCoefficients
Fornberg finite-difference weights for the derivOrder-th derivative at 0 on a stencil of offsets (in units of the step); e.g. (2, [-1, 0, 1]) is [1, -2, 1]
Syntax
finiteDifferenceCoefficients(derivOrder, offsets)
fixedPoint
Fixed point of g by iteration x ← g(x); opts.aitken: true applies Aitken Δ² extrapolation; opts.tol, opts.maxIter
Syntax
fixedPoint(g, x0[, opts])
fsolve
Nonlinear system solver F(x) = 0 for F: ℝⁿ → ℝⁿ (damped Newton)
Syntax
fsolve(F, x0[, opts])
gaussLegendre4
Listed in the export index; see the source for details.
Syntax
gaussLegendre4(…)
GL4ConvergenceError
Listed in the export index; see the source for details.
Syntax
GL4ConvergenceError(…)
globalMinimize
Global minimization
Syntax
globalMinimize(f, bounds[, opts])
gradient
Numeric gradient of sampled data (second-order central differences, one-sided at edges; matches numpy.gradient)
Syntax
gradient(y[, x])
gradientAt
Exact gradient of f: ℝⁿ → ℝ at x by n forward-mode passes
Syntax
gradientAt(f, x)
gradientDescent
Gradient descent with backtracking line search (analytic grad optional, else central differences); returns { x, fx, iterations, converged }
Syntax
gradientDescent(f, x0[, opts])
halley
Halley's method root-finding (cubic convergence)
Syntax
halley(f, x0[, opts])
hessian
Numeric Hessian (second partials) of f: ℝⁿ → ℝ via central differences, symmetric by construction
1-D minimization via Brent's method (golden-section + parabolic interp)
Syntax
minimizeScalar(f[, opts])
nelderMead
Derivative-free downhill-simplex minimization; NelderMeadOptions.stepRule / tolRule default 'relative'; minimize is the 'absolute' wrapper and returns x only. Result { x, fx, iterations, converged }
Syntax
nelderMead(f, x0[, opts])
newton
Newton–Raphson root-finding (analytic or central-difference derivative)
Syntax
newton(f, x0[, opts])
nnls
Non-negative least squares (Lawson–Hanson active-set); returns { x, residual }
Syntax
nnls(A, b[, opts])
nullspace
Null-space basis
Syntax
nullspace(A)
numericJacobian
Numeric Jacobian of f: ℝⁿ → ℝᵐ (non-square OK) via central differences with a per-coordinate relative step; jacobian(f, x0) dispatches here when the first arg is a function
Syntax
numericJacobian(f, x0[, opts])
odeAdaptiveStep
Adaptive-step ODE integration
Syntax
odeAdaptiveStep(...)
propagateUncertainty
Listed in the export index; see the source for details.
Syntax
propagateUncertainty(…)
quadprog
Quadratic programming
Syntax
quadprog(Q, c, A, b[, opts])
residue
Partial-fraction residues
Syntax
residue(b, a)
ridders
Ridders' bracketed root-finding (opts.tol, opts.maxIter); f(a) and f(b) must differ in sign
Syntax
ridders(f, a, b[, opts])
root
Alias of fsolve
Syntax
root(F, x0[, opts])
secant
Secant-method root-finding (no derivative required)
Syntax
secant(f, x0, x1[, opts])
simulatedAnnealing
Seeded simulated annealing with opts.T0, opts.cooling and optional opts.bounds; same result shape as differentialEvolution
Syntax
simulatedAnnealing(f, x0[, opts])
solveBVP
Boundary value problem solver for a general first-order system y' = f(t,y) via single shooting; y0Guess (default [0, 0]) sets the state dimension n
Syntax
solveBVP(f, bc, mesh[, y0Guess])
solveDAE
Semi-explicit index-1 DAEy' = f(t,y,z), 0 = g(t,y,z) via variable-step BDF(1–2) with a coupled Newton solve for (y,z) each step; consistent-z0 solve; returns { t, y[t], z[t] } (higher-index input detected via singular ∂g/∂z)
Syntax
solveDAE(f, g, tspan, y0[, z0][, opts])
solveDDE
Constant-delay DDEy'(t) = f(t, y(t), [y(t−τ₁), …]) via the method of steps: adaptive BS23 + cubic-Hermite continuous extension (dense output), step capped at min(τ) so delayed args lie in computed history; lands on t0 + kτ breakpoints; history is φ(t) (or a constant), delays an array of positive τ; returns { t, y[t], yInterp }
Syntax
solveDDE(f, tspan, history, delays[, opts])
solveODE
ODE solver (factory layer)
Syntax
solveODE(f, tspan, y0[, opts])
solveODESystem
System of ODEs (RK, JS)
Syntax
solveODESystem(f, y0, tspan[, opts])
solveParabolicPDE
General 1-D parabolic PDE u_t = D(x)·u_xx + c(x)·u_x + f(x,t,u) via method-of-lines onto the BDF stiff solver; Dirichlet/Neumann BCs; returns { x, t, u[t][x] } (O(h²) in space)