Standard trigonometric integrals

∫sin⁡x dx\int\sin x\,dx and ∫cos⁡x dx\int\cos x\,dx are the easy warm-ups. The real syllabus test is what happens when the integrand gets messier: powers like sin⁡3x\sin^3x or cos⁡4x\cos^4x, the four "remaining" basics tan⁡x,cot⁡x,sec⁡x,csc⁡x\tan x,\cot x,\sec x,\csc x, and rational mixtures such as 1a+bcos⁡x\dfrac{1}{a+b\cos x} that do not look integrable at all until you rewrite them. The good news is that only a handful of moves cover every case in this section of the Calculus unit. Even powers fall to double-angle identities. Odd powers fall to peeling off one factor and substituting. And the trig-rational forms all yield to one universal trick — the half-angle substitution t=tan⁡x2t=\tan\frac{x}{2} — which converts any rational function of sin⁡x\sin x and cos⁡x\cos x into an ordinary algebraic integral. Learn to spot which move an integrand is asking for, and this becomes one of the most pattern-driven, scorable parts of the Integrals syllabus.

The core insight

Rewrite the integrand using an identity or the substitution t=tan⁡x2t=\tan\frac{x}{2} until it becomes a standard algebraic form in cos⁡x,sin⁡x\cos x,\sin x or tt, then integrate directly.

The core idea

Even powers of sine and cosine are lowered using the double-angle identities

sin⁡2x=1−cos⁡2x2,cos⁡2x=1+cos⁡2x2\sin^2x = \frac{1-\cos 2x}{2}, \qquad \cos^2x = \frac{1+\cos 2x}{2}

where: the right-hand sides contain only a constant and cos⁡2x\cos 2x, both directly integrable. For sin⁡4x\sin^4x or cos⁡4x\cos^4x, square the identity again and expand.

Odd powers are handled differently: peel off one factor and use sin⁡2x+cos⁡2x=1\sin^2x+\cos^2x=1 to convert the rest into the other function, then substitute. For instance sin⁡3x=sin⁡x(1−cos⁡2x)\sin^3x=\sin x(1-\cos^2x), after which t=cos⁡xt=\cos x turns the integral into a simple polynomial in tt.

The four remaining basic integrals, each obtained by rewriting the integrand in terms of sin⁡x,cos⁡x\sin x,\cos x and substituting:

∫tan⁡x dx=log⁡∣sec⁡x∣+C,∫cot⁡x dx=log⁡∣sin⁡x∣+C\int\tan x\,dx = \log|\sec x|+C, \qquad \int\cot x\,dx = \log|\sin x|+C
∫sec⁡x dx=log⁡∣sec⁡x+tan⁡x∣+C,∫csc⁡x dx=log⁡∣csc⁡x−cot⁡x∣+C\int\sec x\,dx = \log|\sec x+\tan x|+C, \qquad \int\csc x\,dx = \log|\csc x-\cot x|+C

where: each result is a logarithm because the underlying integrand, once rewritten, has the f′(x)/f(x)f'(x)/f(x) shape. These four are meant to be memorised outright, not re-derived under exam pressure.

Trig-rational forms like ∫dxacos⁡x+bsin⁡x\int\dfrac{dx}{a\cos x+b\sin x} or ∫dxa+bcos⁡x\int\dfrac{dx}{a+b\cos x} do not respond to any identity trick — they need a substitution that turns trigonometric functions into algebraic ones. That substitution is t=tan⁡x2t=\tan\dfrac{x}{2}, giving

sin⁡x=2t1+t2,cos⁡x=1−t21+t2,dx=2 dt1+t2\sin x=\frac{2t}{1+t^2}, \qquad \cos x=\frac{1-t^2}{1+t^2}, \qquad dx=\frac{2\,dt}{1+t^2}

where: tt ranges over all reals as xx sweeps through one period (away from x=πx=\pi), and every trigonometric expression on the right is now a ratio of polynomials in tt — so the whole integral becomes a rational function of tt, solvable by the standard algebraic forms or partial fractions. A related shortcut applies to ∫acos⁡x+bsin⁡xccos⁡x+dsin⁡x dx\int\dfrac{a\cos x+b\sin x}{c\cos x+d\sin x}\,dx: write the numerator as λ(ccos⁡x+dsin⁡x)+μ(−csin⁡x+dcos⁡x)\lambda(c\cos x+d\sin x)+\mu(-c\sin x+d\cos x), compare coefficients of cos⁡x\cos x and sin⁡x\sin x to solve for λ,μ\lambda,\mu, and the integral splits into λ∫dx\lambda\int dx plus an f′(x)/f(x)f'(x)/f(x) logarithmic piece — no Weierstrass substitution needed. The figure below maps out which of these four routes an integrand should trigger.

Figure
A decision map showing four integral types routed to four matching techniques
Which move does the integrand ask for sin^2x, cos^4x even power sin^3x, cos^3x odd power dx over a plus b cos x trig-rational double-angle identity rewrite, integrate directly peel one factor, let t = cos x polynomial in t t = tan of x over 2 Weierstrass, rational in t standard algebraic integral

Every trig-rational integral becomes algebraic

The half-angle substitution t=tan⁡x2t=\tan\dfrac{x}{2} converts every rational function of sin⁡x\sin x and cos⁡x\cos x into a rational function of tt; this single fact explains why forms like ∫dxa+bcos⁡x\int\dfrac{dx}{a+b\cos x} always reduce to a familiar log or arctan-type algebraic integral. Verifying that claim on a concrete case is the derivation below.

Derivation AThe Weierstrass substitution turns a trig-rational integral into a standard algebraic one

Show, for the concrete integral ∫dx3+5cos⁡x\int\dfrac{dx}{3+5\cos x}, that the substitution t=tan⁡x2t=\tan\dfrac{x}{2} replaces every trigonometric quantity with a rational expression in tt, so the whole integral collapses to the standard algebraic form ∫dta2−t2\int\dfrac{dt}{a^2-t^2} that is integrated by the log formula, with no trigonometric functions left anywhere in the working.

Step 1. Introduce t=tan⁡x2t=\tan\dfrac{x}{2} and record the three replacement rules: cos⁡x=1−t21+t2\cos x=\dfrac{1-t^2}{1+t^2} and dx=2 dt1+t2dx=\dfrac{2\,dt}{1+t^2} (the sin⁡x\sin x rule is not needed here since the integrand has no sin⁡x\sin x term).

Step 2. Substitute both into the integral. ∫dx3+5cos⁡x=∫13+5(1−t21+t2)⋅2 dt1+t2\displaystyle\int\frac{dx}{3+5\cos x}=\int\frac{1}{3+5\left(\dfrac{1-t^2}{1+t^2}\right)}\cdot\frac{2\,dt}{1+t^2}. Multiply numerator and denominator of the outer fraction by (1+t2)(1+t^2) so the (1+t2)(1+t^2) in the substituted cos⁡x\cos x cancels against the one already sitting under it, leaving ∫2 dt3(1+t2)+5(1−t2)\displaystyle\int\frac{2\,dt}{3(1+t^2)+5(1-t^2)}.

Step 3. Simplify the denominator: 3(1+t2)+5(1−t2)=3+3t2+5−5t2=8−2t23(1+t^2)+5(1-t^2)=3+3t^2+5-5t^2=8-2t^2. The integral is now ∫2 dt8−2t2=∫dt4−t2\displaystyle\int\frac{2\,dt}{8-2t^2}=\int\frac{dt}{4-t^2} — every trace of xx has vanished, and this is exactly the standard form ∫dt/(a2−t2)\int dt/(a^2-t^2) with a=2a=2.

Step 4. Apply the standard algebraic result ∫dta2−t2=12alog⁡∣a+ta−t∣+C\int\dfrac{dt}{a^2-t^2}=\dfrac{1}{2a}\log\left|\dfrac{a+t}{a-t}\right|+C, giving 14log⁡∣2+t2−t∣+C\dfrac{1}{4}\log\left|\dfrac{2+t}{2-t}\right|+C, then substitute back t=tan⁡x2t=\tan\dfrac{x}{2} to return to the original variable: ∫dx3+5cos⁡x=14log⁡∣2+tan⁡x22−tan⁡x2∣+C\displaystyle\int\frac{dx}{3+5\cos x}=\frac{1}{4}\log\left|\frac{2+\tan\frac{x}{2}}{2-\tan\frac{x}{2}}\right|+C. The general lesson holds for any acos⁡x+bsin⁡xa\cos x+b\sin x or a+bcos⁡xa+b\cos x denominator: the substitution always clears the trigonometry and leaves a polynomial denominator in tt.

Worked example

Evaluate ∫sin⁡3x dx\displaystyle\int\sin^3x\,dx, the standard odd-power case.

Step 1. Peel off one factor of sin⁡x\sin x and rewrite the rest using sin⁡2x=1−cos⁡2x\sin^2x=1-\cos^2x: sin⁡3x=sin⁡x (1−cos⁡2x)\sin^3x=\sin x\,(1-\cos^2x), so the integral becomes ∫sin⁡x (1−cos⁡2x) dx\displaystyle\int\sin x\,(1-\cos^2x)\,dx.

Step 2. Substitute t=cos⁡xt=\cos x, so dt=−sin⁡x dxdt=-\sin x\,dx, meaning sin⁡x dx=−dt\sin x\,dx=-dt. The integral turns into −∫(1−t2) dt\displaystyle-\int(1-t^2)\,dt.

Step 3. Integrate the polynomial: −∫(1−t2) dt=−t+t33+C-\int(1-t^2)\,dt=-t+\dfrac{t^3}{3}+C. Substitute back t=cos⁡xt=\cos x: −cos⁡x+cos⁡3x3+C-\cos x+\dfrac{\cos^3x}{3}+C.

Step 4. Check by differentiating: ddx(−cos⁡x+cos⁡3x3)=sin⁡x−cos⁡2xsin⁡x=sin⁡x(1−cos⁡2x)=sin⁡3x\dfrac{d}{dx}\left(-\cos x+\dfrac{\cos^3x}{3}\right)=\sin x-\cos^2x\sin x=\sin x(1-\cos^2x)=\sin^3x. ✓ Answer: ∫sin⁡3x dx=−cos⁡x+cos⁡3x3+C\displaystyle\int\sin^3x\,dx=-\cos x+\dfrac{\cos^3x}{3}+C.

Competitive stretch

For ∫cos⁡2x dx\int\cos^2x\,dx — the even-power sibling — no substitution is needed at all: use cos⁡2x=1+cos⁡2x2\cos^2x=\dfrac{1+\cos2x}{2} directly to get ∫cos⁡2x dx=x2+sin⁡2x4+C\displaystyle\int\cos^2x\,dx=\frac{x}{2}+\frac{\sin2x}{4}+C in one line. Contrasting this with the odd-power example above is the fastest way to internalise which route an exponent's parity demands.

Common traps

  • Using the wrong parity rule. Even powers need the double-angle rewrite; odd powers need "peel one factor, then substitute." Applying the even-power identity to an odd power (or vice versa) leaves an integral that will not simplify.
  • Sign slips in ∫cot⁡x dx\int\cot x\,dx and ∫csc⁡x dx\int\csc x\,dx. These four basic results should be memorised exactly; a dropped minus sign is the most common error when re-deriving ∫cot⁡x dx=log⁡∣sin⁡x∣\int\cot x\,dx=\log|\sin x| from ∫cos⁡xsin⁡xdx\int\frac{\cos x}{\sin x}dx.
  • Dropping the dx=2 dt1+t2dx=\dfrac{2\,dt}{1+t^2} factor when using t=tan⁡(x/2)t=\tan(x/2) — omitting it changes the integrand entirely, not just its appearance.
  • Leaving the final answer in terms of tt instead of substituting back to xx — an unfinished substitution is an incomplete answer, even if the algebra up to that point was correct.

Ask the tutor: Not sure whether an integrand wants a double-angle identity, the peel-and-substitute trick, or the t=tan⁡(x/2)t=\tan(x/2) substitution — ask the AI tutor to walk through a fresh example and explain how to spot the right pattern quickly.

How do I decide whether a power of sine or cosine is even or odd fast, under exam pressure?

Just look at the exponent. If it is even (sin⁡2x,cos⁡4x,…\sin^2x,\cos^4x,\dots), reach for the double-angle identity — square it again if the power is 4. If it is odd (sin⁡3x,cos⁡5x,…\sin^3x,\cos^5x,\dots), peel off exactly one factor of the function, convert the rest using sin⁡2x+cos⁡2x=1\sin^2x+\cos^2x=1, and substitute tt for the other function. The rule never depends on which of sine or cosine you have, only on whether the exponent is even or odd.

Do I always need the Weierstrass substitution for trig-rational integrals, or is there ever a shortcut?

Not always. If the integrand has the shape acos⁡x+bsin⁡xccos⁡x+dsin⁡x\dfrac{a\cos x+b\sin x}{c\cos x+d\sin x}, writing the numerator as λ(denominator)+μ(denominator’s derivative)\lambda(\text{denominator})+\mu(\text{denominator's derivative}) is usually faster than the full t=tan⁡(x/2)t=\tan(x/2) substitution, because it avoids introducing a new variable altogether. Reach for t=tan⁡(x/2)t=\tan(x/2) when the denominator is a plain sum like a+bcos⁡xa+b\cos x, where that derivative-matching trick does not apply.

Why does t equal tan of x over 2 work for every trig-rational integral, not just some of them?

Because sin⁡x,cos⁡x\sin x,\cos x and dxdx can all be written as rational functions of that single tt (the formulas in the core idea section), so any expression built purely from sin⁡x,cos⁡x\sin x,\cos x and constants becomes, after substitution, a ratio of polynomials in tt — and every rational function of one variable is integrable by the standard algebraic methods (direct forms or partial fractions). That universality is exactly why it is called the universal or Weierstrass substitution.

Before this

Where this leads