AP Calculus BC

Integral of e^(3x) cos x: The Loop Trick

The integral of e to the 3x times cos x is e to the 3x times 3 cos x plus sin x, all over 10, plus C. Two passes of integration by parts return the original integral, so instead of recursing forever you solve for it algebraically.

e3xcosxdx=e3x(3cosx+sinx)10+C\int e^{3x}\cos x\,dx = \frac{e^{3x}\left(3\cos x + \sin x\right)}{10} + C

When parts loops, solve for the integral

Call the integral II. Two passes of parts return a multiple of II on the right, which turns the problem from calculus into algebra.

I=e3x(3cosx+sinx)10+CI = \frac{e^{3x}\left(3\cos x + \sin x\right)}{10} + C

The 1010 is 32+123^{2}+1^{2}, which is the general pattern: eaxcos(bx)dx\int e^{ax}\cos(bx)dx carries a denominator of a2+b2a^{2}+b^{2}.

The general formula

eaxcos(bx)dx=eax(acosbx+bsinbx)a2+b2+C\int e^{ax}\cos(bx)\,dx = \frac{e^{ax}\left(a\cos bx + b\sin bx\right)}{a^{2}+b^{2}} + C

Knowing the shape is useful, but the exam wants the loop argument, because that is the transferable idea.

Common mistakes

  • Giving up when the original integral reappears. Its reappearance is the method.
  • Switching which factor is uu between the two passes, which unwinds the first pass and returns 0=00 = 0.

Every answer on this page is machine checked

An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.

Frequently asked questions

What is the integral of e^(3x) cos x?

It is e3x(3cosx+sinx)10+C\frac{e^{3x}\left(3\cos x + \sin x\right)}{10} + C.

Why does the integral reappear?

Because exponentials and trig functions both reproduce themselves under differentiation, so two passes return the original shape. You then solve for it.

Where does the 10 come from?

It is a2+b2a^{2}+b^{2} with a=3a = 3 and b=1b = 1.