Differentiation

See Also: Regression Interpolation Integration Data table


The “Differentiation” dialog box  from the Differentiation tab of the Polymath Regression and Analysis program is shown below. These data are from Example 3 - "Heat capacity" in the Polymath REG Regression Program. To find the first derivative of a dependent variable with respect to an independent variable, you should select first the independent variable’s name and the dependent variable’s name. After you specifiy the independent variable value, the first derivatives’ value is calculated at this point. Note that the selected independent variable value must lie inside the region where data is available.

Three algorithms are available for interpolation: Linear (STANDA), Lagrange polynomial (LAGRANGE) and Cubic spline (SPLINE). In linear interpolation, a straight line is passed through the two data points adjacent to the independent variable value for which the derivative is requested. In cubic spline interpolation a curve is passed through the two adjacent point so that the curve is smooth in its first derivative and continuous in its second derivative. In Lagrange polynomial approximation, the data is approximated by a polynomial which passes through all the data points. The various methods are discussed in detail in pp. 99-110 of Press et al . For data that can be represented with a smooth function with fairly regular shape, the Lagrange approximation can be used. For non-smooth data with irregular shape (broken lines with sharp edges), the linear approximation is the best. In between these two extreme cases, the cubic spline approximation yields the most accurate values. The program gives a warning message if there are large differences in the values obtained using the different techniques.

In the screen display shown above, the derivative d(Cp)/dT is calculated at 120 K for this data set. The calculated derivative value (using a cubic spline function) is 0.0054875 and the estimated error is about 24%. There is a warning that the calculated value may be inaccurate. The data of example 2 are indeed not smooth enough. These data should be smoothened by fitting a statistically valid polynomial to the data set. For these particular data a 3rd order polynomial passing through the origin is the most appropriate. Using such a polynomial to calculate the derivative at the same temperature gives d(Cp)/d(T)=0.0132692, which is very different from the spline function value, indeed.