The derivative of this function is d2f().
function df extends Modelica.Icons.Function; input Real x "Argument" annotation( Dialog(__Dymola_label = "<html><i>x</i></html>")); input Real a[:] "Coefficients" annotation( Dialog(__Dymola_label = "<html><i>a</i></html>")); input Integer n = 0 "Power associated with the first term (before derivative)" annotation( Dialog(__Dymola_label = "<html><i>n</i></html>")); input Real dx "Derivative of argument" annotation( Dialog(__Dymola_label = "<html>d<i>x</i></html>")); input Real da[size(a, 1)] = zeros(size(a, 1)) "Derivatives of coefficients" annotation( Dialog(__Dymola_label = "<html>d<i>a</i></html>")); output Real df "Derivative" annotation( Dialog(__Dymola_label = "<html>d<i>f</i></html>")); end df;