Torque integral solved (Trimmed code)