First and second order minimization methods for multi-dimensional functions