Differentiation.differentiate with ParameterFunction/ParameterDriver often fails
The method only works if the scaling factor of the ParameterDriver is 1.0 and if the ParameterDriver passed at the call to differentiate is the same as the one passed to the returned ParameterFunction.
If scale is different from 1.0, the returned derivative is the real derivative multiplied by scale.
If the parameterDriver p2 passed to the returned ParameterFunction is not the parameter p1 passed when calling differentiate, the derivative is computed using the current value of p1, not p2.