When a segment of a flexible link of a flexible robot is currently sliding through a prismatic joint, it is usually assumed that the elastic deformation of the segment equals to zero. This is a kind of time-dependent boundary condition when formulating the dynamics model of a flexible robot consisting of prismatic joints. Hence, the dynamic modeling and especially the inverse dynamic analysis of the flexible robots with the prismatic joints are challenging. In this article, we present a new development of the dynamic modeling method for a generic two-link flexible robot that consists of a prismatic joint and a revolute joint. Moreover, a new bisection method-based algorithm is proposed to analyze the inverse dynamic responses of the flexible robots. Since the bisection method is a rapid converging method in mathematics, the proposed algorithm is effectively applicable to solving the inverse dynamic problem of a flexible robot in a robust manner. Last, the numerical simulation results show the effectiveness and the robustness of the proposed method.