The objective of this article is to present an efficient procedure for computer generation of the dynamic equations for a planar robot manipulator with arbitrarily assigned rigid or flexible links using any desired flexible mode shape functions. The dynamic equations for the serial link manipulator are derived using Lagrange's formulation and elastic deflection with the assumed-mode method. Fewer approximations are made than in other approaches, resulting in greater accuracy. A method to determine the centrifugal and Coriolis matrix is presented that yields an important structural property. The approach is systematic and allows a symbolic program to be written in Mathematica using a system of several groups and a constructed database. Four examples are illustrated to verify the dynamic equations. The stability of the zero dynamics is compared for different mode shape functions.