Added gradient computations in latex