A commonly-used approach for torque computation utilizes the virtual work principle. Here’s what it is, and what options you have with it.
Options for (analytical) torque computation, part 2
More methods for analytical torque computation. Somewhat more advanced than previously, but still simple and fast. A little more versatile, too.