Tutorials › Calculus II › Polynomial-Trigonometric Recurrence Workshop

Reduction Formulas · Tutorial 86 of 998

Polynomial-Trigonometric Recurrence Workshop

Learn to reduce polynomial–trigonometric integrals step by step, keep boundary terms straight, and verify each result by differentiation.

Intermediate 10 min read

What You'll Learn

  • State the coupled reduction formulas for powers of x times sine and cosine.
  • Apply the formulas to indefinite integrals and retain the arbitrary constant.
  • Evaluate definite integrals by tracking endpoint contributions at every step.
  • Identify the base cases and the condition that the frequency is nonzero.
  • Check antiderivatives by differentiating and definite answers by evaluating endpoints.

From Recurrence to Reliable Evaluation

Integrals of a polynomial times a sine or cosine function are well suited to repeated integration by parts. The polynomial degree decreases each time, so the process terminates after finitely many steps. The main challenge is not the number of steps; it is keeping the sine and cosine integrals, signs, frequency factors, and endpoint terms consistent.

This workshop uses the coupled recurrences for \(x^n\sin(bx)\) and \(x^n\cos(bx)\) to evaluate both indefinite and definite integrals. The frequency \(b\) is assumed to be a nonzero real number, and \(n\) is a nonnegative integer. If \(b=0\), the trigonometric factor is constant or zero, so these formulas, which divide by \(b\), do not apply.

Definition: For \(n\geq 0\), write \(I_n\) for an antiderivative of \(x^n\sin(bx)\) and \(J_n\) for an antiderivative of \(x^n\cos(bx)\). In definite-integral formulas, the corresponding integrals are evaluated over the same stated interval.

The Coupled Reduction Formulas

Integration by parts gives a formula for \(I_n\) in terms of \(J_{n-1}\), and a second formula for \(J_n\) in terms of \(I_{n-1}\). For \(n\geq 1\), the indefinite forms are understood up to an arbitrary additive constant:

$$ \int x^n\sin(bx)\,dx = -\frac{x^n\cos(bx)}{b} +\frac{n}{b}\int x^{n-1}\cos(bx)\,dx, $$
$$ \int x^n\cos(bx)\,dx = \frac{x^n\sin(bx)}{b} -\frac{n}{b}\int x^{n-1}\sin(bx)\,dx. $$

The sign in the second formula is negative because the antiderivative of \(\sin(bx)\) is \(-\cos(bx)/b\). The frequency \(b\) appears in the denominator because differentiating or integrating a trigonometric function with argument \(bx\) introduces a factor of \(b\).

The base cases are immediate:

$$ \int \sin(bx)\,dx=-\frac{\cos(bx)}{b}+C, \qquad \int \cos(bx)\,dx=\frac{\sin(bx)}{b}+C. $$

For a definite integral over \([a,c]\), integration by parts includes the evaluated boundary term. The formulas are

$$ \int_a^c x^n\sin(bx)\,dx = \left[-\frac{x^n\cos(bx)}{b}\right]_a^c +\frac{n}{b}\int_a^c x^{n-1}\cos(bx)\,dx, $$
$$ \int_a^c x^n\cos(bx)\,dx = \left[\frac{x^n\sin(bx)}{b}\right]_a^c -\frac{n}{b}\int_a^c x^{n-1}\sin(bx)\,dx. $$

Here \([F(x)]_a^c\) means \(F(c)-F(a)\). It is not enough to substitute the upper endpoint alone: both endpoint values must be included.

Why the Recurrences Work

To derive the sine formula, choose \(u=x^n\) and \(dv=\sin(bx)\,dx\). Then \(du=nx^{n-1}\,dx\) and \(v=-\cos(bx)/b\). The integration-by-parts identity \(\int u\,dv=uv-\int v\,du\) gives

$$ \int x^n\sin(bx)\,dx = -\frac{x^n\cos(bx)}{b} -\int\left(-\frac{\cos(bx)}{b}\right)nx^{n-1}\,dx = -\frac{x^n\cos(bx)}{b} +\frac{n}{b}\int x^{n-1}\cos(bx)\,dx. $$

For the cosine formula, take \(u=x^n\) and \(dv=\cos(bx)\,dx\). In this case \(v=\sin(bx)/b\), so

$$ \int x^n\cos(bx)\,dx = \frac{x^n\sin(bx)}{b} -\frac{n}{b}\int x^{n-1}\sin(bx)\,dx. $$

These calculations also explain the definite versions: evaluate the \(uv\) term at \(c\) and \(a\), then retain the remaining integral over \([a,c]\). Each reduction lowers the polynomial degree by one. The two formulas alternate between sine and cosine, and the process reaches the base cases after finitely many reductions.

Worked Example: An Indefinite Sine Integral

Worked Example: Reduce \(\int x^3\sin(2x)\,dx\)

Let \(I_3=\int x^3\sin(2x)\,dx\) and \(J_2=\int x^2\cos(2x)\,dx\). Use the sine recurrence with \(n=3\) and \(b=2\):

$$ I_3=-\frac{x^3\cos(2x)}{2}+\frac{3}{2}J_2. $$

Now reduce \(J_2\):

$$ J_2=\frac{x^2\sin(2x)}{2}-\frac{2}{2}I_1 =\frac{x^2\sin(2x)}{2}-I_1. $$

To find \(I_1\), apply the sine recurrence once more, then use the cosine base case:

$$ I_1=-\frac{x\cos(2x)}{2}+\frac{1}{2}J_0, \qquad J_0=\frac{\sin(2x)}{2}. $$
$$ I_1=-\frac{x\cos(2x)}{2}+\frac{\sin(2x)}{4}. $$

Substitute this result into \(J_2\), then substitute \(J_2\) into \(I_3\):

$$ J_2 = \frac{x^2\sin(2x)}{2} +\frac{x\cos(2x)}{2} -\frac{\sin(2x)}{4}, $$
$$ I_3 = -\frac{x^3\cos(2x)}{2} +\frac{3x^2\sin(2x)}{4} +\frac{3x\cos(2x)}{4} -\frac{3\sin(2x)}{8} +C. $$

Check by differentiating each term. The derivatives are, in order, \(-\frac32x^2\cos(2x)+x^3\sin(2x)\), \(\frac32x^2\cos(2x)+\frac32x\sin(2x)\), \(\frac34\cos(2x)-\frac32x\sin(2x)\), and \(-\frac34\cos(2x)\). All terms except \(x^3\sin(2x)\) cancel, so the derivative is the required integrand.

Worked Example: A Definite Cosine Integral

Worked Example: Evaluate \(\int_0^\pi x^2\cos(2x)\,dx\)

Apply the definite cosine recurrence with \(n=2\) and \(b=2\):

$$ \int_0^\pi x^2\cos(2x)\,dx = \left[\frac{x^2\sin(2x)}{2}\right]_0^\pi -\int_0^\pi x\sin(2x)\,dx. $$

The boundary term is zero at both endpoints, since \(\sin(2\pi)=\sin(0)=0\). Reduce the remaining integral using the definite sine formula:

$$ \int_0^\pi x\sin(2x)\,dx = \left[-\frac{x\cos(2x)}{2}\right]_0^\pi +\frac12\int_0^\pi\cos(2x)\,dx. $$

The first boundary term is \(-\pi/2-0=-\pi/2\). The remaining integral is

$$ \int_0^\pi\cos(2x)\,dx = \left[\frac{\sin(2x)}{2}\right]_0^\pi =0. $$

Therefore \(\int_0^\pi x\sin(2x)\,dx=-\pi/2\), and the original integral is \(0-(-\pi/2)=\pi/2\). As a check, an antiderivative is \(\frac{x^2\sin(2x)}2+\frac{x\cos(2x)}2-\frac{\sin(2x)}4\). Its value at \(\pi\) is \(\pi/2\), and its value at \(0\) is \(0\), giving the same result.

Worked Example: A Definite Sine Integral

Worked Example: Evaluate \(\int_0^1 x^2\sin(3x)\,dx\)

First use the definite sine recurrence with \(n=2\) and \(b=3\):

$$ \int_0^1 x^2\sin(3x)\,dx = \left[-\frac{x^2\cos(3x)}{3}\right]_0^1 +\frac23\int_0^1x\cos(3x)\,dx. $$

The boundary term is \(-\cos(3)/3-0=-\cos(3)/3\). To evaluate the remaining integral, use the cosine recurrence with \(n=1\):

$$ \int_0^1x\cos(3x)\,dx = \left[\frac{x\sin(3x)}{3}\right]_0^1 -\frac13\int_0^1\sin(3x)\,dx. $$

The first term is \(\sin(3)/3\). The base integral is

$$ \int_0^1\sin(3x)\,dx = \left[-\frac{\cos(3x)}{3}\right]_0^1 = \frac{1-\cos(3)}{3}. $$

Consequently,

$$ \int_0^1x\cos(3x)\,dx = \frac{\sin(3)}{3}-\frac{1-\cos(3)}{9}, $$
$$ \int_0^1x^2\sin(3x)\,dx = -\frac{\cos(3)}{3} +\frac{2\sin(3)}{9} -\frac{2(1-\cos(3))}{27} = \frac{6\sin(3)-7\cos(3)-2}{27}. $$

For a check, an antiderivative obtained from the recurrence is \(-x^2\cos(3x)/3+2x\sin(3x)/9+2\cos(3x)/27\). Its value at \(1\) is \((-9\cos(3)+6\sin(3)+2\cos(3))/27\), and its value at \(0\) is \(2/27\). Subtracting gives \((6\sin(3)-7\cos(3)-2)/27\), as above.

A Sign Error to Avoid

A frequent mistake is to use a positive sign in the sine recurrence's first term. For example, an incorrect start for \(\int x\sin(2x)\,dx\) is

$$ \int x\sin(2x)\,dx \mathrel{\color{red}{\not=}} \frac{x\cos(2x)}{2}+\frac12\int\cos(2x)\,dx. $$

The error comes from overlooking that an antiderivative of \(\sin(2x)\) is \(-\cos(2x)/2\), not \(+\cos(2x)/2\). The correct calculation is

$$ \int x\sin(2x)\,dx = -\frac{x\cos(2x)}{2} +\frac12\int\cos(2x)\,dx = -\frac{x\cos(2x)}{2}+\frac{\sin(2x)}{4}+C. $$

Differentiating the correct expression gives \(-\cos(2x)/2+x\sin(2x)+\cos(2x)/2=x\sin(2x)\). This check catches the sign error immediately. For definite integrals, also evaluate every bracket as upper endpoint minus lower endpoint; omitting the lower endpoint can change the answer even when the recurrence itself is correct.

Using the Method Efficiently

Before applying the formulas, confirm that \(n\) is a nonnegative integer and \(b\ne0\). Then track the degree reduction and switch between sine and cosine as required. A useful record for each step is the polynomial power, the trigonometric function, and the coefficient generated by \(n/b\). For definite integrals, record the boundary term separately before reducing the remaining integral.

1
Choose the matching recurrence.
Use the sine formula for an \(x^n\sin(bx)\) integrand and the cosine formula for an \(x^n\cos(bx)\) integrand.
2
Keep the coefficient and sign.
Divide the boundary term by \(b\), and multiply the reduced integral by \(n/b\), retaining the recurrence's stated sign.
3
Reduce until the base case.
The polynomial exponent falls by one at each step, and the trigonometric factor alternates between sine and cosine.
4
Verify the result.
For an indefinite integral, differentiate the proposed antiderivative. For a definite integral, evaluate its antiderivative at both endpoints and subtract.

These checks matter because the recurrences produce several terms whose cancellations may not be obvious. Differentiation confirms an indefinite result locally, while endpoint evaluation confirms that a definite result includes the full contribution from the interval.

Check Your Understanding

Use the recurrences and show the intermediate steps in each calculation.

  1. State the conditions on \(n\) and \(b\) for the displayed reduction formulas to apply.
  2. Use the sine recurrence to begin reducing \(\int x^2\sin(4x)\,dx\). Which integral remains after the first step?
  3. Write the definite cosine recurrence for \(\int_a^c x^n\cos(bx)\,dx\), including its boundary term.
  4. Evaluate \(\int_0^{\pi/2}\cos(2x)\,dx\) using the base case, showing both endpoint values.
  5. Why does a derivative check help identify an incorrect sign in an indefinite answer?

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