dual_num
pub fn differentiate<T: Scalar + One, F>(x: T, f: F) -> T where F: Fn(Dual<T>) -> Dual<T>,
Evaluates the function using dual numbers to get the partial derivative at the input point