In the paper, the authors find a simple and significant expression in terms of the Stirling numbers for derivative polynomials of a function with a parameter related to the higher order Apostol-Euler numbers and to the higher order Frobenius-Euler numbers. Moreover, the authors also present a common solution to a sequence of nonlinear ordinary differential equations.