Tutorials › Calculus II › Coupled Recurrences for Polynomial-Sine and Polynomial-Cosine Integrals

Reduction Formulas · Tutorial 84 of 998

Coupled Recurrences for Polynomial-Sine and Polynomial-Cosine Integrals

Learn to derive and use the paired reduction formulas for integrals of a power of \(x\) times sine or cosine.

Intermediate 10 min read

What You'll Learn

  • State the conditions under which the polynomial-sine and polynomial-cosine recurrences apply
  • Derive each recurrence by integration by parts and explain why the two formulas are coupled
  • Use the base cases to evaluate examples without losing signs or constants
  • Verify recurrence results by differentiating the proposed antiderivative
  • Identify the common sign error in the cosine recurrence

Why These Integrals Come in Pairs

When a power of \(x\) multiplies a sine or cosine function, integration by parts reduces the power of \(x\). But the first integration by parts does not generally leave an integral of the same trigonometric type: a sine integral produces a cosine integral, and a cosine integral produces a sine integral. The two families therefore need to be handled together.

For example, integrating \(x^n\sin(bx)\) by parts leaves an integral involving \(x^{n-1}\cos(bx)\). Integrating \(x^n\cos(bx)\) by parts leaves one involving \(x^{n-1}\sin(bx)\). These linked formulas are called coupled recurrences: each family is expressed using the other family at a lower polynomial power.

Conditions and notation: Let \(n\) be a nonnegative integer and let \(b\) be a nonzero real number. Write \(S_n=\int x^n\sin(bx)\,dx\) and \(C_n=\int x^n\cos(bx)\,dx\). These are indefinite integrals, so each formula for them is understood up to an arbitrary constant of integration.

The assumption \(b\ne 0\) matters because the antiderivatives of \(\sin(bx)\) and \(\cos(bx)\) used in integration by parts contain \(1/b\). If \(b=0\), the integrands are instead \(0\) and \(x^n\), respectively, and can be integrated directly without these recurrences.

The Paired Recurrences

For each positive integer \(n\), integration by parts gives the following pair:

$$ S_n=-\frac{x^n\cos(bx)}{b}+\frac{n}{b}C_{n-1}, \qquad C_n=\frac{x^n\sin(bx)}{b}-\frac{n}{b}S_{n-1}. $$

Here \(S_n\) and \(C_n\) denote antiderivatives, and a constant may be added to either right-hand side. The formulas say that computing \(S_n\) requires \(C_{n-1}\), while computing \(C_n\) requires \(S_{n-1}\). Both recurrences lower the polynomial power by one.

The base cases, obtained by integrating the trigonometric functions directly, are

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

The symbol \(C\) in these base cases represents an arbitrary constant; it is not the indexed integral \(C_n\). In calculations, constants from successive indefinite integrations can be combined into one final constant.

Deriving the Recurrences

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

$$ \begin{aligned} S_n &= -\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\\ &= -\frac{x^n\cos(bx)}{b}+\frac{n}{b}C_{n-1}. \end{aligned} $$

For the cosine integral, choose \(u=x^n\) and \(dv=\cos(bx)\,dx\). In this case, \(du=nx^{n-1}\,dx\) and \(v=\sin(bx)/b\). Thus

$$ \begin{aligned} C_n &= \frac{x^n\sin(bx)}{b} -\int\frac{\sin(bx)}{b}nx^{n-1}\,dx\\ &= \frac{x^n\sin(bx)}{b} -\frac{n}{b}\int x^{n-1}\sin(bx)\,dx\\ &= \frac{x^n\sin(bx)}{b}-\frac{n}{b}S_{n-1}. \end{aligned} $$

This also explains why the formulas are coupled: differentiating sine gives cosine, and differentiating cosine gives negative sine. The two integration-by-parts calculations therefore exchange the trigonometric factor, while the derivative of \(x^n\) reduces its power. The reduction stops at power zero, where the base cases are known.

Why the method works: For \(n\ge 1\), differentiating \(x^n\) gives \(nx^{n-1}\). Each application of integration by parts therefore replaces a power \(n\) by the lower power \(n-1\). The trigonometric factor switches between sine and cosine, so both families are needed to continue the reduction.

Worked Examples

Worked Example: A First-Order Pair with \(b=3\)

Find antiderivatives of \(x\sin(3x)\) and \(x\cos(3x)\). Begin with the base cases \(S_0=-\cos(3x)/3\) and \(C_0=\sin(3x)/3\).

For the sine integral, use the recurrence with \(n=1\):

$$ \begin{aligned} S_1 &=-\frac{x\cos(3x)}{3}+\frac{1}{3}C_0\\ &=-\frac{x\cos(3x)}{3}+\frac{1}{3}\left(\frac{\sin(3x)}{3}\right)\\ &=-\frac{x\cos(3x)}{3}+\frac{\sin(3x)}{9}+C. \end{aligned} $$

For the cosine integral,

$$ \begin{aligned} C_1 &=\frac{x\sin(3x)}{3}-\frac{1}{3}S_0\\ &=\frac{x\sin(3x)}{3}-\frac{1}{3}\left(-\frac{\cos(3x)}{3}\right)\\ &=\frac{x\sin(3x)}{3}+\frac{\cos(3x)}{9}+C. \end{aligned} $$

Check the first answer by differentiating:

$$ \begin{aligned} \frac{d}{dx}\left(-\frac{x\cos(3x)}{3}+\frac{\sin(3x)}{9}\right) &=-\frac{\cos(3x)}{3}+x\sin(3x)+\frac{\cos(3x)}{3}\\ &=x\sin(3x). \end{aligned} $$

For the second answer,

$$ \begin{aligned} \frac{d}{dx}\left(\frac{x\sin(3x)}{3}+\frac{\cos(3x)}{9}\right) &=\frac{\sin(3x)}{3}+x\cos(3x)-\frac{\sin(3x)}{3}\\ &=x\cos(3x). \end{aligned} $$

Both derivatives reproduce the corresponding integrands.

Worked Example: A Second-Order Sine Integral with \(b=2\)

Evaluate \(\int x^2\sin(2x)\,dx\). The recurrence first requires \(C_1\), so find that lower-power cosine integral using \(C_0=\sin(2x)/2\) and \(S_0=-\cos(2x)/2\):

$$ \begin{aligned} C_1 &=\frac{x\sin(2x)}{2}-\frac{1}{2}S_0\\ &=\frac{x\sin(2x)}{2}-\frac{1}{2}\left(-\frac{\cos(2x)}{2}\right)\\ &=\frac{x\sin(2x)}{2}+\frac{\cos(2x)}{4}. \end{aligned} $$

Now apply the sine recurrence with \(n=2\):

$$ \begin{aligned} S_2 &=-\frac{x^2\cos(2x)}{2}+\frac{2}{2}C_1\\ &=-\frac{x^2\cos(2x)}{2} +\frac{x\sin(2x)}{2}+\frac{\cos(2x)}{4}+C. \end{aligned} $$

Differentiate the result to check it:

$$ \begin{aligned} \frac{d}{dx}\left(-\frac{x^2\cos(2x)}{2} +\frac{x\sin(2x)}{2}+\frac{\cos(2x)}{4}\right) &=-x\cos(2x)+x^2\sin(2x)\\ &\quad+\frac{\sin(2x)}{2}+x\cos(2x)-\frac{\sin(2x)}{2}\\ &=x^2\sin(2x). \end{aligned} $$

The terms introduced by differentiating the lower-order parts cancel, leaving exactly the required integrand.

Worked Example: A Third-Order Sine Integral with \(b=1\)

Evaluate \(\int x^3\sin x\,dx\). The recurrence gives \(S_3=-x^3\cos x+3C_2\). To obtain \(C_2\), first calculate \(S_1\):

$$ \begin{aligned} S_1&=-x\cos x+C_0\\ &=-x\cos x+\sin x. \end{aligned} $$

Then use the cosine recurrence for \(n=2\):

$$ \begin{aligned} C_2 &=x^2\sin x-2S_1\\ &=x^2\sin x-2(-x\cos x+\sin x)\\ &=x^2\sin x+2x\cos x-2\sin x. \end{aligned} $$

Substitute this into the formula for \(S_3\):

$$ \begin{aligned} S_3 &=-x^3\cos x+3(x^2\sin x+2x\cos x-2\sin x)\\ &=-x^3\cos x+3x^2\sin x+6x\cos x-6\sin x+C. \end{aligned} $$

For the check, differentiate each term and collect like terms:

$$ \begin{aligned} \frac{d}{dx}\left(-x^3\cos x+3x^2\sin x+6x\cos x-6\sin x\right) &=(-3x^2\cos x+x^3\sin x)\\ &\quad +(6x\sin x+3x^2\cos x)\\ &\quad +(6\cos x-6x\sin x)-6\cos x\\ &=x^3\sin x. \end{aligned} $$

The \(x^2\cos x\), \(x\sin x\), and \(\cos x\) terms cancel, confirming the antiderivative.

A Common Sign Error

The minus sign in the cosine recurrence is easy to lose. For \(n=1\) and \(b=2\), the correct formula is \(C_1=x\sin(2x)/2-S_0/2\). Since \(S_0=-\cos(2x)/2\), the result is \(C_1=x\sin(2x)/2+\cos(2x)/4\).

A common incorrect calculation changes the recurrence itself to \(C_n=x^n\sin(bx)/b+nS_{n-1}/b\). It would give the wrong candidate \(x\sin(2x)/2-\cos(2x)/4\). Differentiating exposes the problem:

$$ \frac{d}{dx}\left(\frac{x\sin(2x)}{2}-\frac{\cos(2x)}{4}\right) =\frac{\sin(2x)}{2}+x\cos(2x)+\frac{\sin(2x)}{2} =x\cos(2x)+\sin(2x). $$

This is not \(x\cos(2x)\). The correction is to retain the minus sign before \(nS_{n-1}/b\) in the recurrence. Substituting the negative base case \(S_0=-\cos(2x)/2\) then produces a positive cosine term in the antiderivative. Checking by differentiation is a reliable way to catch this particular error.

Using the Pair Effectively

For a positive integer power, the practical procedure is to choose the recurrence matching the trigonometric factor in the original integral, then compute the required lower-power integral from the other family. Continue until reaching \(S_0\) or \(C_0\). At every stage, keep track of both the factor \(n/b\) and the sign in the appropriate recurrence.

1
Identify the family.
Use the formula for \(S_n\) if the integrand contains sine, and the formula for \(C_n\) if it contains cosine.
2
Reduce the power.
The recurrence requires the other family with power \(n-1\); evaluate that lower-power integral before substituting.
3
Stop at the base case and check.
Use \(S_0=-\cos(bx)/b\) or \(C_0=\sin(bx)/b\), combine constants, and differentiate the final expression.

The recurrences are useful because they turn a family of integrals into a systematic sequence of lower powers rather than requiring a new strategy for every exponent. They also make the relationship between sine and cosine integrals explicit. The recurrence formulas themselves are the main result here; repeatedly substituting one into the other to obtain a formula involving only one family is a further algebraic step.

Check Your Understanding

Answer these questions using the formulas and reasoning in this tutorial.

  1. State the restrictions on \(n\) and \(b\) for the paired recurrences, and explain why the condition on \(b\) is needed.
  2. Write the recurrence for \(S_n\) and identify which lower-power integral it requires.
  3. Write the recurrence for \(C_n\). What is the sign before the \(S_{n-1}\) term?
  4. Use the base cases to find \(S_1\) when \(b=1\), including an arbitrary constant.
  5. Explain why differentiating a proposed antiderivative is an effective check for a sign error.

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