Two substitution patterns come up so often that it pays to know them as ready-made formulas rather than re-deriving them every time.
Result (1). ∫f(x)f′(x)dx=log∣f(x)∣+c — whenever the numerator is (a constant multiple of) the exact derivative of the denominator, the integral is the log of the denominator's absolute value.
Proof (own words). Put u=f(x), so du=f′(x)dx; the integral becomes ∫udu=log∣u∣+c, and re-substituting u=f(x) gives the stated result.
Result (2). ∫f′(x)[f(x)]ndx=n+1[f(x)]n+1+c,n=−1 — a "chunk raised to a power" times the exact derivative of that chunk integrates by the ordinary power rule applied to the chunk.
Proof (own words). Again put u=f(x), du=f′(x)dx; the integral becomes ∫undu=n+1un+1+c, and re-substituting gives the result. (Result (1) is really the n=−1 case of this same pattern, which is exactly why that case has to be stated separately — the power rule itself is undefined at n=−1.)
The four standard log-form results, each a direct application of Result (1):
Writing tanx=cosxsinx and setting u=cosx (so du=−sinxdx) gives ∫tanxdx=−log∣cosx∣+c=log∣secx∣+c. Writing cotx=sinxcosx and setting u=sinx gives ∫cotxdx=log∣sinx∣+c. For cscx, multiply and divide by (cscx−cotx): cscx=cscx−cotxcscx(cscx−cotx)=cscx−cotxcsc2x−cscxcotx, whose numerator is exactly the derivative of the denominator, so by Result (1), ∫cscxdx=log∣cscx−cotx∣+c. Symmetrically, multiplying and dividing secx by (secx+tanx) gives numerator sec2x+secxtanx, the derivative of secx+tanx, so ∫secxdx=log∣secx+tanx∣+c.
∫tanxdx=log∣secx∣+c,∫cotxdx=log∣sinx∣+c,
∫cscxdx=log∣cscx−cotx∣+c,∫secxdx=log∣secx+tanx∣+c. …