On this page
When an equation mixes sin θ and cos θ, squaring or dividing by cos θ can add or lose answers. The tan half-angle substitution replaces both with one variable, t, and leaves ordinary algebra.
What is the tan half-angle substitution?
It is the substitution t = tan(θ/2), which writes sin θ and cos θ as rational functions of a single variable t (Wolfram MathWorld: Weierstrass substitution). The formulas to remember are:
sin θ = 2t/(1 + t²)
cos θ = (1 − t²)/(1 + t²)
tan θ = 2t/(1 − t²)
They come from the double-angle formulas: write sin θ = 2 sin(θ/2) cos(θ/2), divide by sin²(θ/2) + cos²(θ/2) = 1, then divide top and bottom by cos²(θ/2).
The line from (−1, 0) to (cos θ, sin θ) on the unit circle makes angle θ/2, so it has slope tan(θ/2) and cuts the y-axis at height t. As t runs over all real numbers, the point goes round the circle once and misses only (−1, 0) (Wikipedia: tangent half-angle substitution).
How do you solve a trig equation with tan(θ/2)?
Worked example: solve 3 sin θ + 4 cos θ = 4.
Substitute: 3 · 2t/(1 + t²) + 4(1 − t²)/(1 + t²) = 4.
Multiply through by (1 + t²): 6t + 4 − 4t² = 4 + 4t².
Tidy up: 8t² − 6t = 0, so 2t(4t − 3) = 0, giving t = 0 or t = 3/4.
Convert back: t = 0 gives θ = 2nπ; t = 3/4 gives θ = 2nπ + 2 tan⁻¹(3/4).
Check: with t = 3/4, sin θ = 24/25 and cos θ = 7/25, and 3(24/25) + 4(7/25) = 100/25 = 4.
Test θ = π by hand: 3(0) + 4(−1) = −4, not 4, so no root was lost.
Step 6 is the one students skip. tan(θ/2) is undefined at odd multiples of π, so the substitution can never find those roots; the same singularity at x = π matters in definite integrals (Wikipedia).
How does it simplify trig expressions?
Expressions with 1 ± cos θ and sin θ often collapse, as in (1 − cos θ)/sin θ. The numerator becomes 1 − (1 − t²)/(1 + t²) = 2t²/(1 + t²), the denominator is 2t/(1 + t²), and the ratio is just t. So (1 − cos θ)/sin θ = tan(θ/2). The same steps give sin θ/(1 + cos θ) = 2t/2 = tan(θ/2).
Why does tan(θ/2) help in integration?
Because dθ converts neatly too: t = tan(θ/2) gives dθ = 2 dt/(1 + t²) (Wikipedia). Any integrand built from sin θ and cos θ using only +, −, × and ÷ therefore becomes a rational function of t, which partial fractions can finish.
Leonhard Euler used it for ∫ dx/(a + b cos x) in his 1768 integral calculus textbook; the popular name "Weierstrass substitution" is a misattribution (Wikipedia). The mathematician Michael Spivak called it "the world's sneakiest substitution" (MathWorld).
Worked example: ∫ dx/(1 + sin x + cos x).
Denominator: 1 + 2t/(1 + t²) + (1 − t²)/(1 + t²) = (2 + 2t)/(1 + t²).
With dx = 2 dt/(1 + t²), the integral becomes ∫ 2 dt/(2 + 2t) = ∫ dt/(1 + t).
Answer: ln|1 + tan(x/2)| + C.
Differentiate to check: (1/2)sec²(x/2)/(1 + tan(x/2)) simplifies to 1/(2cos²(x/2) + 2 sin(x/2) cos(x/2)), which is 1/(1 + cos x + sin x).
For the most common exam case, see our guide to integrating 1/(a + b cos x) with the tan(x/2) substitution. If you are still deciding when any substitution is worth it, read how to choose the right t in integration by substitution.
When should you use it, and when should you not?
Use it when:
the equation is a sin θ + b cos θ = c and you want exact roots
the integrand is 1/(a + b sin x + c cos x)
you need to prove an identity with 1 ± cos θ and sin θ
Skip it when:
the powers are even, such as sin² x or cos⁴ x: use double-angle formulas first
the derivative of one part sits next to the other: an ordinary substitution is faster
the equation in t comes out quartic or worse: the R sin(θ + α) form is usually quicker
Practice: solve five equations of the form a sin θ + b cos θ = c twice, once with t and once with the R-form, and compare, including θ = π. Our practice plan for trigonometric identities and equations gives this a weekly shape.
If a step goes wrong and you cannot see why, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. To revise the double-angle formulas behind it, the Fermi Concept Library gives each concept in mathematics its own lesson.



