Before we start, I assume you're familiar with the derivatives of the six trigonometric functions:
dxdsinx=cosxdxdcosx=−sinxdxdtanx=sec2xdxdcscx=−cscxcotxdxdsecx=tan(x)secxdxdcotx=−csc2x
Via integrating these formulas, we can immediately deduce that
∫sinx dx=−cosx∫cosx dx=sinx∫sec2x dx=tanx∫cscxcotx dx=−cscx∫tanxsecx dx=secx∫csc2x dx=−cotx
Now let's try and find a formula for ∫tanx dx. This will require knowledge of U-substitution.
What is tan(x), really? It's just a ratio of sine to cosine. So we can rewrite our integral as
∫tan(x) dx=∫cos(x)sin(x) dx
Sines and cosines in a fraction... this sounds like a good substitution! If we let u=cosx, we'll have du=−sinx dx. Substituting this in:
∫cos(x)sin(x) dx∫tan(x) dx=−∫udu=−ln∣u∣+C=ln(∣cosx∣−1)+C=ln∣secx∣+C
Now we have an expression for ∫tanx dx.
Using the same principle, try to see if you can find ∫cotx dx.
If you did everything correctly, you should have gotten that ∫cotx dx=lnsinx+C. Well done!