What do you mean exactly by second derivative? Do you want to find the full Hessian matrix or only the second order derivatives with respect to each parameter individually (i.e. the diagonal of the Hessian matrix)?
Btw, what is your final purpose?