Differential equations for telescopic boom with n-stepped sections are established on the basis of continuous beam column theory. The recursive formula for the stability of n-stepped telescopic boom is deduced by mathematical induction. The Levenberg-Marquardt numerical optimization algorithm combined with mechanical features is used to solve the transcendental equation in the recursive formula and determine the equations when n is unknown. The length coefficients obtained using the presented methods are compared with those of the China national standard GB3811-2008 and those calculated by ANSYS 17.0. Results show that the accuracy of the Levenberg-Marquardt algorithm is better than those of other algorithms. Moreover, the obtained length coefficients display a certain degree of nonlinearity. Therefore, linear interpolation is feasible in small-scale practical applications. The use of linear interpolation method leads to large error in the critical force in n-stepped section of all-terrain cranes.