Tutorials › Calculus II › Mixed Workshop on Polynomial-Exponential-Trigonometric Integrals

Repeated and Tabular Parts · Tutorial 75 of 998

Mixed Workshop on Polynomial-Exponential-Trigonometric Integrals

Combine tabular integration by parts with exponential-trigonometric antiderivatives, then verify the result and handle definite endpoints carefully.

Intermediate 10 min read

What You'll Learn

  • Choose a useful exponential-trigonometric antiderivative before applying integration by parts.
  • Apply repeated integration by parts to polynomial factors with alternating signs.
  • Compute an indefinite integral involving a quadratic polynomial and an exponential sine.
  • Evaluate a polynomial-weighted exponential-cosine integral on a finite interval.
  • Check an antiderivative by differentiating it and check a definite integral by evaluating both endpoints.
  • Recognize and correct a sign error in a tabular calculation.

Combining the Factors

Integrals containing a polynomial multiplied by an exponential and a sine or cosine bring together two useful patterns. The polynomial becomes zero after finitely many derivatives, while the exponential-trigonometric factor has an antiderivative of the same general form as itself. Repeated integration by parts can therefore produce a finite expression rather than an endless chain of new integrals.

The practical order matters. First find an antiderivative of the exponential-trigonometric factor. Then use the polynomial as the factor to differentiate. For a definite integral, evaluate the resulting antiderivative at the upper and lower endpoints only after the algebra is complete.

Definition: A polynomial-exponential-trigonometric product integral is an integral whose integrand has the form \(p(x)e^{ax}\sin(bx)\) or \(p(x)e^{ax}\cos(bx)\), where \(p\) is a polynomial and \(a,b\) are real constants. The formulas below for the exponential-trigonometric factor require \(a^2+b^2>0\).

The Antiderivatives to Start With

For \(a^2+b^2>0\), useful starting antiderivatives are

$$ \int e^{ax}\sin(bx)\,dx = \frac{e^{ax}\bigl(a\sin(bx)-b\cos(bx)\bigr)}{a^2+b^2}+C $$
$$ \int e^{ax}\cos(bx)\,dx = \frac{e^{ax}\bigl(a\cos(bx)+b\sin(bx)\bigr)}{a^2+b^2}+C. $$

These formulas can be checked directly. For example, differentiating the numerator in the sine formula gives \(e^{ax}\) times

$$ a\bigl(a\sin(bx)-b\cos(bx)\bigr) +ab\cos(bx)+b^2\sin(bx) =(a^2+b^2)\sin(bx). $$

Dividing by \(a^2+b^2\) leaves \(e^{ax}\sin(bx)\), as required. Differentiating the cosine formula in the same way gives \(e^{ax}\cos(bx)\). The condition \(a^2+b^2>0\) ensures that the denominators are not zero.

Why Repeated Integration by Parts Stops

Integration by parts states that \(\int u\,dv=uv-\int v\,du\), when the functions involved are differentiable and the indicated antiderivative exists. For a polynomial factor, each differentiation lowers its degree; eventually its derivative is zero. This makes repeated integration by parts especially effective here.

Tabular rule: Let \(f\) have an antiderivative \(G_0\), and successively choose \(G_1,G_2,\ldots\) with \(G_{k+1}'=G_k\). If \(p\) is a polynomial of degree \(n\), then \(\int p(x)f(x)\,dx=\sum_{k=0}^{n}(-1)^k p^{(k)}(x)G_k(x)+C\). Here \(p^{(k)}\) is the \(k\)th derivative of \(p\), and \(p^{(n+1)}=0\).

The alternating signs and the nested antiderivatives follow from integration by parts. The finite expression is not a separate integration rule to memorize without reason; it is repeated use of that rule.

1
Choose the first antiderivative.
Take \(G_0\) to be an antiderivative of the exponential times the sine or cosine.
2
Differentiate the polynomial.
Record \(p,p',p'',\ldots\) until the derivatives reach zero.
3
Integrate the exponential-trigonometric factor repeatedly.
Form \(G_0,G_1,\ldots\), with each new function an antiderivative of the preceding one.
4
Combine with alternating signs.
Multiply corresponding entries, use signs \(+,-,+,-,\ldots\), and stop when the polynomial derivatives vanish.

This rule can also be justified by differentiating its right-hand side. For each term \( (-1)^k p^{(k)}G_k\), the product rule gives a term \( (-1)^k p^{(k)}G_{k-1}\) when \(k\geq 1\), because \(G_k'=G_{k-1}\). That term cancels the contribution \( (-1)^{k-1}p^{(k)}G_{k-1}\) from the preceding product. All such terms cancel in pairs, leaving \(pG_0'=pf\); the final polynomial derivative is zero. Thus the displayed sum differentiates to the original integrand.

Worked Example: A Quadratic Times an Exponential Sine

Worked Example: A Quadratic Times an Exponential Sine

Find \(\int x^2e^x\sin x\,dx\), and check the result by differentiation.

For \(e^x\sin x\), take \(a=b=1\) in the starting formula. Set

$$G_0=\frac{e^x(\sin x-\cos x)}{2}.$$

Integrating this function gives the next entries:

$$G_1=-\frac{e^x\cos x}{2},\qquad G_2=-\frac{e^x(\sin x+\cos x)}{4}.$$

Indeed, \(G_0'=e^x\sin x\), \(G_1'=G_0\), and \(G_2'=G_1\). The polynomial derivatives are \(p=x^2\), \(p'=2x\), \(p''=2\), and \(p'''=0\). Apply the alternating signs:

$$ \begin{aligned} \int x^2e^x\sin x\,dx &=x^2G_0-2xG_1+2G_2+C\\ &=\frac{x^2e^x(\sin x-\cos x)}{2} +xe^x\cos x -\frac{e^x(\sin x+\cos x)}{2}+C. \end{aligned} $$

To check, differentiate the three nonconstant terms. Differentiating \(x^2G_0\) gives \(2xG_0+x^2e^x\sin x\). Differentiating \(-2xG_1\) gives \(-2G_1-2xG_0\). Differentiating \(2G_2\) gives \(2G_1\). The terms \(2xG_0\) and \(-2xG_0\) cancel, as do \(-2G_1\) and \(2G_1\). The remaining derivative is \(x^2e^x\sin x\).

Worked Example: A Definite Integral and Its Endpoints

Worked Example: A Definite Integral and Its Endpoints

Evaluate \(\int_0^\pi xe^x\cos x\,dx\).

An antiderivative of \(e^x\cos x\) is \(H_0=e^x(\sin x+\cos x)/2\). An antiderivative of \(H_0\) is \(H_1=e^x\sin x/2\). Since \(p=x\) and \(p'=1\), repeated integration by parts gives

$$ \int xe^x\cos x\,dx =xH_0-H_1+C =\frac{xe^x(\sin x+\cos x)}{2} -\frac{e^x\sin x}{2}+C. $$

Now evaluate the antiderivative at each endpoint. At \(x=\pi\), \(\sin\pi=0\) and \(\cos\pi=-1\), so its value is \(-\pi e^\pi/2\). At \(x=0\), the first term is zero because of its factor \(x\), and the second term is zero because \(\sin 0=0\). Thus the value at \(0\) is \(0\). Therefore

$$ \int_0^\pi xe^x\cos x\,dx = \left[-\frac{\pi e^\pi}{2}\right]-0 = -\frac{\pi e^\pi}{2}. $$

For a check, differentiate \(xH_0-H_1\). Its derivative is \(H_0+xe^x\cos x-H_1'\). Since \(H_1'=H_0\), the \(H_0\) terms cancel, leaving \(xe^x\cos x\). The endpoint subtraction also uses the correct order, upper value minus lower value.

Worked Example: A Shifted Quadratic and a Different Exponent

Worked Example: A Shifted Quadratic and a Different Exponent

Find \(\int (x-1)^2e^{2x}\sin x\,dx\), then verify it by differentiation.

For \(e^{2x}\sin x\) and \(e^{2x}\cos x\), the starting antiderivatives are

$$ S_0=\frac{e^{2x}(2\sin x-\cos x)}{5}, \qquad C_0=\frac{e^{2x}(2\cos x+\sin x)}{5}. $$

Differentiating gives \(S_0'=e^{2x}\sin x\) and \(C_0'=e^{2x}\cos x\). Integrate \(S_0\) once and then twice to obtain

$$ G_1=\frac{2S_0-C_0}{5} =\frac{e^{2x}(3\sin x-4\cos x)}{25}, \qquad G_2=\frac{3S_0-4C_0}{25} =\frac{e^{2x}(2\sin x-11\cos x)}{125}. $$

These choices satisfy \(G_1'=S_0\) and \(G_2'=G_1\). For \(p=(x-1)^2\), the derivatives are \(p'=2(x-1)\) and \(p''=2\). Therefore

$$ \int (x-1)^2e^{2x}\sin x\,dx =(x-1)^2S_0-2(x-1)G_1+2G_2+C. $$

Substituting the functions gives the fully explicit antiderivative:

$$ \frac{(x-1)^2e^{2x}(2\sin x-\cos x)}{5} -\frac{2(x-1)e^{2x}(3\sin x-4\cos x)}{25} +\frac{2e^{2x}(2\sin x-11\cos x)}{125}+C. $$

To check it without expanding every coefficient, differentiate the three terms in the compact form. The derivative of \((x-1)^2S_0\) is \(2(x-1)S_0+(x-1)^2e^{2x}\sin x\). The derivative of \(-2(x-1)G_1\) is \(-2G_1-2(x-1)S_0\). The derivative of \(2G_2\) is \(2G_1\). The terms involving \(S_0\) and \(G_1\) cancel, leaving exactly \((x-1)^2e^{2x}\sin x\).

A Common Sign Error

The signs in repeated integration by parts alternate. For a quadratic polynomial, the correct pattern is \(+,-,+\). A tempting but incorrect calculation is to write

$$ \int x^2f(x)\,dx =x^2G_0+2xG_1+2G_2, $$

where \(G_0'=f\), \(G_1'=G_0\), and \(G_2'=G_1\). This uses plus signs where integration by parts requires minus signs. Differentiating the proposed expression gives \(x^2f+4xG_0+4G_1\), not \(x^2f\) in general. The corrected expression is

$$ \int x^2f(x)\,dx=x^2G_0-2xG_1+2G_2+C. $$

Differentiation confirms the correction: the extra terms \(2xG_0\) and \(-2xG_0\), and \(-2G_1\) and \(2G_1\), cancel. This check is especially useful when the trigonometric factors make a sign error hard to spot by inspection.

Choosing and Checking a Strategy

When the polynomial is low degree, tabular integration by parts is often the most direct route: it makes the terminating derivatives visible. For a definite integral, the same antiderivative can be used, but endpoint values should be simplified carefully, especially when sine and cosine take exact values at the endpoints. For an indefinite integral, the final check is to differentiate the proposed antiderivative and recover the full original integrand.

Always retain the constant \(C\) for an indefinite integral. For a definite integral, no constant is needed: it cancels in the subtraction of endpoint values. In either case, keep the polynomial derivatives and the successive antiderivatives distinct, and pair them in order. That simple bookkeeping prevents many errors.

Check Your Understanding

Use the repeated-integration-by-parts pattern to answer these questions. Check each proposed antiderivative by differentiation.

  1. What is the sequence of derivatives of \(p(x)=x^3\), and at what point does it become zero?
  2. For \(e^{2x}\cos x\), what are the coefficients in its antiderivative’s denominator?
  3. When \(p(x)=x^2\), what are the signs of the three terms in the tabular expression?
  4. Why does the expression for \(\int_0^\pi xe^x\cos x\,dx\) use the value at \(\pi\) minus the value at \(0\)?
  5. What derivative check should an indefinite answer pass before it is accepted?

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