Inverse dynamics is used extensively in robotics and biomechanics applications. In manipulator and legged robots, it can form the basis of an effective nonlinear control strategy by providing a robot with both accurate positional tracking and active compliance. In biomechanics applications, inverse dynamics control can approximately determine the net torques applied at anatomical joints that correspond to an observed motion. In the context of robot control, using inverse dynamics requires knowledge of all contact forces acting on the robot; accurately perceiving external forces applied to the robot requires filtering and thus significant time delay. An alternative approach has been suggested in recent literature: predicting contact and actuator forces simultaneously under the assumptions of rigid body dynamics, rigid contact, and friction. Existing such inverse dynamics approaches have used approximations to the contact models, which permits use of fast numerical linear algebra algorithms. In contrast, we describe inverse dynamics algorithms that are derived only from first principles and use established phenomenological models like Coulomb friction. We assess these inverse dynamics algorithms in a control context using two virtual robots: a locomoting quadrupedal robot and a fixed-based manipulator gripping a box while using perfectly accurate sensor data from simulation. The data collected from these experiments gives an upper bound on the performance of such controllers in situ. For points of comparison, we assess performance on the same tasks with both error feedback control and inverse dynamics control with virtual contact force sensing.