I am trying to calculate the scalar second derivative wrt two different variables.
To calculate the second derivative wrt one variable can be implemented as follows.
f(T, v) = T^4 * v^3
T_i = 1.0
v_i = 1.0
ForwardDiff.derivative(xx -> ForwardDiff.derivative(x -> f(T_i, x), xx), v_i) # -> 6.0
# my current working version
ForwardDiff.hessian(vv -> f(vv[1], vv[2]), [T_i, v_i])[1, 2] # -> 12.0
Is there a way to calculate only the scalar value I require without calculating the hessian?