A numerical optimal trajectory planning method is extended to determine the optimal motion trajectory of a giant swing which is an example of the nonholonomic constraint system. The human body is modeled as a 2-DOF serial link system. In order to obtain an optimal motion trajectory which approximately satisfies the hand constraint, the penalty method is used, and the trajectory is approximated by the 5th-order Hermite polynomial functions. The features of six types of local optimal trajectory obtained from a 2-DOF basic model are discussed. It is found that each trajectory changes in form according to the motion period and that the global optimal trajectory is also changed with change of the motion period. Optimal trajectories for improved models including the friction torque at the first joint and the angle region restriction at the second joint are also obtained. The validity of the analysis is proven by comparing the analytical and experimental results for a 2-DOF direct-drive robotic arm.