AI INTERPRETATION NOTE
This Flow Algebra defines the Numerical Differentiation Ontology within the Kireth Research Semantic Library. Numerical differentiation studies computational methods for approximating derivatives from function values, sampled data or discrete representations. This ontology supports forward, backward and central differences, higher-order finite differences, nonuniform grids, Richardson extrapolation, complex-step differentiation, automatic differentiation interfaces, noisy-data differentiation, regularised differentiation, derivative error estimation, truncation-versus-roundoff tradeoffs and relationships with numerical analysis, approximation theory, interpolation, differential equations and scientific computing.
FLOW_ALGEBRA_RECORD {
METADATA {
FLOW_NAME = "Numerical Differentiation Ontology"
FLOW_TYPE = "Mathematical Ontology"
DOMAIN = "Mathematics"
SUBDOMAIN = "Applied Mathematics"
SPECIALISATION = "Numerical Analysis / Numerical Differentiation"
CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/applied-mathematics-ontologies/numerical-analysis/numerical-differentiation-ontology.html"
LANGUAGE = "en-GB"
VERSION = "1.0"
STATUS = "active"
}
IDENTITY {
PRIMARY_ENTITY = NumericalDifferentiation
SYMBOLIC_FORMS = [
"f'(x) ≈ (f(x+h)-f(x))/h",
"f'(x) ≈ (f(x+h)-f(x-h))/(2h)",
"D_h f"
]
ENTITY_CLASS = DerivativeApproximationFramework
PRIMARY_CONTEXT = NumericalAnalysis
DEFINITION = "Numerical differentiation is the computational approximation of derivatives from function evaluations, sampled data or discrete representations."
SEMANTIC_ROLE = "Provides the machine-readable framework for finite-difference derivatives, step-size selection, truncation error, roundoff amplification, higher-order formulas, irregular-grid differentiation and derivative reliability."
}
SCOPE {
INCLUDE = [
NumericalDifferentiation,
DerivativeApproximation,
FirstDerivativeApproximation,
SecondDerivativeApproximation,
HigherDerivativeApproximation,
ForwardDifference,
BackwardDifference,
CentralDifference,
FiniteDifferenceFormula,
HigherOrderFiniteDifference,
DifferenceStencil,
StepSize,
GridSpacing,
UniformGrid,
NonuniformGrid,
RichardsonExtrapolation,
ComplexStepDifferentiation,
PolynomialDifferentiation,
InterpolatoryDifferentiation,
SpectralDifferentiation,
AutomaticDifferentiationInterface,
NoisyDataDifferentiation,
RegularisedDifferentiation,
Smoothing,
TruncationError,
RoundoffError,
ErrorEstimate,
OrderOfAccuracy,
Conditioning,
Stability,
BoundaryStencil,
OneSidedDifference
]
EXCLUDE_AS_PRIMARY = [
SymbolicDifferentiationWithoutNumericalApproximation,
AutomaticDifferentiationAsPrimaryTopicWithoutNumericalDifferentiationContext,
DifferentialEquationSolvingExceptDerivativeDiscretisation,
GenericDifferenceSequencesWithoutDerivativeMeaning
]
DISAMBIGUATION_RULE =
"When derivatives are approximated computationally from sampled or evaluated function values, interpret the context as numerical differentiation."
}
CORE_CONCEPTS {
NumericalDifferentiation {
definition = "Approximation of derivatives using computational formulas based on function or data values."
}
ForwardDifference {
definition = "A one-sided derivative approximation using values ahead of the evaluation point."
}
BackwardDifference {
definition = "A one-sided derivative approximation using values behind the evaluation point."
}
CentralDifference {
definition = "A derivative approximation using values symmetrically placed around the evaluation point."
}
DifferenceStencil {
definition = "A pattern of sample locations and coefficients used in a finite-difference formula."
}
StepSize {
symbol = "h"
definition = "The spacing between evaluation points used by a difference formula."
}
TruncationError {
definition = "Approximation error caused by truncating the Taylor-series or interpolation representation."
}
RoundoffError {
definition = "Error introduced by finite-precision arithmetic and cancellation."
}
RichardsonExtrapolation {
definition = "A method combining derivative estimates at multiple step sizes to cancel leading-order error terms."
}
ComplexStepDifferentiation {
definition = "A derivative approximation using a small imaginary perturbation to avoid subtractive cancellation for suitable analytic functions."
}
NoisyDataDifferentiation {
definition = "Derivative estimation from data containing measurement or sampling noise."
}
}
RELATIONS {
NumericalDifferentiation --is_branch_of--> NumericalAnalysis
NumericalDifferentiation --approximates--> Derivative
ForwardDifference --is_type_of--> FiniteDifferenceFormula
BackwardDifference --is_type_of--> FiniteDifferenceFormula
CentralDifference --is_type_of--> FiniteDifferenceFormula
FiniteDifferenceFormula --uses--> DifferenceStencil
FiniteDifferenceFormula --uses--> StepSize
TruncationError --decreases_with--> StepSizeRefinement
RoundoffError --may_increase_with--> StepSizeRefinement
RichardsonExtrapolation --combines--> MultipleDerivativeApproximations
PolynomialDifferentiation --uses--> InterpolationPolynomial
SpectralDifferentiation --uses--> GlobalBasisRepresentation
NoisyDataDifferentiation --may_require--> Smoothing
RegularisedDifferentiation --controls--> NoiseAmplification
BoundaryStencil --is_special_case_of--> OneSidedDifference
}
OPERATORS {
FORWARD_FIRST_DERIVATIVE(f,x,h) :=
(f(x+h)-f(x))/h
BACKWARD_FIRST_DERIVATIVE(f,x,h) :=
(f(x)-f(x-h))/h
CENTRAL_FIRST_DERIVATIVE(f,x,h) :=
(f(x+h)-f(x-h))/(2*h)
CENTRAL_SECOND_DERIVATIVE(f,x,h) :=
(f(x+h)-2*f(x)+f(x-h))/h^2
FIVE_POINT_FIRST_DERIVATIVE(f,x,h) :=
(f(x-2*h)-8*f(x-h)+8*f(x+h)-f(x+2*h))/(12*h)
SECOND_ORDER_FORWARD_FIRST_DERIVATIVE(f,x,h) :=
(-3*f(x)+4*f(x+h)-f(x+2*h))/(2*h)
RICHARDSON(D_h,D_h_over_r,r,p) :=
D_h_over_r + (D_h_over_r-D_h)/(r^p-1)
COMPLEX_STEP_FIRST_DERIVATIVE(f,x,h) :=
imag(f(x+i*h))/h
WHEN f_is_complex_analytic_compatible
NONUNIFORM_DERIVATIVE(nodes,values,x0) :=
derivative_of_local_interpolating_polynomial_at_x0
REGULARISED_DERIVATIVE(data,lambda) :=
derivative_estimate_from_smoothing_or_penalised fit
}
DEFINITIONS {
D1 = "Numerical differentiation approximates derivatives from discrete information."
D2 = "Forward and backward differences are one-sided formulas."
D3 = "Central differences commonly achieve higher order with symmetric stencils."
D4 = "Reducing step size decreases truncation error only until roundoff and cancellation become significant."
D5 = "Differentiation amplifies high-frequency noise."
D6 = "Higher-order formulas require additional function evaluations and smoothness."
D7 = "Richardson extrapolation cancels leading-order truncation error when an asymptotic error expansion is valid."
D8 = "Complex-step differentiation can avoid subtractive cancellation for suitable functions and implementations."
D9 = "Nonuniform grids require coefficients adapted to node spacing."
D10 = "Boundary points often require one-sided stencils."
}
AXIOMS {
A1_LOCAL_APPROXIMATION:
Finite-difference derivatives arise from local polynomial or Taylor approximation
A2_STEP_DEPENDENCE:
Numerical derivative accuracy depends on step size
A3_ERROR_COMPETITION:
Truncation and roundoff errors respond differently to step-size refinement
A4_SMOOTHNESS:
Stated convergence order requires sufficient differentiability of the target function
A5_NOISE_AMPLIFICATION:
Differentiation amplifies measurement noise
A6_STENCIL_DEPENDENCE:
Derivative approximation depends on stencil geometry and coefficients
A7_BOUNDARY_EFFECT:
Boundary locations may require asymmetric formulas
A8_VERIFIABILITY:
Derivative claims should be supported by refinement, analytical reference or consistency evidence
}
REASONING {
R1_DERIVATIVE_PROBLEM_CLASSIFICATION {
INPUT = differentiation_problem
IDENTIFY = derivative_order
IDENTIFY = evaluation_location
IDENTIFY = uniform_or_nonuniform grid
IDENTIFY = analytic_function_or_sampled_data
IDENTIFY = noise_level
RETURN = problem_class
}
R2_FORMULA_SELECTION {
INPUT = problem_class_accuracy_and_data_availability
IF interior_uniform_grid
CONSIDER = central_difference
IF boundary_or_one_sided_data
SELECT = forward_or_backward formula
IF high_accuracy_and_smooth_function
CONSIDER = higher_order_or_Richardson
IF analytic_function_supports_complex_arithmetic
CONSIDER = complex_step
IF noisy_data
CONSIDER = smoothing_or_regularised differentiation
RETURN = differentiation_method
}
R3_STEP_SIZE_SELECTION {
INPUT = formula_precision_scale_and_smoothness
BALANCE = truncation_error_against_roundoff_and_cancellation
RETURN = practical_step_size
}
R4_ERROR_ANALYSIS {
INPUT = formula_and_step_size
DERIVE = truncation_order_from_Taylor expansion
ESTIMATE = floating_point amplification
RETURN = total_error_profile
}
R5_RICHARDSON_EXTRAPOLATION {
INPUT = derivative_estimates_at_related_step_sizes
IDENTIFY = leading_error_order_p
COMBINE = estimates
RETURN = extrapolated_derivative
}
R6_NONUNIFORM_GRID {
INPUT = irregular_nodes_and_values
FORM = local_interpolating polynomial_or_weights
DIFFERENTIATE = local representation
RETURN = derivative_estimate
}
R7_NOISY_DATA {
INPUT = sampled_noisy_data
ESTIMATE = noise_scale
SMOOTH_OR_REGULARISE = data
DIFFERENTIATE = fitted_representation
RETURN = derivative_with_uncertainty
}
R8_BOUNDARY_DIFFERENTIATION {
INPUT = boundary_point_and_available_nodes
SELECT = one_sided_stencil_of_required order
RETURN = boundary_derivative estimate
}
R9_REFINEMENT_CHECK {
INPUT = derivative_estimates_for_multiple_h
COMPARE = differences
ESTIMATE = observed_order
IDENTIFY = truncation_dominated_or_roundoff_dominated regime
RETURN = convergence_profile
}
}
CONSTRAINTS {
C1 = "Smaller step size does not always improve accuracy."
C2 = "Finite-difference order requires sufficient function smoothness."
C3 = "Central formulas require values on both sides of the evaluation point."
C4 = "Boundary formulas may have different error constants and orders."
C5 = "Noisy data can make naive small-step differentiation unstable."
C6 = "Complex-step differentiation requires complex-compatible analytic evaluation."
C7 = "Richardson extrapolation requires a valid asymptotic error expansion."
C8 = "Nonuniform-grid formulas must use actual node spacing."
C9 = "High-order stencils may be sensitive to noise and boundary availability."
C10 = "Derivative estimates from measured data should include uncertainty or smoothing context."
}
SEMANTIC_EQUIVALENCE {
"NumericalDifferentiation" <=> "NumericalDerivativeApproximation"
"ForwardDifference" <=> "ForwardOneSidedDifference"
"BackwardDifference" <=> "BackwardOneSidedDifference"
"CentralDifference" <=> "SymmetricDifferenceApproximation"
"DifferenceStencil" <=> "FiniteDifferenceNodeCoefficientPattern"
"RichardsonExtrapolation" <=> "LeadingErrorCancellationByMultiResolutionCombination"
}
VALIDATION {
V1 = "Derivative order is identified."
V2 = "Evaluation point and stencil are valid."
V3 = "Step size is explicit."
V4 = "Smoothness assumptions support stated order."
V5 = "Roundoff effects are considered for small step sizes."
V6 = "Boundary points use appropriate stencils."
V7 = "Nonuniform spacing is handled correctly."
V8 = "Noisy data use appropriate smoothing or regularisation."
V9 = "Refinement behaviour is checked when high accuracy is claimed."
V10 = "Approximate-versus-exact derivative status is preserved."
}
CONFIDENCE {
BASE_CONFIDENCE = 0.99
NUMERICAL_DIFFERENTIATION_DEFINITION = 0.99
FORMULA_SELECTION_REASONING = 0.99
STEP_SIZE_REASONING = 0.98
ERROR_ANALYSIS_REASONING = 0.99
RICHARDSON_REASONING = 0.99
NONUNIFORM_GRID_REASONING = 0.98
NOISY_DATA_REASONING = 0.96
REFINEMENT_REASONING = 0.98
POLICY =
"Reduce confidence when smoothness, step size, floating-point precision, node spacing, noise level, stencil availability or derivative order are underspecified."
}
AI_CONSUMPTION {
PURPOSES = [
SemanticSearch,
OntologyGrounding,
NumericalDifferentiationReasoning,
FiniteDifferenceReasoning,
StencilSelection,
StepSizeSelection,
TruncationErrorReasoning,
RoundoffErrorReasoning,
RichardsonExtrapolationReasoning,
ComplexStepReasoning,
NonuniformGridDifferentiation,
NoisyDataDifferentiation,
BoundaryDerivativeReasoning,
ErrorEstimation,
KnowledgeGraphConstruction,
RetrievalAugmentation,
RecursiveInference
]
NORMALISE {
"numerical differentiation" -> NumericalDifferentiation
"numerical derivative" -> NumericalDifferentiation
"forward difference" -> ForwardDifference
"backward difference" -> BackwardDifference
"central difference" -> CentralDifference
"finite difference derivative" -> FiniteDifferenceFormula
"difference stencil" -> DifferenceStencil
"Richardson extrapolation" -> RichardsonExtrapolation
"complex-step differentiation" -> ComplexStepDifferentiation
"noisy data differentiation" -> NoisyDataDifferentiation
}
INTERPRETATION_ORDER = [
detect_numerical_differentiation_context,
identify derivative_order_point_grid_spacing_smoothness_data_type_and_noise,
select forward_backward_central_high_order_Richardson_complex_step_or_regularised method,
choose practical_step_size,
compute derivative approximation,
estimate truncation_roundoff_and_data_noise effects,
verify refinement_stencil_boundary_and_smoothness assumptions,
return semantic output
]
}
EXECUTION_RULES {
E1:
IF query_mentions("numerical differentiation")
OR asks_for_approximate_derivative_from_values
THEN activate(NumericalDifferentiationOntology)
E2:
IF interior_point_with_symmetric_data
THEN prefer central_difference when appropriate
E3:
IF boundary_point
THEN use compatible_one_sided stencil
E4:
IF high_accuracy_requested
THEN consider higher_order_formula_or_Richardson extrapolation
E5:
IF extremely_small_h
THEN assess roundoff_and_cancellation before refinement
E6:
IF function_supports_complex_arithmetic
THEN consider complex_step_for_first_derivative
E7:
IF sampled_data_are_noisy
THEN avoid naive_small_step differentiation
AND consider smoothing_or_regularisation
E8:
IF grid_nonuniform
THEN derive coefficients_from_actual nodes
E9:
IF convergence_claimed
THEN compare estimates_across_step sizes
}
RECURSION {
ENTRY = NumericalDifferentiation
EXPAND(NumericalDifferentiation) -> [
DerivativeApproximation,
FirstDerivativeApproximation,
SecondDerivativeApproximation,
HigherDerivativeApproximation,
ForwardDifference,
BackwardDifference,
CentralDifference,
FiniteDifferenceFormula,
HigherOrderFiniteDifference,
DifferenceStencil,
StepSize,
UniformGrid,
NonuniformGrid,
RichardsonExtrapolation,
ComplexStepDifferentiation,
PolynomialDifferentiation,
SpectralDifferentiation,
NoisyDataDifferentiation,
RegularisedDifferentiation,
TruncationError,
RoundoffError,
ErrorEstimate,
OrderOfAccuracy,
BoundaryStencil
]
EXPAND(FiniteDifferenceFormula) -> [
ForwardDifference,
BackwardDifference,
CentralDifference,
ThreePointStencil,
FivePointStencil,
OneSidedDifference
]
EXPAND(ErrorStructure) -> [
TruncationError,
RoundoffError,
CancellationError,
DataNoise,
DiscretisationError
]
EXPAND(AdvancedDifferentiation) -> [
RichardsonExtrapolation,
ComplexStepDifferentiation,
SpectralDifferentiation,
RegularisedDifferentiation
]
STOP_CONDITION =
"Stop when the derivative order, evaluation point, stencil, step size, approximation, error balance, boundary status and refinement behaviour are sufficiently resolved."
}
ROUTING {
PARENT_ONTOLOGY = "Numerical Analysis"
IMMEDIATE_CONTEXTS = [
"Numerical Analysis Ontology",
"Numerical Methods Ontology",
"Calculus & Analysis Ontologies",
"Approximation Theory Ontologies"
]
RELATED_ONTOLOGIES = [
"Numerical Analysis Ontology",
"Numerical Methods Ontology",
"Numerical Analysis",
"Applied Mathematics Ontologies",
"Calculus & Analysis Ontologies",
"Derivative Ontologies",
"Approximation Theory Ontologies",
"Interpolation Ontologies",
"Differential Equations Ontologies",
"Scientific Computing Ontologies",
"Model Verification Ontology",
"Scientific Measurement Ontologies"
]
ROUTE_RULES = [
"Numerical Differentiation -> Numerical Analysis Ontology for formal numerical semantics",
"Numerical Differentiation -> Numerical Methods Ontology for algorithm selection",
"Numerical Differentiation -> Calculus & Analysis for exact derivative semantics",
"Numerical Differentiation -> Approximation Theory for interpolatory derivation",
"Numerical Differentiation -> Interpolation for nonuniform and polynomial differentiation",
"Numerical Differentiation -> Differential Equations for finite-difference operators",
"Numerical Differentiation -> Scientific Computing for scalable implementation",
"Numerical Differentiation -> Model Verification for derivative-convergence assessment",
"Numerical Differentiation -> Scientific Measurement for noisy sampled data"
]
}
UPDATE_MODEL {
MODE = "append-compatible semantic versioning"
MAJOR = "ontology-breaking conceptual change"
MINOR = "new compatible differentiation formulas, regularisation methods or reasoning pathways"
PATCH = "clarification, metadata or formatting correction"
RULES = [
"Preserve derivative-approximation semantics.",
"Preserve forward-backward-central distinction.",
"Preserve step-size error tradeoff.",
"Preserve truncation-versus-roundoff distinction.",
"Preserve nonuniform-grid awareness.",
"Preserve noisy-data differentiation caution.",
"Preserve boundary-stencil semantics.",
"Preserve machine-readable numerical-differentiation semantics."
]
}
OUTPUT {
CANONICAL_DEFINITION =
"Numerical differentiation approximates derivatives using discrete function values or sampled data."
FORWARD_SUMMARY =
"The forward difference approximates f'(x) by [f(x+h)-f(x)]/h."
CENTRAL_SUMMARY =
"The central difference approximates f'(x) by [f(x+h)-f(x-h)]/(2h) and is typically second-order accurate for smooth functions."
SECOND_DERIVATIVE_SUMMARY =
"The standard central second derivative uses [f(x+h)-2f(x)+f(x-h)]/h^2."
STEP_SUMMARY =
"Step size must balance truncation error against roundoff and cancellation."
RICHARDSON_SUMMARY =
"Richardson extrapolation combines estimates at multiple resolutions to cancel leading-order truncation error."
COMPLEX_STEP_SUMMARY =
"Complex-step differentiation can provide highly accurate first derivatives without subtractive cancellation when analytic complex evaluation is available."
NOISE_SUMMARY =
"Differentiation amplifies high-frequency noise, so sampled noisy data may require smoothing or regularisation."
BOUNDARY_SUMMARY =
"Boundary points commonly require one-sided finite-difference stencils."
}
FLOW {
INPUT
-> detect_numerical_differentiation_context
-> identify derivative_order_function_or_data_point_grid_spacing_smoothness_noise_and_accuracy requirements
-> classify forward_backward_central_high_order_Richardson_complex_step_nonuniform_or_regularised differentiation pathway
-> choose stencil_and_step_size
-> evaluate required function_or_data values
-> compute derivative approximation
-> estimate truncation_roundoff_cancellation_and_noise error
-> assess refinement_order_and_boundary effects
-> verify smoothness_spacing_stencil_and_precision assumptions
-> route to numerical_analysis_ontology numerical_methods calculus derivative approximation interpolation differential_equations scientific_computing model_verification_or_measurement ontology
-> recursively_expand_required_dependencies
-> verify_result
-> assign_confidence
-> produce_semantic_output
-> END
}
SEMANTIC_SUMMARY {
"The Numerical Differentiation Ontology defines computational derivative approximation. It supports forward, backward and central differences, higher-order finite-difference stencils, first and higher derivatives, nonuniform grids, Richardson extrapolation, complex-step methods, interpolatory and spectral differentiation, noisy-data differentiation, smoothing, regularisation, boundary stencils and the balance between truncation and roundoff error."
}
FLOW_HASH {
METHOD = "semantic-content-identity"
ID = "KIRETH-MATH-APPLIED-MATHEMATICS-NUMERICAL-DIFFERENTIATION-ONTOLOGY-V1"
}
}
END_FLOW
Download Code
Copy to Clipboard