39The Mathematica code constructs this derivative and solves the quadratic equation analytically; the Matlab code simply copies the analytical formula generated by Mathematica .