Class NumericalDifferentiation
java.lang.Object
org.episteme.core.mathematics.analysis.differentiation.NumericalDifferentiation
Numerical differentiation methods.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublebackwardDifference(DoubleUnaryOperator f, double x, double h) Backward difference: f'(x) ≈ (f(x) - f(x-h)) / h First-order accurate: O(h)static doublecentralDifference(DoubleUnaryOperator f, double x, double h) Central difference: f'(x) ≈ (f(x+h) - f(x-h)) / 2h Second-order accurate: O(h²)static doublefivePointStencil(DoubleUnaryOperator f, double x, double h) Five-point stencil: f'(x) ≈ (-f(x+2h) + 8f(x+h) - 8f(x-h) + f(x-2h)) / 12h Fourth-order accurate: O(hâ´)static doubleforwardDifference(DoubleUnaryOperator f, double x, double h) Forward difference: f'(x) ≈ (f(x+h) - f(x)) / h First-order accurate: O(h)static double[]Compute gradient for multivariate function.static double[][]Compute Hessian matrix (second partial derivatives).static double[][]Compute Jacobian matrix for vector-valued function.static doubleLaplacian: ∇²f = ∂²f/∂x² + ∂²f/∂y² + ...static doublerichardsonExtrapolation(DoubleUnaryOperator f, double x, double h, int order) Richardson extrapolation for improved accuracy.static doublesecondDerivative(DoubleUnaryOperator f, double x, double h) Second derivative using central difference: f''(x) ≈ (f(x+h) - 2f(x) + f(x-h)) / h²
-
Constructor Details
-
NumericalDifferentiation
public NumericalDifferentiation()
-
-
Method Details
-
forwardDifference
Forward difference: f'(x) ≈ (f(x+h) - f(x)) / h First-order accurate: O(h) -
backwardDifference
Backward difference: f'(x) ≈ (f(x) - f(x-h)) / h First-order accurate: O(h) -
centralDifference
Central difference: f'(x) ≈ (f(x+h) - f(x-h)) / 2h Second-order accurate: O(h²) -
fivePointStencil
Five-point stencil: f'(x) ≈ (-f(x+2h) + 8f(x+h) - 8f(x-h) + f(x-2h)) / 12h Fourth-order accurate: O(hâ´) -
secondDerivative
Second derivative using central difference: f''(x) ≈ (f(x+h) - 2f(x) + f(x-h)) / h² -
richardsonExtrapolation
Richardson extrapolation for improved accuracy. -
gradient
-
hessian
-
jacobian
Compute Jacobian matrix for vector-valued function. -
laplacian
-