Let a be a non-zero real constant and consider the function p(x)=cot(ax+b), where b is a real constant. The domain of p excludes any x where sin(ax+b)=0.
(a) Express p(x) using elementary trigonometric functions only, then differentiate to obtain p′(x).
(b) Show that the derivative you obtained simplifies to p′(x)=−acsc2(ax+b). Clearly indicate each algebraic step in your simplification.