Diagram shows a shaft A B C containing two gears at B and C which is connected to a motor A where the torques of 600 Newton meter and 200 Newton meter is applied on B and C and the distance A B is 100 millimeter and B C is 300 millimeter. The x axis is taken along the axis of the gears and the y axis is taken along the motor support at A and perpendicular to the x axis.

The elastic torsion formula will be used to compute the shear stress in shaft segments (1)  and (2) :

τ=TcJ 

and the torque-twist relationship will be used to compute the twist in the shaft segments:

ϕ=TLJG 

For both formulas, the polar moment of inertia will be computed from:

J=π32d4