Inverse Problem Of Lagrangian Mechanics In Dimension Three