Tutorials › Calculus II › Antiderivatives of Exponential-Cosine Products

Repeated and Tabular Parts · Tutorial 64 of 998

Antiderivatives of Exponential-Cosine Products

Learn to derive, apply, and check a formula for integrating an exponential-cosine product.

Intermediate 10 min read

What You'll Learn

  • Derive the exponential-cosine antiderivative by cyclic integration by parts.
  • Identify how the exponential rate and cosine frequency determine the coefficients.
  • Apply the formula when both parameters are nonzero.
  • Handle the cases where the frequency or exponential rate is zero.
  • Check an antiderivative by differentiating it and diagnose a common sign error.

Why This Product Has a Compact Antiderivative

An exponential multiplied by a trigonometric function can look as if it requires integration by parts repeatedly. In this case, however, integration by parts returns to the same two types of integrals. The resulting pair of equations can be solved together, giving a compact formula.

The parameters have different roles. The number \(a\) is the exponential rate in \(e^{ax}\), while \(b\) is the angular frequency in \(\cos(bx)\). Both affect the coefficients in the antiderivative. Keeping track of them carefully is essential, especially for the signs and the denominator.

Definition: Let \(a,b\in\mathbb{R}\) be constants. An antiderivative of \(e^{ax}\cos(bx)\) on an interval is a function \(F\) whose derivative satisfies \(F'(x)=e^{ax}\cos(bx)\) throughout that interval. Any two antiderivatives on an interval differ by an additive constant.

The Formula

When \(a\) and \(b\) are not both zero, the antiderivative is

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

The denominator is the sum of the squares of the rate and frequency. It is positive whenever at least one of \(a\) and \(b\) is nonzero, so the formula is defined in precisely those cases. If both are zero, the integrand is \(1\), and its antiderivative is \(x+C\).

The formula can be remembered by noting that the coefficient of cosine in the numerator is \(a\), while the coefficient of sine is \(b\). The sine term has a plus sign. The derivation below explains why these coefficients and signs occur.

Derivation by Cyclic Integration by Parts

First suppose \(b\ne 0\). Write \(I\) for an antiderivative of \(e^{ax}\cos(bx)\), and \(J\) for an antiderivative of \(e^{ax}\sin(bx)\). Integration by parts gives an equation for each. In these indefinite-integral equations, additive constants are understood and can be combined into the final constant.

For \(I\), take \(u=e^{ax}\) and \(dv=\cos(bx)\,dx\). Then \(du=ae^{ax}\,dx\) and \(v=\sin(bx)/b\), so

$$ I = \frac{e^{ax}\sin(bx)}{b} - \frac{a}{b}J. $$

For \(J\), take \(u=e^{ax}\) and \(dv=\sin(bx)\,dx\). Now \(v=-\cos(bx)/b\), which gives

$$ J = -\frac{e^{ax}\cos(bx)}{b} + \frac{a}{b}I. $$

Substitute the second equation into the first. Each term matters: the minus sign in front of \(J\) changes the sign of both terms obtained from the expression for \(J\).

$$ \begin{aligned} I &= \frac{e^{ax}\sin(bx)}{b} -\frac{a}{b} \left( -\frac{e^{ax}\cos(bx)}{b} +\frac{a}{b}I \right)\\ &= \frac{e^{ax}\sin(bx)}{b} +\frac{a e^{ax}\cos(bx)}{b^2} -\frac{a^2}{b^2}I. \end{aligned} $$

Move the last term involving \(I\) to the left, then multiply by \(b^2\). Since \(b\ne0\), these steps are valid.

$$ \begin{aligned} \left(1+\frac{a^2}{b^2}\right)I &= \frac{e^{ax}\sin(bx)}{b} +\frac{a e^{ax}\cos(bx)}{b^2},\\ (a^2+b^2)I &= e^{ax}\bigl(b\sin(bx)+a\cos(bx)\bigr). \end{aligned} $$

When \(a\) and \(b\) are not both zero, division by \(a^2+b^2\) yields the stated expression for \(I\), with an arbitrary constant added. This derivation directly establishes the formula whenever \(b\ne0\). If \(b=0\) and \(a\ne0\), the cosine factor is constant and direct integration gives the same formula. The case \(a=b=0\) is handled separately because the displayed denominator would be zero.

Why the method works: Differentiating the exponential preserves its form, while integrating sine or cosine changes one trigonometric function into the other. Integration by parts therefore produces a pair of linked integrals. Substitution eliminates one of them, leaving an equation that can be solved for the desired antiderivative.

Worked Examples

Worked Example: Rate 2 and Frequency 3

Find an antiderivative of \(e^{2x}\cos(3x)\). Here \(a=2\), \(b=3\), and \(a^2+b^2=2^2+3^2=4+9=13\). Substitution into the formula gives

$$ F(x)=\frac{e^{2x}\bigl(2\cos(3x)+3\sin(3x)\bigr)}{13}. $$

Check by differentiating. The product rule gives one contribution from \(e^{2x}\) and one from the trigonometric expression:

$$ \begin{aligned} F'(x) &=\frac{e^{2x}}{13} \left[ 2\bigl(2\cos(3x)+3\sin(3x)\bigr) -6\sin(3x)+9\cos(3x) \right]\\ &=\frac{e^{2x}}{13} \left[ 4\cos(3x)+6\sin(3x)-6\sin(3x)+9\cos(3x) \right]\\ &=\frac{e^{2x}}{13}\bigl(13\cos(3x)\bigr)\\ &=e^{2x}\cos(3x). \end{aligned} $$

The derivative is the original integrand, so \(F(x)+C\) is the required family of antiderivatives.

Worked Example: A Negative Exponential Rate

Find an antiderivative of \(e^{-x}\cos(2x)\). The parameters are \(a=-1\) and \(b=2\), so \(a^2+b^2=1+4=5\). The formula gives

$$ F(x)=\frac{e^{-x}\bigl(-\cos(2x)+2\sin(2x)\bigr)}{5}. $$

To check the result, differentiate the exponential and the expression in parentheses. The derivative of \(-\cos(2x)\) is \(2\sin(2x)\), and that of \(2\sin(2x)\) is \(4\cos(2x)\). Therefore,

$$ \begin{aligned} F'(x) &=\frac{e^{-x}}{5} \left[ -\bigl(-\cos(2x)+2\sin(2x)\bigr) +2\sin(2x)+4\cos(2x) \right]\\ &=\frac{e^{-x}}{5} \left[ \cos(2x)-2\sin(2x)+2\sin(2x)+4\cos(2x) \right]\\ &=\frac{e^{-x}}{5}\bigl(5\cos(2x)\bigr)\\ &=e^{-x}\cos(2x). \end{aligned} $$

The negative rate changes the coefficient of cosine in the numerator to \(-1\), but the frequency coefficient remains \(2\). The derivative check confirms both signs.

Worked Example: Zero Frequency

Find an antiderivative of \(e^{3x}\cos(0x)\). Since \(\cos(0x)=1\), the integrand is \(e^{3x}\). In the general formula, \(a=3\), \(b=0\), and \(a^2+b^2=9\), giving

$$ F(x)=\frac{e^{3x}\bigl(3\cos(0x)+0\sin(0x)\bigr)}{9} =\frac{e^{3x}}{3}. $$

Differentiate to verify:

$$ F'(x)=\frac{1}{3}\cdot 3e^{3x}=e^{3x}=e^{3x}\cos(0x). $$

This case can also be integrated directly. It illustrates that a zero frequency is allowed in the formula as long as the exponential rate is nonzero.

Worked Example: Zero Exponential Rate

Find an antiderivative of \(e^{0x}\cos(4x)\). Here \(e^{0x}=1\), so the integrand is \(\cos(4x)\). The parameters are \(a=0\), \(b=4\), and \(a^2+b^2=16\). Thus,

$$ F(x)=\frac{1\bigl(0\cos(4x)+4\sin(4x)\bigr)}{16} =\frac{\sin(4x)}{4}. $$

Differentiating gives

$$ F'(x)=\frac{1}{4}\cdot 4\cos(4x)=\cos(4x)=e^{0x}\cos(4x). $$

The formula also covers a pure cosine because its denominator remains nonzero when \(b\ne0\), even though \(a=0\).

Checking the Formula Directly

There is a short way to verify the general result that also reveals why the numerator has its particular form. Assume \(a\) and \(b\) are not both zero, and set \(D=a^2+b^2\). Differentiate the proposed expression using the product rule and the chain rule.

$$ \begin{aligned} \frac{d}{dx} \left[ \frac{e^{ax}\bigl(a\cos(bx)+b\sin(bx)\bigr)}{D} \right] &= \frac{e^{ax}}{D} \left[ a\bigl(a\cos(bx)+b\sin(bx)\bigr) -ab\sin(bx)+b^2\cos(bx) \right]\\ &= \frac{e^{ax}}{D} \left[ (a^2+b^2)\cos(bx) +ab\sin(bx)-ab\sin(bx) \right]\\ &=e^{ax}\cos(bx). \end{aligned} $$

The sine terms cancel, while the cosine terms combine to give exactly \(a^2+b^2\). Dividing by that quantity therefore leaves the desired integrand. This verification also checks the formula for either zero-parameter case, provided the parameters are not both zero.

A Common Sign Error

A frequent mistake is to put a minus sign before the sine term. For \(a=2\) and \(b=3\), that incorrect choice would be

$$ G(x)=\frac{e^{2x}\bigl(2\cos(3x)-3\sin(3x)\bigr)}{13}. $$

This is not an antiderivative of \(e^{2x}\cos(3x)\). Differentiating it shows exactly where it fails:

$$ \begin{aligned} G'(x) &=\frac{e^{2x}}{13} \left[ 2\bigl(2\cos(3x)-3\sin(3x)\bigr) -6\sin(3x)-9\cos(3x) \right]\\ &=\frac{e^{2x}}{13}\bigl(-5\cos(3x)-12\sin(3x)\bigr). \end{aligned} $$

The result includes an unwanted sine term and has the wrong cosine coefficient. The correction is to use a plus sign between \(a\cos(bx)\) and \(b\sin(bx)\). With that sign, the sine terms from differentiating cancel, as the direct verification demonstrates.

Choosing and Using the Formula

Before substituting parameters, identify which number is the exponential rate and which is the frequency. In \(e^{ax}\cos(bx)\), \(a\) multiplies \(x\) in the exponent, and \(b\) multiplies \(x\) inside the cosine. Then calculate the denominator as \(a^2+b^2\); do not replace it with \(a+b\) or omit the square on either parameter.

The parameter cases can be summarized as follows:

Parameter conditionAntiderivative
\(a\ne0\), \(b\ne0\)\(\dfrac{e^{ax}(a\cos(bx)+b\sin(bx))}{a^2+b^2}+C\)
\(a\ne0\), \(b=0\)\(\dfrac{e^{ax}}{a}+C\)
\(a=0\), \(b\ne0\)\(\dfrac{\sin(bx)}{b}+C\)
\(a=0\), \(b=0\)\(x+C\)

The general expression reproduces the middle two cases when exactly one parameter is zero. The last case must be separated because then \(a^2+b^2=0\). As a practical habit, differentiate the proposed answer: the product rule and chain rule expose sign, coefficient, and frequency errors immediately.

Key takeaway: For real \(a\) and \(b\) not both zero, the coefficient pair is determined by the parameters themselves: cosine receives coefficient \(a\), sine receives coefficient \(b\), and the common denominator is \(a^2+b^2\). When both parameters vanish, integrate the constant integrand \(1\) directly.

Check Your Understanding

Answer these questions by applying the formula and checking the result where appropriate.

  1. Find an antiderivative of \(e^{x}\cos(2x)\), and verify it by differentiation.
  2. For \(e^{-2x}\cos(3x)\), what are \(a\), \(b\), and \(a^2+b^2\)?
  3. Explain why the formula applies when \(a=0\) but \(b\ne0\).
  4. What is an antiderivative of \(e^{0x}\cos(0x)\), and why can the general fraction not be used in this case?
  5. When differentiating the general formula, which terms cancel, and which terms combine to produce the denominator?

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