Sensitivity Analysis of Multibody Dynamic Systems Modeled by ODEs and DAEs