This paper presents a new approach to optimal design of large multibody spatial mechanical systems. This approach uses symbolic computing to generate the necessary equations for dynamic analysis and design sensitivity analysis. Identification of system topology is carried out using graph theory. The equations of motion are formulated in terms of relative joint coordinates through the use of velocity transformation matrix. Design sensitivity analysis is carried out using the Direct Differentiation method applied to the relative joint coordinate formulation for spatial systems. Symbolic manipulation programs are used to develop subroutines which provide information for dynamic and design sensitivity analysis. These subroutines are linked to a general purpose computer program which performs dynamic analysis, design sensitivity analysis, and optimization. An example is presented to demonstrate the efficiency of the approach.