A polynomial function is a function of the form:
a + b*x + c*x^2 + d*x^3 …
and the derivative (the slope of the line at point x) of this function is given by:
b + 2c*x + 3d*x^2 …
The User Defined Function (UDF) =EvalPoly1() will evaluate any polynomial and its derivatives, and may be downloaded from: EvalPoly.zip
The UDF input is:
=evalpoly1(x,Coefficient range, No of derivatives)
Where x is the value the function is to be evaluated for, and Coefficient range is a single row range containing the function coefficients, in increasing powers of x. If “no of derivatives” is zero the UDF returns a single value; otherwise it returns a single row array containing the specified data. To view the array, select the number of cells required, with the UDF in the left hand cell, then press F2 followed by ctrl-shift-enter.
The download file now also includes a 2D array version of the function, which is much faster for large data sets:
=EvalPoly1A(xa, Coefficient range, No of derivatives)
Where xa is a single column range of x values.
Typical output for a quartic polynomial is shown in the screen-shot below: