It has been experimentally verified that the jerk of the desired trajectory adversely affects the perormance of the tracking control algorithms for robotic manipulators. In this paper we investigate the reasons behind this effect and state an optimization problem that minimizes joint jerk over a prespecified cartesian space trajectory. The necessary conditions are derived and a numerical algorithm is presented.