Why Signs Matter in Definite Integrals
For a definite integral, the sign of the integrand matters. Where the integrand is positive, its contribution is positive; where it is negative, its contribution is negative. Thus an odd power of sine or cosine can have positive and negative contributions on the same interval.
The error often starts by treating an odd power as though it were always nonnegative. For example, \(\sin^2 x=1-\cos^2 x\) everywhere, but \(\sin^3 x\) is not always the nonnegative square root of a power of \(1-\cos^2 x\). The sign of \(\sin x\) must be preserved.
Sine changes sign at integer multiples of \(\pi\), and cosine changes sign at odd multiples of \(\frac{\pi}{2}\). Before evaluating an integral involving an odd power, check whether the interval includes any of these points. An even power is nonnegative, but an odd power retains the sign of its base.
Preserving the Sign in an Odd-Power Substitution
Suppose \(k\) is a nonnegative integer. The identity \(\sin^2 x=1-\cos^2 x\) gives the following identity for an odd power:
The factor \(\sin x\) on the right is signed. It must not be replaced by \(|\sin x|\). This factor is also exactly what is needed for the substitution \(u=\cos x\), since \(du=-\sin x\,dx\).
This method preserves signs across zeros. It does not require sine or cosine to keep the same sign throughout the interval, provided the integrand has been written in the indicated signed-factor form.
Why Endpoint Substitution Still Works Across a Zero
A substitution whose new variable increases and then decreases can look suspicious when the interval crosses a turning point. The key is that the substitution can be justified by the chain rule, without requiring the new variable to be one-to-one on the whole interval.
For example, \(\sin^{2k+1}x\cos^n x=\sin x(1-\cos^2x)^k\cos^n x\).
Let \(H\) be any antiderivative of \((1-u^2)^ku^n\). Then \(H'(u)=(1-u^2)^ku^n\).
The derivative of \(-H(\cos x)\) is \(\sin x(1-\cos^2x)^k\cos^n x\), so the definite integral is \(-H(\cos b)+H(\cos a)\) on \([a,b]\).
This is a complete justification: the integrand is the derivative of a single function on the interval, so the fundamental theorem of calculus applies even if \(\cos x\) turns around. The signs of \(\sin x\) are already included in that derivative.
Worked Example: A Signed Sine Cube Across a Sign Change
Worked Example: A Signed Sine Cube Across a Sign Change
Evaluate \(\int_0^{3\pi/2}\sin^3x\,dx\). The sine is positive on \((0,\pi)\) and negative on \((\pi,3\pi/2)\).
Separate one factor of sine and rewrite the square:
With \(u=\cos x\), \(du=-\sin x\,dx\), so an antiderivative is
Differentiate to check:
Now evaluate the endpoints. At \(x=3\pi/2\), \(\cos x=0\), so \(F(3\pi/2)=0\). At \(x=0\), \(\cos x=1\), so \(F(0)=-1+\frac13=-\frac23\). Therefore,
The result is positive, but the negative part from \(\pi\) to \(3\pi/2\) has been subtracted from the positive part. It has not been turned into positive area.
Worked Example: A Cosine Cube That Cancels
Worked Example: A Cosine Cube That Cancels
Evaluate \(\int_0^\pi\cos^3x\,dx\). Cosine is positive on \((0,\pi/2)\) and negative on \((\pi/2,\pi)\).
Rewrite the integrand as \(\cos x(1-\sin^2x)\). With \(u=\sin x\), an antiderivative is
Check by differentiation:
At both endpoints, \(\sin 0=\sin\pi=0\), so \(G(0)=G(\pi)=0\). Hence
The cancellation can also be seen by splitting at the sign change. At \(x=\pi/2\), \(G(\pi/2)=1-\frac13=\frac23\). Thus the integral from \(0\) to \(\pi/2\) is \(\frac23-0=\frac23\), and the integral from \(\pi/2\) to \(\pi\) is \(0-\frac23=-\frac23\). Their sum is zero.
Absolute Values Require Different Treatment
For an absolute-value integral, the negative portions of the corresponding signed power are made positive. If the function changes sign, split the interval at its zeros and remove the absolute value separately on each piece. The sign of the function is constant inside each piece.
For instance, \(|\sin x|^{2k+1}\) can be written as \((1-\cos^2x)^{k+1/2}\), but this expression no longer includes the signed factor \(\sin x\) needed for the usual \(u=\cos x\) substitution. To use that substitution safely, split at the zeros of sine so its sign is fixed on each subinterval.
Worked Example: An Absolute Sine Cube
Worked Example: An Absolute Sine Cube
Evaluate \(\int_0^{3\pi/2}|\sin x|^3\,dx\). Split at \(x=\pi\), where sine changes sign.
Use \(F(x)=-\cos x+\frac{\cos^3x}{3}\), for which \(F'(x)=\sin^3x\), as checked in the first example. On \([0,\pi]\), sine is nonnegative, so \(|\sin x|^3=\sin^3x\). The contribution is
On \([\pi,3\pi/2]\), sine is nonpositive, so \(|\sin x|^3=-\sin^3x\). The signed sine-cube integral on this piece is
Therefore, the absolute-value integral on that piece is its negative, \(\frac23\). Adding the two contributions gives
On the first piece, the integrand is \(\sin^3x\); on the second, the integrand is \(-\sin^3x\). This piecewise sign check is essential. The value \(2\) is also consistent with the fact that the absolute-value integrand is nonnegative throughout.
Worked Example: Absolute Cosine Over a Full Period
Worked Example: Absolute Cosine Over a Full Period
Evaluate \(\int_0^{2\pi}|\cos x|^3\,dx\). Cosine changes sign at \(\pi/2\) and \(3\pi/2\), so split at both points. On each of the four quarter-period intervals, the integral of \(|\cos x|^3\) equals \(\int_0^{\pi/2}\cos^3x\,dx\), by reflection or by substituting the corresponding reflected angle.
An antiderivative of \(\cos^3x\) is \(G(x)=\sin x-\frac{\sin^3x}{3}\). Thus one quarter-period contributes
All four pieces are nonnegative and have this same value, so
As a check, the absolute-value integrand is nonnegative everywhere, and the four quarter-period contributions sum to \(\frac83\).
A Common Sign Error and Its Correction
A frequent mistake is to replace an odd power by a nonnegative expression. For example, the incorrect calculation
fails whenever \(\sin x<0\). At \(x=3\pi/2\), the left side is \(-1\), while the right side is \(1\). On \([\pi,3\pi/2]\), that replacement would turn the signed integral \(\int_\pi^{3\pi/2}\sin^3x\,dx=-\frac23\) into the positive absolute-value contribution \(\frac23\). It would therefore give \(2\), the value of \(\int_0^{3\pi/2}|\sin x|^3\,dx\), instead of the signed integral's correct value \(\frac23\).
A Reliable Check Before Evaluating
Before computing a definite sine-cosine power integral, make these checks:
- Is the integrand a signed power, or does it contain an absolute value?
- Is either base raised to an odd power?
- Does the interval cross a zero where that base changes sign?
- Does the chosen substitution retain the signed differential factor?
- If the integrand has an absolute value, have you split the interval at the sign changes?
These checks prevent a common confusion: a signed integral records cancellation between positive and negative parts, while an absolute-value integral counts both parts as nonnegative contributions. Endpoint substitution is safe when it comes from a valid antiderivative; changing a signed power into a nonnegative root is not.
Check Your Understanding
For each question, pay attention to whether the integral is signed or uses an absolute value.
- On which subintervals of \([0,3\pi/2]\) is \(\sin^3x\) positive, negative, or zero?
- Why is \(\sin^3x=(1-\cos^2x)^{3/2}\) not a valid identity for all real \(x\)?
- What signed factor should be separated when using \(u=\sin x\) for an odd power of cosine?
- Why does a substitution such as \(u=\cos x\) still give valid endpoint evaluation when the interval crosses a turning point of cosine?
- Where should \(\int_0^{2\pi}|\cos x|^3\,dx\) be split, and why?