Why Half-Angle Identities Help
Expressions such as \(\sqrt{1+\cos x}\) and \(\sqrt{1-\sin x}\) can make an integral look more complicated than it is. The trigonometric expression under the radical is a perfect square after applying a half-angle identity. The main care required is that the square root is nonnegative: in general, the square root of a square is an absolute value, not the expression itself.
That absolute value makes the interval of integration important. On one interval the half-angle expression may be positive, while on another it may be negative. Once its sign is determined, the radical can be replaced by the appropriate signed expression, and the integral can be simplified.
The Four Half-Angle Rewrites
The double-angle identities give the identities below. They hold for every real \(x\), and the absolute values are essential because the principal square root is nonnegative.
For instance, \(1+\sin x=1+2\sin(x/2)\cos(x/2)\). Expanding the square \((\sin(x/2)+\cos(x/2))^2\) gives \(\sin^2(x/2)+\cos^2(x/2)+2\sin(x/2)\cos(x/2)=1+\sin x\). Taking its square root gives the absolute value of the expression being squared. The other three formulas follow in the same way from the double-angle identities and \(\sin^2 u+\cos^2 u=1\).
To make a branch choice, inspect the half-angle expression on the entire interval, not just at one convenient point. If the expression is continuous and has no zero on the interval, checking its sign at one point determines its sign throughout. If it has a zero inside the interval, split the interval at that zero and choose the sign separately on each part.
Reciprocal Radicals and the Branch Condition
When a radical appears in a denominator, zeros matter as well as signs. An integral containing \(1/\sqrt{1+\cos x}\), for example, is defined only where \(1+\cos x\ne 0\). Since \(1+\cos x=0\) at \(x=(2k+1)\pi\), for integer \(k\), an interval that includes such a point requires separate attention; the reciprocal cannot be treated as an ordinary continuous integrand there.
On an interval where the relevant half-angle expression is positive, these rewrites often leave a reciprocal of a sine, cosine, or their sum. Where it is negative, the absolute value changes the sign of the expression in the denominator. The integral must use the branch that matches the original nonnegative square root.
Worked Example: Integrating a Reciprocal of \(\sqrt{1+\cos x}\)
Evaluate \(\displaystyle \int_{-\pi/2}^{\pi/2}\frac{dx}{\sqrt{1+\cos x}}\).
For \(x\in[-\pi/2,\pi/2]\), the half-angle \(x/2\) lies in \([-\pi/4,\pi/4]\), where \(\cos(x/2)>0\). Thus the branch is \(\left|\cos(x/2)\right|=\cos(x/2)\), and
Therefore the integrand becomes \(\frac{1}{\sqrt{2}}\sec(x/2)\). An antiderivative of \(\sec u\) is \(\ln|\sec u+\tan u|\); with \(u=x/2\), we have \(dx=2\,du\). Hence an antiderivative in \(x\) is \(\sqrt{2}\ln|\sec(x/2)+\tan(x/2)|\). Evaluating at the endpoints gives
For the endpoint values, \(\sec(\pi/4)+\tan(\pi/4)=\sqrt{2}+1\), and \(\sec(-\pi/4)+\tan(-\pi/4)=\sqrt{2}-1\). The displayed form uses the equivalent values \(2+\sqrt{2}\) and \(2-\sqrt{2}\) only if the half-angle endpoint is \(\pi/4\) with a different normalization; evaluating directly gives \(\sqrt{2}+1\) and \(\sqrt{2}-1\). Thus the correct endpoint calculation is
As a derivative check, differentiating \(\sqrt{2}\ln|\sec(x/2)+\tan(x/2)|\) gives \(\frac{1}{\sqrt{2}}\sec(x/2)\), which equals \(1/\sqrt{1+\cos x}\) on this interval. The endpoint simplification also checks because \((\sqrt{2}+1)/(\sqrt{2}-1)=3+2\sqrt{2}=(1+\sqrt{2})^2\).
A Different Sign Choice for \(1-\sin x\)
The next example illustrates why one should identify the interval before removing absolute values. The expression \(\cos(x/2)-\sin(x/2)\) is positive on the interval used below, so the radical equals that expression. On intervals beyond its zero at \(x=\pi/2\), this sign choice would no longer hold.
Worked Example: A Definite Integral with \(\sqrt{1-\sin x}\)
Evaluate \(\displaystyle \int_{-\pi/6}^{\pi/6}\frac{dx}{\sqrt{1-\sin x}}\).
Here \(x/2\in[-\pi/12,\pi/12]\). Throughout this range, \(\cos(x/2)>\sin(x/2)\), so \(\cos(x/2)-\sin(x/2)>0\). The identity for \(1-\sin x\) therefore gives
The last equality follows from \(\cos u-\sin u=\sqrt{2}\cos(u+\pi/4)\). Set \(u=x/2+\pi/4\). Then \(dx=2\,du\), and the bounds become \(u=\pi/6\) and \(u=\pi/3\). Thus
Indeed, at \(u=\pi/3\), \(\sec u+\tan u=2+\sqrt{3}\); at \(u=\pi/6\), it is \(2/\sqrt{3}+1/\sqrt{3}=\sqrt{3}\). Differentiating \(\sqrt{2}\ln|\sec(x/2+\pi/4)+\tan(x/2+\pi/4)|\) gives \(\sqrt{2}\cdot\frac12\sec(x/2+\pi/4)=1/\sqrt{1-\sin x}\) on the stated interval, confirming the antiderivative.
When the Radical Is in the Numerator
The same sign check applies whether the radical is in the numerator or denominator. If the half-angle expression is positive on the interval, the square root can be replaced by that expression directly. The resulting integral may then be simpler than the original radical form.
Worked Example: Integrating \(\sqrt{1+\sin x}\)
Evaluate \(\displaystyle \int_0^{\pi/2}\sqrt{1+\sin x}\,dx\).
On this interval, \(x/2\in[0,\pi/4]\), so both \(\sin(x/2)\) and \(\cos(x/2)\) are nonnegative. Their sum is positive, and the branch identity becomes
Integrate the two terms, keeping the factor of \(1/2\) from the chain rule:
Differentiate the antiderivative: \(\frac{d}{dx}[-2\cos(x/2)+2\sin(x/2)]=\sin(x/2)+\cos(x/2)\), which is the original radical on \([0,\pi/2]\). This verifies the branch and the integration.
A Common Mistake: Dropping the Absolute Value
It is tempting to write \(\sqrt{1+\cos x}=\sqrt{2}\cos(x/2)\) without checking the interval. That statement is not true for all real \(x\). For example, at \(x=3\pi/2\), the left side equals \(1\), while \(\sqrt{2}\cos(3\pi/4)=-1\). The correct expression is \(\sqrt{2}|\cos(x/2)|=1\).
This error can even change the sign of an integral. On an interval where \(\cos(x/2)<0\), replacing the radical by \(\sqrt{2}\cos(x/2)\) would make the supposed denominator negative, although the original square root is positive. The correction is to retain the absolute value until the interval has been analyzed, then replace it by the correct signed expression.
Why the Interval Controls the Simplification
The identities themselves are global, but a simplified expression without an absolute value usually applies only on a particular interval. For instance, \(\cos(x/2)\) changes sign when \(x/2\) passes an odd multiple of \(\pi/2\). Likewise, \(\sin(x/2)\) changes sign at integer multiples of \(\pi\), and \(\cos(x/2)-\sin(x/2)\) vanishes when \(x/2=\pi/4+k\pi\). At a zero, the radical is zero too; a reciprocal radical may instead become undefined.
For a definite integral, the interval is part of the data that determines the correct expression. For an indefinite integral, the same antiderivative formula may apply only on intervals that avoid branch changes or points where the integrand is undefined. If an interval crosses a sign change, split it there and use a separate expression on each side.
Use the appropriate half-angle identity, keeping the absolute value produced by the square root.
Find whether the half-angle expression is positive, negative, or zero anywhere in the interval.
Replace the absolute value with the expression or its negative, as appropriate; split the interval if its sign changes.
Apply a suitable integration rule and differentiate the antiderivative on the interval where the branch choice holds.
Check Your Understanding
For each question, keep track of both the identity and the interval on which a sign choice is valid.
- Write \(\sqrt{1-\cos x}\) using a half-angle expression and an absolute value.
- On \(0\le x\le \pi\), what is \(\sqrt{1-\cos x}\) without an absolute value?
- Why is \(\sqrt{1+\sin x}\) not always equal to \(\sin(x/2)+\cos(x/2)\)?
- On what interval in \([-\pi,\pi]\) is \(\cos(x/2)-\sin(x/2)\) nonnegative?
- What should be done if the half-angle expression inside an absolute value changes sign during a definite integral?