Differentiation Module

In numerical analysis, numerical differentiation describes algorithms for estimating the derivative of a mathematical function using values of the function and perhaps other knowledge about the function.

Nested modules

Modules Description

TwoPointDifferentiation

A two-point estimation is to compute the slope of a nearby secant line through two points. This gives an approximations of f'(x) at x respectively to two points "x and x+h"/"x-h and x+h"(depending on the used algorithm) of the function f. Choosing a small number h, h represents a small change in x, and it can be either positive or negative.

Functions and values

Function or value Description

differentiateThreePoint xValues yValues idxT idx0 idx1 idx2

Full Usage: differentiateThreePoint xValues yValues idxT idx0 idx1 idx2

Parameters:
    xValues : float[] - Sample Points t
    yValues : float[] - Sample Values x(t)
    idxT : int - Index of the point of the differentiation.
    idx0 : int - idx0 Index of the first sample.
    idx1 : int - Index of the second sample.
    idx2 : int - Index of the third sample.

Returns: float

Three-Point Differentiation Helper

xValues : float[]

Sample Points t

yValues : float[]

Sample Values x(t)

idxT : int

Index of the point of the differentiation.

idx0 : int

idx0 Index of the first sample.

idx1 : int

Index of the second sample.

idx2 : int

Index of the third sample.

Returns: float

Example