Tutorials › Calculus II › Tabular Integrals of Polynomials Times Sine

Repeated and Tabular Parts · Tutorial 56 of 998

Tabular Integrals of Polynomials Times Sine

Use a polynomial’s terminating derivative row and the alternating antiderivatives of sine to evaluate polynomial-sine integrals efficiently.

Intermediate 9 min read

What You'll Learn

  • Set up a tabular integration-by-parts calculation for a polynomial times sine.
  • Generate the sine antiderivatives, including their frequency factors.
  • Use alternating diagonal products with the correct signs.
  • Explain why the table terminates and why the final derivative term is necessary.
  • Verify indefinite and definite integral calculations.

Why a Table Helps

Repeated integration by parts is effective when one factor becomes simpler each time it is differentiated. A polynomial has exactly this property: repeated differentiation eventually gives zero. Meanwhile, repeated antiderivatives of a sine function cycle through sine and cosine, with powers of the frequency in the denominators.

A tabular calculation keeps these two sequences visible and pairs their entries along diagonals. The table is finite because the polynomial derivatives terminate. Its last nonzero derivative still contributes a term; stopping before that term is a common source of errors.

Scope and condition: Let \(P(x)\) be a polynomial of degree \(n\), and let \(b\ne 0\) be a real constant. The tabular method below evaluates \(\int P(x)\sin(bx)\,dx\). The condition \(b\ne 0\) is needed for the displayed antiderivatives, which divide by powers of \(b\).

The Two Rows of the Table

Differentiate the polynomial down the left side. On the right, begin with \(\sin(bx)\) and repeatedly integrate. The first few entries in the antiderivative row are

$$ \begin{aligned} V_0&=\sin(bx),\\ V_1&=-\frac{\cos(bx)}{b},\\ V_2&=-\frac{\sin(bx)}{b^2},\\ V_3&=\frac{\cos(bx)}{b^3},\\ V_4&=\frac{\sin(bx)}{b^4}. \end{aligned} $$

Each entry after \(V_0\) is an antiderivative of the preceding entry: \(V_{j+1}'=V_j\). For example, differentiating \(-\cos(bx)/b\) gives \(\sin(bx)\), because the chain rule contributes a factor of \(b\), which cancels the denominator. The signs and powers of \(b\) matter even when \(b\) is not 1.

The diagonal products begin with \(P V_1\), then \(-P'V_2\), then \(+P''V_3\), and continue with alternating signs. The derivative row ends at \(P^{(n)}\), the last nonzero derivative when \(P\) has degree \(n\). The corresponding diagonal product must be included.

Tabular rule: For a polynomial \(P\) of degree \(n\) and \(b\ne 0\), define \(P^{(0)}=P\) and let \(V_0(x)=\sin(bx)\), with \(V_{j+1}'=V_j\). Then $$ \int P(x)\sin(bx)\,dx = \sum_{k=0}^{n}(-1)^k P^{(k)}(x)V_{k+1}(x)+C. $$ Here \(P^{(k)}\) is the \(k\)th derivative, and \(C\) is an arbitrary constant of integration.

Worked Examples

Worked Example: A Linear Polynomial and a Nonunit Frequency

Evaluate \(\int (2x+1)\sin(2x)\,dx\). Differentiate the polynomial until it reaches zero:

$$ \begin{aligned} P(x)&=2x+1, & P'(x)&=2, & P''(x)&=0,\\ V_1&=-\frac{\cos(2x)}{2}, && V_2=-\frac{\sin(2x)}{4}. \end{aligned} $$

There are two nonzero polynomial entries, so the table gives the first product minus the second product:

$$ \begin{aligned} \int (2x+1)\sin(2x)\,dx &=P V_1-P'V_2+C\\ &=-\frac{(2x+1)\cos(2x)}{2} +\frac{2\sin(2x)}{4}+C\\ &=-\left(x+\frac12\right)\cos(2x) +\frac12\sin(2x)+C. \end{aligned} $$

To check, differentiate the expression without \(C\). The derivative of the first term is \(-\cos(2x)+(2x+1)\sin(2x)\). The derivative of the second term is \(\cos(2x)\). Adding them leaves \((2x+1)\sin(2x)\), as required.

Worked Example: A Quadratic Polynomial and the Terminal Term

Evaluate \(\int (x^2+2x+3)\sin(2x)\,dx\). The polynomial derivative row is \(x^2+2x+3,\ 2x+2,\ 2,\ 0\). The antiderivative entries needed are \(-\cos(2x)/2,\ -\sin(2x)/4,\ \cos(2x)/8\).

$$ \begin{aligned} \int (x^2+2x+3)\sin(2x)\,dx ={}&-\frac{(x^2+2x+3)\cos(2x)}{2}\\ &+\frac{(2x+2)\sin(2x)}{4} +\frac{2\cos(2x)}{8}+C. \end{aligned} $$

The last displayed product, \(P''V_3\), is the terminal term. Simplifying gives

$$ -\frac{x^2+2x+3}{2}\cos(2x) +\frac{x+1}{2}\sin(2x) +\frac14\cos(2x)+C. $$

For a direct check, write \(P=x^2+2x+3\), so \(P'=2x+2\), \(P''=2\), and \(P'''=0\). The derivative of the first term in the unsimplified expression is \(-P'\cos(2x)/2+P\sin(2x)\). The derivative of the second is \(P''\sin(2x)/4+P'\cos(2x)/2\). The derivative of the third is \(-P''\sin(2x)/4\). The cosine terms cancel, and the additional sine terms cancel, leaving \(P\sin(2x)\).

Worked Example: A Cubic with Four Diagonal Products

Evaluate \(\int x^3\sin(3x)\,dx\). The derivatives are \(x^3,\ 3x^2,\ 6x,\ 6,\ 0\). The sine antiderivatives required are

$$ V_1=-\frac{\cos(3x)}{3},\qquad V_2=-\frac{\sin(3x)}{9},\qquad V_3=\frac{\cos(3x)}{27},\qquad V_4=\frac{\sin(3x)}{81}. $$

Apply the alternating signs, including the fourth product:

$$ \begin{aligned} \int x^3\sin(3x)\,dx &=x^3V_1-3x^2V_2+6xV_3-6V_4+C\\ &=-\frac{x^3\cos(3x)}{3} +\frac{x^2\sin(3x)}{3} +\frac{2x\cos(3x)}{9} -\frac{2\sin(3x)}{27}+C. \end{aligned} $$

Check by differentiating the four terms. Their derivatives, in order, are \(-x^2\cos(3x)+x^3\sin(3x)\), \(2x\sin(3x)/3+x^2\cos(3x)\), \(2\cos(3x)/9-2x\sin(3x)/3\), and \(-2\cos(3x)/9\). All terms except \(x^3\sin(3x)\) cancel. Thus the derivative is the original integrand.

Worked Example: Evaluate a Definite Integral Using the Table

Evaluate \(\int_0^\pi (x^2+1)\sin x\,dx\). Here \(b=1\), and the polynomial derivatives are \(x^2+1,\ 2x,\ 2,\ 0\). The antiderivatives are \(-\cos x,\ -\sin x,\ \cos x\). Therefore an antiderivative is

$$ F(x)=-(x^2+1)\cos x+2x\sin x+2\cos x. $$

At the upper endpoint, \(\cos\pi=-1\) and \(\sin\pi=0\), so \(F(\pi)=\pi^2+1-2=\pi^2-1\). At the lower endpoint, \(\cos 0=1\) and \(\sin 0=0\), so \(F(0)=-1+2=1\). Hence

$$ \int_0^\pi (x^2+1)\sin x\,dx =F(\pi)-F(0) =(\pi^2-1)-1 =\pi^2-2. $$

The antiderivative check follows from the quadratic example’s cancellation: differentiating \(F\) gives \((x^2+1)\sin x\). The endpoint subtraction also uses the correct order, upper value minus lower value.

Why the Formula Works

The table is repeated integration by parts written compactly. To see why it gives the result, recall the integration-by-parts identity \(\int u\,dv=uv-\int v\,du\). Applying it first with \(u=P\) and \(dv=V_0\,dx\) gives \(PV_1-\int P'V_1\,dx\). Applying it to the remaining integral gives \(PV_1-P'V_2+\int P''V_2\,dx\). Each further application produces the next alternating diagonal product.

A direct differentiation proves the full finite formula and makes the cancellation explicit. Set \(F=\sum_{k=0}^{n}(-1)^kP^{(k)}V_{k+1}\). By the product rule and \(V_{k+1}'=V_k\),

$$ F' = \sum_{k=0}^{n}(-1)^kP^{(k+1)}V_{k+1} + \sum_{k=0}^{n}(-1)^kP^{(k)}V_k. $$

In the first sum, replace the index \(k+1\) by \(j\). Its terms are \((-1)^{j-1}P^{(j)}V_j\), for \(j=1,\ldots,n+1\). These cancel the terms \((-1)^jP^{(j)}V_j\), for \(j=1,\ldots,n\), in the second sum. The last term from the first sum is zero because \(P^{(n+1)}=0\). The only uncancelled term is the \(k=0\) term of the second sum, \(P V_0=P(x)\sin(bx)\). Therefore \(F'\) is the original integrand, proving the formula.

Reading the Terminal Term Correctly

For degree \(n\), the table has \(n+1\) nonzero polynomial entries: \(P,P',\ldots,P^{(n)}\). The final product has sign \((-1)^n\) and uses \(V_{n+1}\). It does not disappear merely because the next derivative is zero. The zero derivative explains why there is no further integral remainder, not why the last existing product can be omitted.

Common mistake: For \(P(x)=x^2+2x+3\), stopping after the first two products gives $$ -\frac{P\cos(2x)}2+\frac{P'\sin(2x)}4+C. $$ This is incorrect: its derivative is \(P\sin(2x)+\frac{P''}{4}\sin(2x)\), not just \(P\sin(2x)\). Since \(P''=2\), the extra term is \(\frac12\sin(2x)\). Include the terminal product \(P''V_3=2\cos(2x)/8\); its derivative is \(-\frac12\sin(2x)\), which cancels the extra term.

When to Use This Method

Tabular integration is especially useful when the polynomial degree is more than one, because it organizes all the repeated integrations without requiring a fresh line of integration by parts for each step. Before starting, identify the constant \(b\) in \(\sin(bx)\), write enough antiderivatives to match the number of nonzero polynomial derivatives, and keep the alternating signs attached to the diagonal products.

If \(b=0\), the displayed table does not apply because its entries divide by \(b\). In that case \(\sin(bx)=\sin 0=0\), so the integrand is zero and its antiderivative is a constant. For \(b\ne0\), the table works for positive or negative \(b\), provided the factors of \(b\) are retained with their signs.

Check Your Understanding

Work each problem by writing the polynomial derivatives and the sine antiderivatives before forming the diagonal products.

  1. Use the table to find an antiderivative of \(x\sin(4x)\), and verify it by differentiation.
  2. For a polynomial of degree three, how many diagonal products appear, and which derivative gives the terminal product?
  3. Find an antiderivative of \((x^2-1)\sin x\), including its terminal term.
  4. Why does the tabular formula require \(b\ne0\), and what is the integral when \(b=0\)?
  5. In the quadratic example with frequency \(2\), what extra term remains after differentiating if the terminal product is omitted?

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