Why the Interval Endpoints Matter
On a definite integral, integration by parts produces not only a new integral but also a boundary term. For sine powers, that term may disappear on a particular interval, such as \([0,\pi/2]\). On a general interval \([u,v]\), however, it usually does not. Dropping it can change the value of the integral even when the reduction of the remaining integral is carried out correctly.
This tutorial develops the sine-power recurrence with both endpoints visible. Throughout, \(n\) is an integer with \(n\ge 2\), and \(u,v\in\mathbb R\) with \(u\le v\). Define
The interval can cross zeros of sine or cosine; no assumption that the integrand is positive is needed. The power \(n\) is an integer, so \(\sin^n x\) is well-defined for every real \(x\).
The Recurrence with Its Boundary Contribution
The first term reduces the exponent by two. The second term records the values at the two ends of the interval. In particular, it is the value at \(u\) minus the value at \(v\), divided by \(n\); this order follows from evaluating an antiderivative at the upper endpoint and subtracting its value at the lower endpoint.
The two starting integrals needed to use the recurrence are
The first follows by integrating \(1\). For the second, an antiderivative of \(\sin x\) is \(-\cos x\), so \(I_1=[-\cos x]_u^v=\cos u-\cos v\). Repeated reduction eventually reaches one of these two cases, according to whether \(n\) is even or odd.
Why the Formula Works
Write \(\sin^n x=\sin^{n-1}x\sin x\), and use integration by parts with \(a(x)=\sin^{n-1}x\) and \(db=\sin x\,dx\). Then \(da=(n-1)\sin^{n-2}x\cos x\,dx\) and \(b=-\cos x\). Integration by parts on \([u,v]\) gives
Use \(\cos^2x=1-\sin^2x\) in the remaining integral. This turns it into a difference of two sine-power integrals:
Move the term involving \(I_n\) on the right to the left. The resulting coefficient on the left is \(1+(n-1)=n\). Also, evaluating the bracket gives the lower-end value minus the upper-end value:
Dividing by \(n\) proves the stated recurrence. The boundary contribution is not an optional adjustment: it is the integration-by-parts term, and it is part of the identity for every choice of endpoints.
Worked Example: A Fourth Power on \([0,\pi/3]\)
Worked Example: A Fourth Power on \([0,\pi/3]\)
Evaluate \(I_4(0,\pi/3)=\int_0^{\pi/3}\sin^4x\,dx\) using the recurrence, retaining the endpoint terms.
First apply the recurrence with \(n=4\):
Since \(\sin 0=0\), \(\cos 0=1\), \(\sin(\pi/3)=\sqrt3/2\), and \(\cos(\pi/3)=1/2\), the boundary term is
Now reduce \(I_2\) with \(n=2\):
Substitute this value into the reduction for \(I_4\):
Check by direct integration. Since \(\sin^4x=(3-4\cos 2x+\cos 4x)/8\), an antiderivative is \(3x/8-\sin 2x/4+\sin 4x/32\). At \(x=\pi/3\) this is \(\pi/8-\sqrt3/8-\sqrt3/64=\pi/8-9\sqrt3/64\); at \(x=0\) it is zero. The difference agrees with the recurrence result.
When Does the Boundary Term Vanish?
For a particular exponent \(n\), the boundary contribution is zero precisely when
It is enough, but not necessary, for both endpoint values to be zero. For example, an endpoint where \(\sin x=0\) makes the product zero, and an endpoint where \(\cos x=0\) does so as well. If only one endpoint makes the product zero, the other endpoint may still contribute. More generally, the two products can be equal even when neither is zero.
Thus the recurrence on \([0,\pi/2]\) has no boundary contribution: at \(0\), the sine factor is zero, while at \(\pi/2\), the cosine factor is zero. That endpoint behavior is special to that interval. It is not a reason to omit the term on a different interval.
Worked Example: A Second Power on a Symmetric Interval
Worked Example: A Second Power on a Symmetric Interval
Evaluate \(\int_{\pi/4}^{3\pi/4}\sin^2x\,dx\). Here the two endpoint products are nonzero, so their difference must be computed.
Set \(n=2\), \(u=\pi/4\), and \(v=3\pi/4\). The recurrence gives
The lower endpoint product is \((\sqrt2/2)(\sqrt2/2)=1/2\). The upper endpoint product is \((\sqrt2/2)(-\sqrt2/2)=-1/2\). Also \(I_0=3\pi/4-\pi/4=\pi/2\). Therefore
For a direct check, an antiderivative of \(\sin^2x\) is \(x/2-\sin(2x)/4\). At \(3\pi/4\), its value is \(3\pi/8+1/4\); at \(\pi/4\), its value is \(\pi/8-1/4\). Subtracting gives \(\pi/4+1/2\), as required.
Worked Example: An Odd Power on \([\pi/6,\pi/2]\)
Worked Example: An Odd Power on \([\pi/6,\pi/2]\)
Evaluate \(\int_{\pi/6}^{\pi/2}\sin^3x\,dx\). This example uses the odd starting integral \(I_1\) and a nonzero lower-end contribution.
With \(n=3\), the recurrence is
First, compute the lower-power integral:
Next, evaluate the boundary term. At the lower endpoint, \(\sin^2(\pi/6)\cos(\pi/6)=(1/2)^2(\sqrt3/2)=\sqrt3/8\). At the upper endpoint, \(\sin^2(\pi/2)\cos(\pi/2)=1\cdot0=0\). Hence
Check using the antiderivative \(-\cos x+\cos^3x/3\). Its value at \(\pi/2\) is zero. At \(\pi/6\), it is \(-\sqrt3/2+(\sqrt3/2)^3/3=-\sqrt3/2+\sqrt3/8=-3\sqrt3/8\). The upper value minus the lower value is \(3\sqrt3/8\), matching the recurrence.
Reducing Repeatedly Without Losing Terms
When the recurrence is used more than once, each reduction has its own boundary contribution. A reliable approach is to write every step separately, then substitute the lower-power value. For instance, for \(I_4\), the reduction contains both the \(n=4\) endpoint term and the endpoint term from reducing \(I_2\). The first example shows why it is unsafe to record only the coefficient multiplying \(I_0\): the two boundary contributions are also part of the final value.
Apply the recurrence with that exponent, not with the original exponent if the integral has already been reduced.
Compute the lower-end product minus the upper-end product, then divide by the current exponent.
Reduce by two until reaching \(I_0\) or \(I_1\), and evaluate that integral on the same endpoints.
When practical, compare with a direct antiderivative or differentiate the antiderivative used for the check.
A Common Error: Dropping the Endpoint Term
A tempting but incorrect calculation is to use \(I_2(u,v)=\tfrac12 I_0(u,v)\) for every interval. That equality is valid only when the boundary difference for \(n=2\) is zero. On \([\pi/4,3\pi/4]\), it would give \(I_2=\pi/4\), because \(I_0=\pi/2\). But the correct recurrence includes the nonzero contribution \(\tfrac12\), giving \(I_2=\pi/4+1/2\). The direct antiderivative check confirms the latter.
Check Your Understanding
Use the recurrence and endpoint values carefully; do not assume the boundary contribution vanishes.
- State the recurrence for \(I_n(u,v)\), including the conditions on \(n,u,v\).
- For which endpoint choices does the boundary term vanish automatically because one of its factors is zero?
- Use the recurrence to calculate \(I_2(0,\pi/3)\).
- Explain why applying the recurrence on \([\pi/4,3\pi/4]\) without its boundary term gives an incorrect value.
- What are the two starting integrals needed to reduce all nonnegative integer sine powers?