Tutorials › Calculus II › Shifted Polynomial Factors in Repeated Integration by Parts

Repeated and Tabular Parts · Tutorial 71 of 998

Shifted Polynomial Factors in Repeated Integration by Parts

Use powers of \(x-c\) to organize repeated integration by parts, then verify the resulting antiderivatives and compare them with unshifted expansions.

Intermediate 9 min read

What You'll Learn

  • Derive a repeated-integration-by-parts formula for \((x-c)^n e^{ax}\).
  • Use successive antiderivatives to integrate \((x-c)^n\sin(bx)\).
  • Track the factorial coefficients, alternating signs, and powers of the frequency.
  • Check the formulas by differentiating the proposed antiderivative.
  • Compare centered boundary terms with those obtained by expanding in powers of \(x\).

Why Center the Polynomial?

A factor such as \((x-c)^n\) is a polynomial whose natural reference point is \(c\). Repeated integration by parts differentiates this polynomial until it vanishes. Writing each derivative in powers of \(x-c\) keeps that process organized: the center stays visible, and the coefficients follow a simple pattern.

This is useful for both indefinite integrals and definite integrals. In a definite integral, the centered form often makes the endpoint values especially simple when an endpoint equals \(c\). It does not change the integral or replace integration by parts; it gives a convenient way to record its successive boundary terms.

The Centered Derivatives

Definition: Let \(n\) be a nonnegative integer and \(c\) a constant. For \(P(x)=(x-c)^n\), its \(k\)th derivative, for \(0\le k\le n\), is $$ P^{(k)}(x)=\frac{n!}{(n-k)!}(x-c)^{n-k}. $$ The next derivative is zero: \(P^{(n+1)}(x)=0\).

For example, if \(P(x)=(x-c)^3\), then its successive derivatives are \( (x-c)^3\), \(3(x-c)^2\), \(6(x-c)\), \(6\), and \(0\). Each differentiation lowers the power by one and multiplies by the previous power. After \(n\) differentiations, the remaining constant is \(n!\).

The formulas below apply to \(n\ge 0\). For the exponential formula we require \(a\ne 0\); for the sine formula we require \(b\ne 0\). If \(a=0\), the exponential factor is \(1\), and the integral is simply a polynomial integral. If \(b=0\), the sine factor is zero.

Polynomial Times an Exponential

Each integration by parts moves one derivative onto the polynomial and introduces another factor of \(1/a\) from integrating the exponential. The resulting finite formula is:

Theorem: If \(a\ne 0\) and \(n\) is a nonnegative integer, then $$ \int (x-c)^n e^{ax}\,dx = e^{ax}\sum_{k=0}^{n} (-1)^k\frac{n!}{(n-k)!}\frac{(x-c)^{n-k}}{a^{k+1}}+C. $$

Here \(C\) is an arbitrary constant of integration. The summation ends at \(k=n\) because the next derivative of the polynomial is zero. Each term records one of the boundary terms generated by repeated integration by parts.

Worked Example: A Cubic Centered Exponential

Evaluate \(\int (x-2)^3 e^{2x}\,dx\). Set \(t=x-2\) to keep the centered powers easy to read. The formula has four terms, one for each \(k=0,1,2,3\):

$$ \begin{aligned} \int (x-2)^3e^{2x}\,dx &=e^{2x}\left[ \frac{t^3}{2} -\frac{3t^2}{2^2} +\frac{3\cdot2\,t}{2^3} -\frac{3\cdot2\cdot1}{2^4} \right]+C\\ &=e^{2x}\left[ \frac{(x-2)^3}{2} -\frac{3(x-2)^2}{4} +\frac{3(x-2)}{4} -\frac{3}{8} \right]+C. \end{aligned} $$

To check, write the bracket as \(Q(x)\). Its derivative is \(Q'(x)=\frac{3}{2}(x-2)^2-\frac{3}{2}(x-2)+\frac{3}{4}\). Differentiating the proposed antiderivative gives

$$ \begin{aligned} \frac{d}{dx}\bigl(e^{2x}Q(x)\bigr) &=e^{2x}\bigl(2Q(x)+Q'(x)\bigr)\\ &=e^{2x}\left((x-2)^3-\frac{3}{2}(x-2)^2+\frac{3}{2}(x-2)-\frac{3}{4} +\frac{3}{2}(x-2)^2-\frac{3}{2}(x-2)+\frac{3}{4}\right)\\ &=(x-2)^3e^{2x}. \end{aligned} $$

The differentiated result is the original integrand, so the antiderivative is verified.

Why the Exponential Formula Works

The formula follows from the repeated integration-by-parts identity. For differentiable \(P\) and an antiderivative \(V\) of \(g\), one application gives \(\int Pg\,dx=PV-\int P'V\,dx\). Applying the same identity to the remaining integral produces the next term, with the opposite sign. The process ends when the polynomial derivative is zero.

1
Choose the first antiderivative.
For \(g(x)=e^{ax}\), take \(V_1=e^{ax}/a\), since \(a\ne0\).
2
Repeat integration by parts.
Each new integration of the exponential adds a factor \(1/a\); each differentiation of \(P\) contributes a minus sign in the remaining integral.
3
Stop when the polynomial vanishes.
After \(n+1\) derivatives, \(P^{(n+1)}=0\), so no remainder integral remains.

More explicitly, after \(n+1\) applications the result is \(\sum_{k=0}^{n}(-1)^kP^{(k)}(x)e^{ax}/a^{k+1}\), with no final integral because \(P^{(n+1)}=0\). Substituting \(P^{(k)}(x)=\frac{n!}{(n-k)!}(x-c)^{n-k}\) gives the stated formula. This also explains why the coefficients and alternating signs are not guessed: they come directly from the derivative chain and the repeated integration-by-parts identity.

Polynomial Times a Sine

For a sine factor, the repeated antiderivatives cycle through sine and cosine. Define \(G_0(x)=\sin(bx)\), and choose successive antiderivatives \(G_{k+1}\) so that \(G_{k+1}'=G_k\). For \(b\ne0\), the sequence begins \(G_1=-\cos(bx)/b\), \(G_2=-\sin(bx)/b^2\), and \(G_3=\cos(bx)/b^3\). The signs and powers of \(b\) must be retained at every stage.

Theorem: If \(b\ne0\) and \(n\) is a nonnegative integer, then $$ \int (x-c)^n\sin(bx)\,dx = \sum_{k=0}^{n}(-1)^k \frac{n!}{(n-k)!}(x-c)^{n-k}G_{k+1}(x)+C, $$ where \(G_0(x)=\sin(bx)\) and \(G_{j+1}'(x)=G_j(x)\). The antiderivatives \(G_j\) are chosen without additional constants.

The same repeated integration-by-parts identity justifies this finite sum: \(P\) is differentiated at each step, while the sine is integrated to the next \(G_j\). Since \(P^{(n+1)}=0\), the remaining integral eventually disappears. Different choices of constants in the \(G_j\) can alter the displayed expression only by terms whose total effect is absorbed into \(C\).

Worked Example: A Centered Quadratic Times Sine

Evaluate \(\int (x-1)^2\sin(3x)\,dx\). Here \(P=(x-1)^2\), \(P'=2(x-1)\), and \(P''=2\). The needed successive antiderivatives of \(\sin(3x)\) are \(G_1=-\cos(3x)/3\), \(G_2=-\sin(3x)/9\), and \(G_3=\cos(3x)/27\). Therefore

$$ \begin{aligned} \int (x-1)^2\sin(3x)\,dx &=P G_1-P'G_2+P''G_3+C\\ &=-\frac{(x-1)^2\cos(3x)}{3} +\frac{2(x-1)\sin(3x)}{9} +\frac{2\cos(3x)}{27}+C. \end{aligned} $$

To check, differentiate the three nonconstant terms. Their derivatives, in order, are \(-\frac{2(x-1)\cos(3x)}{3}+(x-1)^2\sin(3x)\), \(\frac{2\sin(3x)}{9}+\frac{2(x-1)\cos(3x)}{3}\), and \(-\frac{2\sin(3x)}{9}\). Adding them cancels the cosine terms and the remaining sine terms, leaving exactly \((x-1)^2\sin(3x)\).

Centered and Unshifted Boundary Terms

Centering changes how the polynomial is written, not the value of the integral. For a definite integral, the antiderivative is evaluated at both endpoints in either form. But the centered expression often displays the endpoint structure more clearly. If an endpoint is \(c\), every positive power of \(x-c\) vanishes there, leaving only the terms that contain power zero.

Expanding \((x-c)^n\) first gives a sum of powers of \(x\); applying integration by parts to each term then produces an unshifted expression. This is valid, but it can create more terms and obscure the simple derivative pattern. The two antiderivatives can differ by a constant, while their endpoint differences agree.

Worked Example: Compare the Definite Boundary Terms

Evaluate \(\int_0^2 (x-1)^2e^x\,dx\) using the centered form, then compare it with the unshifted expansion. For \(n=2\), \(a=1\), and \(c=1\), the centered formula gives

$$ \begin{aligned} \int (x-1)^2e^x\,dx &=e^x\bigl((x-1)^2-2(x-1)+2\bigr)+C. \end{aligned} $$

At \(x=2\), the bracket is \(1-2+2=1\), so the antiderivative value is \(e\). At \(x=0\), the bracket is \(1+2+2=5\), so the value is \(5\). Thus the definite integral is \(e-5\).

For the unshifted calculation, expand \((x-1)^2=x^2-2x+1\). The corresponding antiderivative is \(e^x(x^2-4x+5)\), because its derivative is

$$ \begin{aligned} \frac{d}{dx}\left(e^x(x^2-4x+5)\right) &=e^x\bigl(x^2-4x+5+2x-4\bigr)\\ &=e^x(x^2-2x+1)=e^x(x-1)^2. \end{aligned} $$

At \(x=2\), this unshifted bracket is \(4-8+5=1\), giving \(e\). At \(x=0\), it is \(5\), again giving \(5\). The difference is \(e-5\) in both calculations. In fact, the two bracket expressions differ by a constant, which does not affect a definite endpoint difference.

A Common Pitfall: Losing the Frequency Factor

Every integration of \(\sin(bx)\) or \(\cos(bx)\) introduces a factor of \(1/b\). Forgetting it changes the derivative by a factor of \(b\). For example, writing \(\int\sin(3x)\,dx=-\cos(3x)\) is incorrect: differentiating the proposed answer gives \(3\sin(3x)\), not \(\sin(3x)\). The corrected antiderivative is \(-\cos(3x)/3\), since its derivative is \(\sin(3x)\).

The same issue affects every later antiderivative in the repeated process: the successive factors are \(1/b\), \(1/b^2\), \(1/b^3\), and so on. A useful check is to differentiate each proposed antiderivative in the sine-cosine cycle before using it in the table. Centering the polynomial organizes its derivatives, but it does not remove the frequency factors.

Choosing the Centered Form

Use the centered formulas directly when the integrand is already expressed in powers of \(x-c\), or when \(c\) is a meaningful endpoint or reference value. Use an unshifted expansion when it makes the polynomial simpler to combine with other terms. In either case, the derivative test provides a reliable final check for an indefinite integral, and evaluating both endpoints checks a definite integral.

The main bookkeeping is consistent across the two families of integrands:

Factor being integratedWhat each integration contributesWhere the process ends
\(e^{ax}\), with \(a\ne0\)A factor \(1/a\) and alternating signsAfter the polynomial derivative becomes zero
\(\sin(bx)\), with \(b\ne0\)A sine-cosine cycle and a factor \(1/b\)After the polynomial derivative becomes zero

These are finite procedures because the polynomial has finite degree. Writing it as \((x-c)^n\) makes that termination especially transparent: every step lowers the centered power, and the final nonzero derivative is a constant.

Check Your Understanding

Work through these questions by tracking the polynomial derivatives and the successive antiderivatives of the other factor.

  1. State the condition on \(a\) for the exponential formula, and explain why the formula stops after finitely many terms.
  2. Write the first three successive antiderivatives of \(\sin(bx)\), assuming \(b\ne0\).
  3. Use the centered exponential formula to find \(\int (x+1)^2e^{2x}\,dx\), then verify your result by differentiation.
  4. Find \(\int (x-3)\sin(2x)\,dx\) by repeated integration by parts, showing the frequency factors.
  5. Why can centered and unshifted antiderivatives give the same definite integral even if their expressions look different?

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