The Taylor expansion approximates a function f(x) in the neighborhood of a model point x0 by the partial sum of a power series of the distance to the model point (x - x0 ):
f( x-x0 ) = ∑1 / n! * f (n)(x0 )*( x - x0 )n
The coefficient ot the nth term is the nth derivative at the model point f (n)(x0), divided by n! = 1*2*3*4*...*n
With n➙∞ the Taylor series converges to the function if the derivatives do not diverge in the interval, which commonly is the case for "well behaved" functions.
In the simulation up to 7 derivatives are calculated for a given analytic function. The function itself is shown as a red curve. The partial sums of the Taylor series (Taylor approximations) are calculated and are drawn in blue. The difference between function and approximations is displayed in green.
Two parameters a and b can be varied by sliders a, b and are used to scale and vary the functions (e.g. amplitude and frequency). A third slider m defines an integer parameter, that can be used to differentiate power functions. The abscissa range can be varied by manual input into two number fields.
The model point is characterized by a thick blue spot. It can be drawn with the mouse along the function curve. In default it is shifted against the center of the x range to differentiate more clearly the consecutive orders of approximation.
The ComboBox contains predefined functions. The function field is editable; predefined functions can be changed, and one can input completely different functions. Selection of a predefined function starts calculation, as does any change in parameters
The default setting of the order is 3. Buttons +1 and -1 are used to switch the order between 0 (approximation by a constant) and 7 (approximation by a polynomial of 7th grade). For orders above 5 the calculation make take considerable time, depending on the speed of the computer.