Why Combine These Factors in a Table?
A product such as \(x^2e^x\sin x\) contains two different kinds of factors. Differentiating the polynomial repeatedly makes it simpler, and eventually makes it zero. Integrating the exponential-trigonometric factor repeatedly does not make it zero, but its antiderivatives follow a systematic pattern. Tabular integration by parts brings those two patterns together in one finite calculation.
The method is especially useful when the polynomial has degree two or higher: each integration-by-parts step is recorded in the table, so the alternating signs and the final stopping point are visible. It is not a different integration rule. It is a compact way to organize repeated integration by parts.
Successive Antiderivatives of the Exponential-Trigonometric Factor
Let \(a,b\in\mathbb R\), with \(a\) and \(b\) not both zero, and write \(D=a^2+b^2\). Then \(D>0\). For \(g(x)=e^{ax}\sin(bx)\), let \(F_0=g\), and let \(F_j\) denote a \(j\)-fold successive antiderivative, so that \(F_j'=F_{j-1}\) for \(j\geq 1\). For \(g(x)=e^{ax}\cos(bx)\), use \(G_0=g\) and \(G_j'=G_{j-1}\).
One convenient formula for these columns uses \(z=a+ib\), which is nonzero because \(a,b\) are not both zero. Taking real and imaginary parts gives real-valued functions:
Indeed, differentiating either expression reduces the exponent \(j\) in the denominator by one, since \(\frac{d}{dx}(e^{zx}/z^j)=e^{zx}/z^{j-1}\). In particular, the first two entries are:
These formulas show why the second column is not just a repeated alternation between sine and cosine: the coefficients change as well. The complex-number expression is a concise way to generate as many successive antiderivatives as the polynomial degree requires.
The Tabular Formula
Let \(P\) be a polynomial of degree \(n\). Its derivative column is \(P,P',P'',\ldots,P^{(n)}\), followed by \(P^{(n+1)}=0\). Pair each polynomial derivative with the next successive antiderivative of \(g\), and alternate the signs, beginning with plus.
In a table, the summands are the diagonal products: \(P F_1\), then \(-P'F_2\), then \(+P''F_3\), and so on. The signs alternate. Stop at the last nonzero polynomial derivative; there is no remainder integral because the next derivative is zero.
Why the Table Works
The tabular formula follows from repeated use of the integration-by-parts identity \(\int u\,dv=uv-\int v\,du\). The following derivation also makes clear why the final term has the sign shown.
Taking \(u=P\) and \(dv=g\,dx\), so \(v=F_1\), gives \(\int Pg\,dx=PF_1-\int P'F_1\,dx\).
Since \(F_2'=F_1\), the remaining integral is \(\int P'F_1\,dx=P'F_2-\int P''F_2\,dx\). Substitution gives \(\int Pg\,dx=PF_1-P'F_2+\int P''F_2\,dx\).
At each step, integration by parts adds the next diagonal product and reverses the sign of the remaining integral. After the term involving \(P^{(n)}\), the remainder contains \(P^{(n+1)}=0\), so that integral is zero.
Equivalently, the cancellation can be checked by differentiating the proposed sum. In its derivative, the derivative of \(P^{(k)}\) cancels the term involving \(P^{(k+1)}F_{k+1}\) from the next summand. The only uncancelled term is \(P F_1'=Pg\), because the final polynomial derivative is constant and its next derivative vanishes. Thus the sum really is an antiderivative of \(Pg\).
Worked Example: A Quadratic Times an Exponential Sine
Worked Example: Integrating \(x^2e^x\sin x\)
Find \(\int x^2e^x\sin x\,dx\). Here \(a=b=1\), so \(D=2\). The polynomial derivative column is \(x^2,2x,2,0\). From the successive-antiderivative formulas, the sine column is:
For instance, \(F_2\) follows by substituting \(a=b=1\) in the formula for \(F_2\). The value of \(F_3\) can be obtained from \(\operatorname{Im}(e^{(1+i)x}/(1+i)^3)\), since \((1+i)^{-3}=(-1-i)/4\). The table gives:
To check, set \(A(x)=\frac{x^2}{2}(\sin x-\cos x)+x\cos x-\frac12(\sin x+\cos x)\), so the proposed antiderivative is \(e^xA(x)\). Direct differentiation gives \(A(x)+A'(x)=x^2\sin x\). Therefore its derivative is \(x^2e^x\sin x\), as required.
Worked Example: A Linear Polynomial Times an Exponential Cosine
Worked Example: Integrating \((x+1)e^x\cos(2x)\)
Here \(a=1\), \(b=2\), and \(D=5\). The polynomial column is \(x+1,1,0\). For the cosine factor, the first two entries are:
The table has just two nonzero polynomial derivatives, so its diagonal sum is:
For the check, \(G_1'=e^x\cos(2x)\): differentiating its numerator factor gives \[ \frac{d}{dx}\bigl(e^x(\cos 2x+2\sin 2x)\bigr) =e^x\bigl(\cos 2x+2\sin 2x-2\sin 2x+4\cos 2x\bigr) =5e^x\cos 2x. \] Also \(G_2'=G_1\). Consequently, differentiating \((x+1)G_1-G_2\) gives \(G_1+(x+1)e^x\cos(2x)-G_1=(x+1)e^x\cos(2x)\).
Worked Example: Evaluating a Definite Integral from the Table
Worked Example: Evaluating \(\int_0^1 x^2e^x\cos x\,dx\)
Use the cosine column for \(a=b=1\), for which \(D=2\). The required antiderivatives are:
The polynomial column is \(x^2,2x,2,0\), so an antiderivative is \(H(x)=x^2G_1-2xG_2+2G_3\). Substituting the entries gives:
At \(x=1\), the terms inside the parentheses sum to \(\frac12(\cos 1+\sin 1)-\sin 1+\frac12(\sin 1-\cos 1)=0\), so \(H(1)=0\). At \(x=0\), they sum to \(-\frac12\), so \(H(0)=-\frac12\). Therefore:
As a final check, differentiating \(H=x^2G_1-2xG_2+2G_3\) gives \(2xG_1+x^2G_1'-2G_2-2xG_2'+2G_3'\). Using \(G_1'=e^x\cos x\), \(G_2'=G_1\), and \(G_3'=G_2\), the terms \(2xG_1\), \(-2G_2\), and \(-2xG_1+2G_2\) cancel, leaving \(x^2e^x\cos x\).
Common Pitfall: Losing the Alternating Signs
A frequent error is to use a plus sign for every diagonal product. For example, the incorrect calculation for \(\int x e^x\cos x\,dx\) might be written \(xG_1+G_2\). That sign is wrong: the first integration-by-parts identity is \(\int xg\,dx=xG_1-\int G_1\,dx=xG_1-G_2\).
The correction can be checked directly. Differentiating \(xG_1+G_2\) gives \(G_1+xg+G_1=xg+2G_1\), which is not the integrand. Differentiating the corrected expression \(xG_1-G_2\) gives \(G_1+xg-G_1=xg\). The initial plus sign is followed by a minus sign, then a plus sign, and so forth.
When the Table Is Useful
This table is effective when the polynomial derivative column terminates after a manageable number of rows and the successive antiderivatives of the other factor can be written down reliably. For exponential-sine and exponential-cosine factors, the formulas above supply that antiderivative column. If \(a=b=0\), the displayed formulas do not apply because their denominators vanish; that degenerate case should be handled directly rather than by this table.
For a definite integral, first form the antiderivative from the table, then evaluate it at the upper and lower endpoints and subtract. The table itself does not remove the need to check endpoint values or signs. For an indefinite integral, differentiate the finished expression: the cancellations among neighboring diagonal terms leave exactly the original product.
Check Your Understanding
Use the derivative column, the successive-antiderivative column, and the alternating diagonal products to answer these questions.
- For a polynomial of degree four, how many nonzero polynomial entries appear in the derivative column?
- What is the first successive antiderivative of \(e^{ax}\cos(bx)\), assuming \(a\) and \(b\) are not both zero?
- Why does the final remainder integral vanish when the table is applied to a polynomial of degree \(n\)?
- For \(\int x^2g(x)\,dx\), where \(F_1'=g\), \(F_2'=F_1\), and \(F_3'=F_2\), what are the three signed diagonal products?
- What differentiation check can detect a sign error in a tabular result?