A method for solving the parameter identification problem for ordinary differential equations of the second order