# Differentiation

diff( f, x ) — numerical derivative of a real or complex function at x

diff( f, x, n )nth-order numerical derivative of a real or complex function at x

D( f, x ) — numerical derivative of a real or complex function at x

D( f, x, n )nth-order numerical derivative of a real or complex function at x

taylorSeries( f, x0 ) — numerical Taylor series of five terms of a real or complex function around x0 returned as a function

taylorSeries( f, x0, terms ) — numerical Taylor series of an arbitrary number of terms of a real or complex function around x0 returned as a function

gradient( f, point ) — numerical gradient of a real or complex function of multiple variables at the correspondingly dimensioned point

findExtremum( f, point ) — numerical minimum of a real function of multiple variables by gradient descent at the correspondingly dimensioned point

findExtremum( f, point, { findMaximum: true } ) — numerical maximum of a real function of multiple variables by gradient ascent at the correspondingly dimensioned point

# Integration

integrate( f, [a,b] ) — numerical integral of a real or complex function on the interval [a,b] by an adaptive Simpson algorithm

integrate( f, [a,b], options ) — numerical integral of a real or complex function on the interval [a,b]; options include

 `method` one of `'euler-maclaurin'`, `'romberg'`, `'adaptive-simpson'`, `'tanh-sinh'` or `'gaussian'`; default `'adaptive-simpson'` `tolerance` default 10−10 `avoidEndpoints` set to `true` to displace endpoints by `tolerance`

discreteIntegral( values, step ) — numerical integral over discrete real values separated by step using Euler-Maclaurin summation

summation( f, [a,b] ) — discrete summation of real or complex function values from a to b inclusive in integer steps

# Interpolation

polynomial( x, coefficients ) — value of polynomial with real or complex coefficients at x by Horner’s rule with the coefficient of the highest power first

polynomial( x, coefficients, `true` ) — value of polynomial with real or complex coefficients and its derivative at x by Horner’s rule returned as `{ polynomial: value, derivative: value }`

partialBell( n, k, arguments ) — partial Bell polynomial with integer indices n and k and an array of length nk+1 of real arguments

findRoot( f, [a,b] ) — numerical root of a real function on the interval [a,b] by bisection

findRoot( f, a ) — numerical root of a real or complex function starting from a by Newton’s method

findRoot( functions, point ) — simultaneous numerical root of an array of real functions starting from the correspondingly dimensioned point by Newton’s method

spline( points ) — interpolating cubic spline over the array of two-dimensional points returned as a function

spline( points, value ) — interpolating cubic spline over the array of two-dimensional points with a value of `'function'`, `'derivative'` or `'integral'` returned as a function

# Differential Equations

ode( f, y0, [x0,x1] ) — numerical solution of the system dy/dx = f(x,y), y(x0) = y0 on the specified interval. The function and initial condition should be vectorized for higher-order systems. The solution is returned as an array of arrays of data points, with the independent variable as the first item in each data point array.

ode( f, y0, [x0,x1], step, method ) — numerical solution of the system dy/dx = f(x,y), y(x0) = y0 on the specified interval with specified step size and a method of `'euler'` or `'runge-kutta'`. The function and initial condition should be vectorized for higher-order systems. The solution is returned as an array of arrays of data points, with the independent variable as the first item in each data point array.

# Transformation

fourierSinCoefficient( f, n ) — Fourier sine coefficient of index n of a continuous real function on the interval [0,2π]

fourierSinCoefficient( f, n, period ) — Fourier sine coefficient of index n of a continuous real function on the interval [0,period]

fourierSinCoefficient( points, n ) — Fourier sine coefficient of index n of an array of discrete two-dimensional points

fourierCosCoefficient( f, n ) — Fourier cosine coefficient of index n of a continuous real function on the interval [0,2π]

fourierCosCoefficient( f, n, period ) — Fourier cosine coefficient of index n of a continuous real function on the interval [0,period]

fourierCosCoefficient( points, n ) — Fourier cosine coefficient of index n of an array of discrete two-dimensional points