Tutorials › Calculus II › The Weierstrass Substitution and Its Derivation

Rationalizing Substitutions · Tutorial 239 of 998

The Weierstrass Substitution and Its Derivation

See how the unit-circle parametrization leads to \(t=\tan(x/2)\) and converts sine, cosine, and the differential into rational expressions.

Intermediate 8 min read

What You'll Learn

  • Parametrize the unit circle using a line through the point \((-1,0)\)
  • Derive the formulas for \(\sin x\) and \(\cos x\) in terms of \(t=\tan(x/2)\)
  • Derive the differential formula \(dx=2\,dt/(1+t^2)\)
  • Identify the angle values excluded by the substitution and understand its branch
  • Check the formulas at specific parameter and angle values
  • Recognize why the substitution makes trigonometric expressions rational

Why Use the Half-Angle Parameter?

The substitution \(t=\tan(x/2)\) is useful because it expresses both \(\sin x\) and \(\cos x\) as rational functions of one variable. The key idea is geometric: a line of slope \(t\) through a fixed point on the unit circle meets the circle at another point whose coordinates are rational functions of \(t\).

This is not an arbitrary algebraic trick. The parameter \(t\) is the slope of a line, and the unit circle gives the trigonometric coordinates. Once those coordinates have been derived, differentiating the relation between \(t\) and \(x\) gives the corresponding formula for \(dx\).

Definition: The Weierstrass substitution is \(t=\tan(x/2)\). Whenever \(x\) is not an odd multiple of \(\pi\), it gives $$ \sin x=\frac{2t}{1+t^2},\qquad \cos x=\frac{1-t^2}{1+t^2},\qquad dx=\frac{2}{1+t^2}\,dt. $$

Deriving the Circle Parametrization

Use \(X\) and \(Y\) for coordinates in the plane, so that \(x\) can continue to denote the angle. The unit circle has equation \(X^2+Y^2=1\), and the point corresponding to angle \(x\) has coordinates \((\cos x,\sin x)\).

Choose the fixed point \((-1,0)\) on the circle. A nonvertical line through this point with slope \(t\) has equation \(Y=t(X+1)\). Find its second intersection with the circle by substituting this equation into \(X^2+Y^2=1\):

$$ X^2+t^2(X+1)^2=1. $$

Expanding and collecting terms gives

$$ (1+t^2)X^2+2t^2X+(t^2-1)=0. $$

The known intersection \(X=-1\) is one root. Factoring the quadratic makes the other root visible:

$$ (X+1)\big((1+t^2)X+(t^2-1)\big)=0. $$

The second intersection therefore has

$$ X=\frac{1-t^2}{1+t^2}. $$

Substitute this value into the equation of the line:

$$ Y=t(X+1) =t\left(\frac{1-t^2}{1+t^2}+1\right) =t\left(\frac{2}{1+t^2}\right) =\frac{2t}{1+t^2}. $$

For the point at angle \(x\), \(X=\cos x\) and \(Y=\sin x\). The line’s slope is consequently \(Y/(X+1)\), which, using the half-angle identities or the geometry of the angle, is \(\tan(x/2)\). Thus setting \(t=\tan(x/2)\) yields the two rational formulas.

Why the formulas work: The unit circle equation provides the relation between the coordinates, while the line through \((-1,0)\) provides their ratio through its slope. Solving these two equations gives the circle point as rational functions of the slope.

Relating the Slope to the Half-Angle

The geometric slope relation can also be seen directly. Let \(\theta=x/2\). The standard half-angle identities give

$$ \frac{\sin x}{1+\cos x} = \frac{2\sin\theta\cos\theta}{2\cos^2\theta} = \tan\theta = \tan(x/2), $$

provided \(\cos(x/2)\ne 0\). On the unit circle, \(\sin x/(1+\cos x)\) is exactly \(Y/(X+1)\), the slope of the line from \((-1,0)\) to \((X,Y)\). Hence this slope is \(t=\tan(x/2)\). Combining this with the coordinate calculation establishes

$$ \cos x=\frac{1-t^2}{1+t^2}, \qquad \sin x=\frac{2t}{1+t^2}. $$

Deriving the Differential

On any interval where \(x\) avoids odd multiples of \(\pi\), differentiate \(t=\tan(x/2)\) with respect to \(x\). The chain rule gives

$$ \frac{dt}{dx} =\frac{1}{2}\sec^2(x/2) =\frac{1}{2}\left(1+\tan^2(x/2)\right) =\frac{1+t^2}{2}. $$

Since \(1+t^2\) is positive for real \(t\), this derivative is nonzero. We can solve for the differential:

$$ dx=\frac{2}{1+t^2}\,dt. $$

The same result follows by using the inverse relation \(x=2\arctan t\) on the interval \(-\pi<x<\pi\). Differentiating gives \(dx/dt=2/(1+t^2)\). The two derivations express the same local change of variable.

Theorem: For \(t=\tan(x/2)\), with \(x\ne(2k+1)\pi\) for every integer \(k\), the trigonometric coordinates and differential are $$ \sin x=\frac{2t}{1+t^2},\qquad \cos x=\frac{1-t^2}{1+t^2},\qquad dx=\frac{2}{1+t^2}\,dt. $$ On \(-\pi<x<\pi\), the inverse relation is \(x=2\arctan t\). The formulas for sine and cosine are periodic in \(x\), so they also give the trigonometric values on other intervals where \(t\) is defined.

Worked Examples

Worked Example: Find the Circle Point When \(t=3/4\)

Use the rational coordinate formulas to find the corresponding sine and cosine values. First calculate the denominator:

$$ 1+t^2=1+\left(\frac{3}{4}\right)^2 =1+\frac{9}{16} =\frac{25}{16}. $$

Then

$$ \sin x=\frac{2t}{1+t^2} =\frac{3/2}{25/16} =\frac{3}{2}\cdot\frac{16}{25} =\frac{24}{25}, $$
$$ \cos x=\frac{1-t^2}{1+t^2} =\frac{7/16}{25/16} =\frac{7}{25}. $$

The point is \((7/25,24/25)\). Check that it lies on the unit circle:

$$ \left(\frac{7}{25}\right)^2+\left(\frac{24}{25}\right)^2 =\frac{49+576}{625} =\frac{625}{625} =1. $$

Its slope from \((-1,0)\) is \((24/25)/(7/25+1)=(24/25)/(32/25)=3/4\), as required.

Worked Example: Evaluate the Formulas at \(x=\pi/3\)

First determine the parameter:

$$ t=\tan(x/2)=\tan(\pi/6)=\frac{1}{\sqrt{3}}. $$

Thus \(t^2=1/3\) and \(1+t^2=4/3\). Substitution gives

$$ \sin x=\frac{2/\sqrt{3}}{4/3} =\frac{2}{\sqrt{3}}\cdot\frac{3}{4} =\frac{\sqrt{3}}{2}, $$
$$ \cos x=\frac{1-1/3}{4/3} =\frac{2/3}{4/3} =\frac{1}{2}. $$

These values check against the unit circle at \(x=\pi/3\): they satisfy \((\sqrt{3}/2)^2+(1/2)^2=3/4+1/4=1\), and both are positive, as expected in the first quadrant.

Worked Example: Check the Differential at \(x=\pi/2\)

At this angle, \(t=\tan(\pi/4)=1\). The derivative formula for the parameter is

$$ \frac{dt}{dx}=\frac{1+t^2}{2} =\frac{1+1}{2} =1. $$

Therefore \(dx/dt=1\) at this point. The differential formula gives the same result:

$$ \frac{dx}{dt}=\frac{2}{1+t^2} =\frac{2}{1+1} =1. $$

As an additional check, the coordinate formulas at \(t=1\) give \(\sin x=2/2=1\) and \(\cos x=(1-1)/2=0\), which are the correct values at \(x=\pi/2\).

Domain and Interpretation

The parameter \(t\) is real whenever \(x/2\) is not an angle at which tangent is undefined. Thus the excluded angles are \(x=(2k+1)\pi\), where \(k\) is an integer. Geometrically, these angles correspond to the point \((-1,0)\), the fixed point used to draw the line. There is no finite slope for a line from that point to itself, so it is not represented by a finite value of \(t\).

On the interval \(-\pi<x<\pi\), the angle and parameter correspond one-to-one: as \(x\) ranges over this interval, \(t\) ranges over all real numbers, and \(x=2\arctan t\). Outside this interval, the tangent has period \(\pi\), so \(t\) records the angle modulo \(2\pi\). This is why the rational formulas for sine and cosine remain valid on other intervals but the angle must be interpreted with the appropriate branch.

Why the Substitution Rationalizes Trigonometric Expressions

A rational function of \(t\) is a quotient of polynomials in \(t\). The formulas for sine and cosine are rational functions, and the differential factor \(2/(1+t^2)\) is rational as well. Consequently, expressions built from sums, products, and quotients of sine and cosine can be rewritten using rational operations in \(t\), wherever their denominators are nonzero.

For example, \(\sin x+\cos x\) becomes

$$ \sin x+\cos x =\frac{2t}{1+t^2}+\frac{1-t^2}{1+t^2} =\frac{1+2t-t^2}{1+t^2}. $$

This observation explains the method’s importance in integral calculus: after substituting the expressions for sine, cosine, and \(dx\), a trigonometric integrand may become a rational function of \(t\). Whether a particular integral is simpler after substitution depends on its form; rationalization is a tool, not a guarantee of shorter work.

A Common Mistake

A frequent error is to set \(t=\tan x\) instead of \(t=\tan(x/2)\), then use the half-angle formulas. For \(x=\pi/3\), that incorrect choice gives \(t=\sqrt{3}\), and the formulas would produce

$$ \sin x\ \text{(incorrectly)}=\frac{2\sqrt{3}}{1+3} =\frac{\sqrt{3}}{2}, \qquad \cos x\ \text{(incorrectly)}=\frac{1-3}{1+3} =-\frac{1}{2}. $$

The sine value happens to be correct, but the cosine value is not: \(\cos(\pi/3)=1/2\). The error is using the wrong parameter. The correct value is \(t=\tan(\pi/6)=1/\sqrt{3}\), which gives \(\cos x=1/2\). Always define \(t\) as the tangent of the half-angle before applying these formulas.

Summary

The Weierstrass substitution comes from parametrizing the unit circle by the slope of a line through \((-1,0)\). The second intersection has coordinates \(((1-t^2)/(1+t^2),\,2t/(1+t^2))\), and identifying those coordinates with \((\cos x,\sin x)\) gives the rational formulas. Differentiating \(t=\tan(x/2)\) supplies the differential factor.

Key takeaway: With \(t=\tan(x/2)\), the functions \(\sin x\), \(\cos x\), and the angle differential are rational in \(t\), except that the finite parameter does not represent odd multiples of \(\pi\).

Check Your Understanding

Use the geometry and formulas to answer these questions.

  1. What are the coordinates of the second intersection of the unit circle with the line \(Y=t(X+1)\)?
  2. For \(t=1/2\), calculate \(\sin x\) and \(\cos x\), and verify that the resulting point lies on the unit circle.
  3. Why does the parameter \(t=\tan(x/2)\) fail to be finite when \(x\) is an odd multiple of \(\pi\)?
  4. Differentiate \(t=\tan(x/2)\) and rearrange the result to obtain \(dx\) in terms of \(dt\).
  5. On which interval is the inverse relation \(x=2\arctan t\) valid without adding a multiple of \(2\pi\)?

Test yourself: Calculus II final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon