differentiate A*sin(p + f * x) with respect to f