Calculus and differential equations: API index¶
Find an operation by its purpose. Entries link to the complete signature and contract.
HMath.Calculus¶
| API | Purpose |
|---|---|
| Estimate | Estimated value, absolute error estimate and callback evaluation count. |
| Estimate | Declaration and type contract below. |
| estimateValue | Returned numerical derivative/integral estimate. |
| estimateError | Absolute error estimate from the selected approximation/refinement rule; not a universal rigorous bound. |
| evaluations | Number of function evaluations used by the calculation. |
| Tolerance | Positive absolute tolerance, nonnegative relative tolerance and positive budget. |
| Tolerance | Declaration and type contract below. |
| absoluteTolerance | Requested finite nonnegative absolute error threshold. |
| relativeTolerance | Requested finite nonnegative error threshold relative to estimate magnitude. |
| maximumEvaluations | Positive caller-supplied function-evaluation budget. |
| defaultTolerance | Default adaptive tolerance: 1e-10 absolute, 1e-8 relative, 100000 evaluations. |
| Difference | One-sided or central first differences. |
| Forward | Declaration and type contract below. |
| Backward | Declaration and type contract below. |
| Central | Declaration and type contract below. |
| derivative | First derivative with explicit positive finite step; rounded-away steps fail. |
| derivativeN | Arbitrary nonnegative derivative order by recursively centered differences. |
| complexDerivative | Complex-step first derivative. |
| richardson | Richardson extrapolation of a central first difference. |
| ridders | Ridders extrapolation with factor 1.4 and a best-error stopping criterion. |
| limit | One-sided numerical limit, approaching geometrically from the requested side. |
| partialDerivative | Partial derivative at a zero-based coordinate. |
| gradient | Gradient using one central difference per coordinate. |
| jacobian | Row-major Jacobian; callback output dimensions must remain constant. |
| hessian | Hessian with centered diagonal and mixed differences. |
| directionalDerivative | Directional derivative; the direction is used as supplied, without normalization. |
| jvp | Jacobian-vector product by directional central differences. |
| vjp | Vector-Jacobian product as the gradient of a scalar contraction. |
| hvp | Hessian-vector product with four directional/coordinate samples per component. |
| divergence | Divergence of a vector field with equal input and output dimensions. |
| curl | Curl of a three-dimensional vector field. |
| laplacian | Laplacian as the sum of centered second coordinate differences. |
| Quadrature | Composite Newton-Cotes formulas. |
| Trapezoidal | Declaration and type contract below. |
| Simpson | Declaration and type contract below. |
| ThreeEighths | Declaration and type contract below. |
| integrateComposite | Composite finite-interval integration with exact panel constraints. |
| romberg | Romberg integration using trapezoidal refinement and Richardson diagonals. |
| gaussLegendre | n-point Gauss-Legendre quadrature; nodes are refined by Newton iteration. |
| gaussHermite | Weighted Gaussian quadrature on the real line for weight exp(-x^2). |
| gaussLaguerre | Weighted Gaussian quadrature on [0,infinity) for weight exp(-x). |
| gaussChebyshev | Weighted first-kind Chebyshev rule on [-1,1], weight 1/sqrt(1-x^2). |
| gaussKronrod | Embedded 7-point Gauss / 15-point Kronrod estimate. |
| adaptiveIntegrate | Adaptive Gauss-Kronrod with global summed error and a strict evaluation budget. |
| clenshawCurtis | Clenshaw-Curtis quadrature on n cosine-spaced panels using exact moments of the cosine interpolant. n must be positive and at most 4096. |
| tanhSinh | Tanh-sinh quadrature with geometric step refinement on a finite interval. |
| integrateInfinite | Integrate on finite, half-infinite or doubly-infinite intervals by an open coordinate transform followed by adaptive Gauss-Kronrod. |
| integrateOscillatory | Integrate f(x)cos(omegax) or f(x)sin(omegax), splitting at least once per half-period to avoid accepting an aliased embedded quadrature estimate. |
| integrateND | Tensor-product midpoint integration over a box. |
| monteCarlo | Reproducible Monte Carlo box integral with an explicit 64-bit seed. |
| quasiMonteCarlo | Deterministic Halton-box quadrature, up to 16 dimensions. |
| cumulativeIntegral | Cumulative trapezoidal integrals at strictly increasing sample coordinates. |
| pathIntegral | Scalar line integral f(r(t))*|r'(t)| along an explicitly parameterized path. |
| lineIntegral | Oriented vector-field line integral along a parameterized path. |
| surfaceIntegral | Scalar surface integral over a rectangular parameter domain in R3. |
| volumeIntegral | Volume integral over a three-dimensional rectangular box. |
HMath.Interpolation¶
| API | Purpose |
|---|---|
| Extrapolation | Reject out-of-domain queries, clamp to an endpoint, or evaluate the endpoint polynomial beyond its interval. |
| Reject | Declaration and type contract below. |
| Clamp | Declaration and type contract below. |
| Extrapolate | Declaration and type contract below. |
| InterpolationMethod | Independent scalar nearest, linear, Lagrange, Newton divided-difference or barycentric formula. |
| Nearest | Declaration and type contract below. |
| Linear | Declaration and type contract below. |
| Lagrange | Declaration and type contract below. |
| Newton | Declaration and type contract below. |
| Barycentric | Declaration and type contract below. |
| interpolate | Interpolate ordered (x,y) samples using the selected formula and extrapolation policy; nearest ties choose the earlier node. |
| hermite | Global confluent Hermite polynomial, distinct nodes and supplied first derivatives. |
| cubicHermite | Piecewise cubic Hermite interpolation with supplied endpoint derivatives. |
| SplineBoundary | Natural zero curvature, supplied clamped endpoint slopes, or periodic value/derivative matching. |
| Natural | Declaration and type contract below. |
| Clamped | Declaration and type contract below. |
| Periodic | Declaration and type contract below. |
| PiecewisePolynomial | Opaque ascending local polynomial coefficients and strictly increasing breakpoints. |
| piecewisePolynomial | Validate breakpoints and nonempty coefficient rows. |
| piecewiseKnots | Return the immutable piecewise breakpoints, including both outer endpoints. |
| evaluatePiecewise | Evaluate by Horner rule in the containing interval; use the final interval at the right endpoint. |
| differentiatePiecewise | Differentiate each local coefficient row without changing the breakpoints. |
| integratePiecewise | Exact polynomial antiderivative across all crossed intervals; both limits must lie inside the domain. |
| cubicSpline | Cubic C2 interpolation. |
| pchip | Fritsch--Carlson/PCHIP weighted harmonic interior slopes and limited one- sided endpoints preserve monotonicity on monotone data. |
| akima | Akima cubic interpolation using slope-difference weights and linearly extended endpoint secants; at least three samples. |
| smoothingSpline | Natural cubic smoothing spline minimizing sum (y_i-s(x_i))² plus lambda times integral s''². |
| BSpline | Opaque rational B-spline with positive weights and a validated full knot vector. |
| bSpline | Nondecreasing full knot vector, degree 0..16, positive rational weights, control points of equal dimension. |
| evaluateBSpline | Evaluate rational Cox--de Boor basis functions and divide homogeneous coordinates by their positive total weight. |
| derivativeBSpline | Analytic first derivative of a rational B-spline using basis derivatives and the homogeneous quotient rule. |
| insertKnot | One Boehm knot insertion in homogeneous coordinates; shape is preserved. |
| bezier | Polynomial Bezier curve with unit weights; controls are vectors with 1..16 coordinates. |
| rationalBezier | Positive-weight rational Bezier curve on [0,1], represented exactly as an open clamped B-spline (degree <=16). |
| cardinalSpline | Kochanek--Bartels interpolation with zero continuity/bias and supplied tension in [-1,1]. |
| catmullRom | Cardinal cubic interpolation with zero tension and repeated endpoint secants. |
| kochanekBartels | Interpolating cubic Hermite segment sequence with Kochanek--Bartels tension, continuity and bias in [-1,1]; endpoint secants are repeated. |
| curveIntegral | Componentwise adaptive integral of a B-spline between in-domain limits, with estimated quadrature errors. |
| arcLength | Adaptive integral of the Euclidean analytic derivative norm; limits must increase and remain in the spline domain. |
| gridInterpolate | Rectilinear multilinear interpolation; values are row-major/last axis fast. |
| RadialKernel | Radial interpolation kernels; the first three accept a positive inverse-length shape parameter. |
| Gaussian | Declaration and type contract below. |
| Multiquadric | Declaration and type contract below. |
| InverseMultiquadric | Declaration and type contract below. |
| ThinPlate | Declaration and type contract below. |
| Cubic | Declaration and type contract below. |
| RBF | Opaque fitted radial model with an affine polynomial tail. |
| fitRBF | Solve the augmented radial/affine system with nonnegative diagonal smoothing; singular or affinely degenerate systems fail. |
| evaluateRBF | Evaluate a fitted scattered model at one finite point with the original coordinate dimension. |
| inverseDistance | Normalized inverse-distance interpolation with positive power; coincident queries return the exact observation. |
| shepard | Classical inverse-square Shepard interpolation in the supplied Euclidean coordinates. |
| kriging | Ordinary kriging with stationary exponential covariance exp(-distance/range), optional independent nugget, unbiased constant mean. |
| Approximation | Coefficients or parameters, observed absolute residual, and iteration/evaluation count; error is an estimate. |
| Approximation | Declaration and type contract below. |
| approximationCoefficients | Fitted coefficients in the approximation routine's documented basis/order. |
| approximationError | Reported approximation residual/error measure, not a general analytic bound. |
| approximationIterations | Number of fitting/refinement iterations performed. |
| polynomialFit | Full-column-rank polynomial least squares via pivoted QR, returning ascending coefficients and maximum observation error. |
| chebyshevApproximate | Chebyshev-root interpolation on a finite interval; report maximum error on a separate 513-point uniform validation grid. |
| evaluateChebyshev | Evaluate ascending Chebyshev coefficients after mapping the original interval to [-1,1]. |
| pade | Padé [m/n] from ascending Taylor coefficients, q_0=1. |
| rationalFit | Linearized rational least squares y*q(x)-p(x)=0 with q_0=1; poles at observations are rejected. |
| remez | Discrete Remez exchange on an explicit dense grid, 1..64 degree. |
| nonlinearFit | Damped Gauss--Newton least squares with central-difference Jacobian, strict residual/step convergence and finite total callbacks; returns fitted parameters. |
| interpolationError | Maximum absolute discrepancy at the supplied nonempty observations; nonfinite callback results fail. |
HMath.ODE¶
| API | Purpose |
|---|---|
| ODE | Time and state callback, returning a derivative of exactly the same length. |
| Method | Explicit, multistep, implicit, and linearly implicit methods. |
| Euler | Declaration and type contract below. |
| Heun | Declaration and type contract below. |
| Midpoint | Declaration and type contract below. |
| RK2 | Declaration and type contract below. |
| RK4 | Declaration and type contract below. |
| RK23 | Declaration and type contract below. |
| RK45 | Declaration and type contract below. |
| DormandPrince | Declaration and type contract below. |
| DOP853 | Declaration and type contract below. |
| AdamsBashforth | Declaration and type contract below. |
| AdamsMoulton | Declaration and type contract below. |
| PredictorCorrector | Declaration and type contract below. |
| BackwardEuler | Declaration and type contract below. |
| BDF | Declaration and type contract below. |
| Radau | Declaration and type contract below. |
| Rosenbrock | Declaration and type contract below. |
| ODEOptions | Positive step bounds and tolerances; maximumSteps bounds accepted and rejected attempts, and newtonIterations bounds each implicit correction. |
| ODEOptions | Declaration and type contract below. |
| odeAbsoluteTolerance | Finite positive absolute local error tolerance. |
| odeRelativeTolerance | Finite nonnegative local error tolerance relative to state scale. |
| initialStep | Requested positive initial step magnitude; integration direction follows time bounds. |
| minimumStep | Positive minimum permitted step magnitude before reporting failure. |
| maximumStep | Positive maximum permitted step magnitude. |
| maximumSteps | Maximum integration-step work budget. |
| newtonIterations | Iteration budget for implicit-method nonlinear solves. |
| defaultODEOptions | Conservative default adaptive settings for Double callbacks. |
| Trajectory | Strictly monotonic time samples, states and endpoint derivatives. |
| Trajectory | Declaration and type contract below. |
| trajectoryTimes | Accepted sample times in integration order. |
| trajectoryStates | State vector at each trajectory time. |
| trajectoryDerivatives | ODE derivative vector at each trajectory sample, used by dense output. |
| solveIVP | Integrate on n equal panels. |
| solveAdaptive | Adaptive explicit RK integration. |
| interpolateTrajectory | Cubic Hermite interpolation inside the trajectory's closed time range. |
| Event | A located event time and its dense-interpolated state. |
| Event | Declaration and type contract below. |
| eventTime | Located event crossing time. |
| eventState | Interpolated state vector at eventTime. |
| EventDirection | Event direction in increasing physical time, even for backward integration. |
| AnyDirection | Declaration and type contract below. |
| Rising | Declaration and type contract below. |
| Falling | Declaration and type contract below. |
| locateEvents | Locate bracketed sign-changing events by dense-output bisection. |
| solveBoundary | Shooting boundary-value solver: all initial-state components are unknown. |
| solveDAE | Index-one implicit DAE driver F(t,y,y')=0 with backward differences. |
| solveHamiltonian | Fixed-step symplectic integration; output states concatenate q then p. |
| HamiltonianMethod | Separable Hamiltonian methods for q'=velocity(p), p'=force(q). |
| SymplecticEuler | Declaration and type contract below. |
| Verlet | Declaration and type contract below. |
| Leapfrog | Declaration and type contract below. |
| solveNystrom | Fourth-order explicit Runge-Kutta-Nystrom method for q''=a(t,q), with acceleration independent of velocity. |
| sensitivities | Terminal-state parameter sensitivities by centered perturbation of the complete IVP solve. |
| equilibrium | Find an autonomous equilibrium by a locally convergent Newton solve. |
| phaseTrajectories | Compute autonomous phase-space trajectories for independently supplied starts. |
| lyapunovExponents | Full Lyapunov spectrum by the Benettin tangent-space method: integrate variational equations with RK4, then modified Gram-Schmidt at each sample. |
HMath.PDE¶
| API | Purpose |
|---|---|
| Grid | Opaque Cartesian grid with positive representable spacings and 1..3 axes. |
| grid | Construct a grid with >=3 nodes per axis; reject overflowing counts and rounded-away duplicate coordinates. |
| gridShape | Number of nodes along each axis, preserving last-axis-fastest storage order. |
| gridCoordinates | Physical coordinates in flat storage order; periodic upper endpoints are omitted. |
| gridSpacing | Positive uniform distance between adjacent nodes on each axis. |
| flattenIndex | Checked conversion of zero-based multidimensional node coordinates to a row-major flat index. |
| unflattenIndex | Inverse checked row-major index conversion. |
| Boundary | Constant essential value, outward derivative, au+bdu/dn=c, or paired periodic faces. |
| Dirichlet | Declaration and type contract below. |
| Neumann | Declaration and type contract below. |
| Robin | Declaration and type contract below. |
| Periodic | Declaration and type contract below. |
| Discretization | Nodal nondivergence FD, conservative face-flux FV, or tensor-product Q1 Galerkin FEM. |
| FiniteDifference | Declaration and type contract below. |
| FiniteVolume | Declaration and type contract below. |
| FiniteElement | Declaration and type contract below. |
| PDEOperator | Opaque assembled stiffness, source mass matrix, boundary load and essential constraints. |
| assemblePDE | Assemble -kappa*Laplacian (FD) or -div(kappa grad) (FV/FEM) plus constant reaction; coefficient field is positive at every node. |
| pdeStiffness | Read the canonical sparse stiffness and source mass operators; essential rows are identity/zero respectively. |
| pdeMass | Read the canonical sparse stiffness and source mass operators; essential rows are identity/zero respectively. |
| pdeBoundaryLoad | Read boundary contributions, including prescribed values at essential rows. |
| PDEResult | Nodal solution with independently recomputed infinity residual; errorEstimate reports backward residual only. |
| PDEResult | Declaration and type contract below. |
| pdeValues | Computed grid solution values in the solver's documented spatial order. |
| pdeResidual | Residual measure at the returned grid solution. |
| pdeErrorEstimate | Solver-specific discretization/error estimate; not a universal certified bound. |
| solveElliptic | Dense pivoted reference solve and independently recomputed infinity residual. |
| poisson | Solve a unit-diffusivity zero-reaction Poisson problem with the selected spatial discretization. |
| laplace | Solve the corresponding homogeneous-source boundary-value problem. |
| helmholtz | Solve -Laplacian(u)-k²u=f; resonances/singular systems fail. |
| spatialGradient | Second-order central spatial gradients; physical endpoints use second-order one-sided stencils. |
| laplacianStencil | Apply the FD Laplacian with ghost normal/Robin boundary data. |
| spectralDerivative | Periodic Fourier collocation derivative of order 0..8 along one axis; odd real Nyquist derivatives are zero. |
| spectralLaplacian | Sum periodic second Fourier derivatives over all spatial axes. |
| spectralPoisson | Solve (-Laplacian+reaction)u=f spectrally; reaction>=0, and zero reaction requires a mean-free source with zero-mean solution gauge. |
| pseudoSpectralDiffusion | Pseudospectral divergence(kappa*gradient u). |
| methodOfLines | Method of lines with a constant assembled operator and checked time-source callback. |
| heat | Explicit heat/diffusion uses RK4, with a conservative forward-Euler CFL check (therefore valid for RK4 too). |
| diffusion | Variable positive nodal diffusivity, chosen spatial method and increasing output times; FEM uses a stricter consistent-mass CFL bound. |
| wave | Periodic velocity-Verlet wave equation u_tt=c² Laplacian(u); returns u at requested equally or unequally spaced increasing times. |
| advection | Conservative first-order upwind periodic advection, central conservative variable-coefficient diffusion. |
| advectionDiffusion | Periodic upwind advection plus central diffusion using explicit Euler and the combined positivity CFL bound. |
| stabilityLimit | Conservative explicit positivity bound 1sum(|v|h+2*kappa/h^2); infinity denotes a zero spatial operator. |
| cflNumber | Requested nonnegative timestep divided by the conservative combined stability limit. |
| manufacturedError | Maximum absolute nodal difference from a finite exact-solution callback; this measures continuum error when an exact solution is known. |
HMath.Root¶
| API | Purpose |
|---|---|
| RootOptions | Root-solver iterationevaluation budgets and residualstep tolerances, initialized with defaultRootOptions. |
| RootOptions | Declaration and type contract below. |
| rootMaxIterations | Maximum scalar-root iteration count. |
| rootMaxEvaluations | Maximum scalar function/derivative evaluation budget. |
| rootTolerance | Requested finite positive residual tolerance. |
| rootStepTolerance | Requested finite positive parameter-step tolerance. |
| defaultRootOptions | Default root-solving limits: 200 iterations, 4000 evaluations, residual tolerance 1e-10 and step tolerance 1e-12. |
| RootResult | Scalar root estimate with residual,optional certified bracket error bound,and work counts. |
| RootResult | Declaration and type contract below. |
| rootValue | Returned scalar root estimate. |
| rootResidual | Absolute function residual at rootValue. |
| rootErrorBound | Optional bracket-based absolute root error bound; Nothing when the method cannot certify one. |
| rootIterations | Completed scalar-root iterations. |
| rootEvaluations | Recorded function/derivative evaluation count. |
| Bracket | Validated scalar bracketing state used by checked bracketed root solvers; construct through the bracketing API. |
| bracket | Validate finite a<b and endpoint roots or opposite signs; construction never assumes a discontinuity is a root. |
| BracketMethod | Bracket-preserving root strategy such as bisection,Brent,Ridder,or regula falsi variants. |
| Bisection | Declaration and type contract below. |
| RegulaFalsi | Declaration and type contract below. |
| Illinois | Declaration and type contract below. |
| Brent | Declaration and type contract below. |
| Ridder | Declaration and type contract below. |
| solveBracket | Brackets are re-evaluated with the supplied function, preventing stale or mismatched endpoint caches from certifying a different function's root. |
| bracketScan | Evaluate a uniform finite grid under the evaluation budget and return every endpoint/sign-change bracket. |
| isolateIntervals | Refine sign-change scan brackets and deduplicate endpoint roots. |
| DerivativeMethod | Derivative-based scalar-root strategy, including Newton,Halley,and Householder methods with their required derivatives. |
| Newton | Declaration and type contract below. |
| Halley | Declaration and type contract below. |
| Householder3 | Declaration and type contract below. |
| solveDerivative | Derivatives [f', f'', f'''] are required through order 1, 2, or 3. |
| secant | Unbracketed two-point secant iteration; zero slopes, stagnation, and exhausted budgets fail explicitly. |
| steffensen | Derivative-free Steffensen root update using f(x+f(x)); termination checks the original residual. |
| FixedPointMethod | Fixed-point acceleration strategy, selecting Picard,Aitken,or Steffensen iteration. |
| Picard | Declaration and type contract below. |
| Aitken | Declaration and type contract below. |
| SteffensenFixed | Declaration and type contract below. |
| fixedPoint | Picard iteration, non-restarted Aitken sequence acceleration, or restarted Steffensen acceleration. |
| anderson | Anderson mixing with depth m and Tikhonov regularization. |
| SystemMethod | Multivariate root strategy, selecting checked Newton or Broyden updates. |
| MultivariateNewton | Declaration and type contract below. |
| NewtonTrustRegion | Declaration and type contract below. |
| Broyden | Declaration and type contract below. |
| SystemRootResult | Returned multivariate root vector with residual norm and iteration/evaluation counts. |
| SystemRootResult | Declaration and type contract below. |
| systemRoot | Returned multivariate root parameter vector. |
| systemResidual | Norm of the residual function at systemRoot. |
| systemIterations | Completed nonlinear-system iterations. |
| systemEvaluations | Recorded system function/evaluation count. |
| solveSystem | Solve a square analytic-Jacobian system using Newton, trust-radius Newton, or rank-one Broyden updates. |
| polynomialRoots | Reuse the checked Aberth-Ehrlich simultaneous complex solver for an ascending-coefficient polynomial. |
| realPolynomialRoots | Use exact square-free factorization and Sturm isolation; return rational intervals and integer multiplicities. |