AP Calculus AB and BC

Derivative of e^x cos x: Answer, Product Rule, Mistakes

The derivative of e^x times cos x with respect to x is e^x(cos x - sin x). The product rule gives e^x times cos x plus e^x times negative sin x, and factoring out the common e^x leaves e^x(cos x - sin x). The minus sign comes from differentiating cosine.

ddx[excosx]=ex(cosxsinx)\frac{d}{dx}\left[e^x\cos x\right] = e^x(\cos x-\sin x)

How to differentiate e^x cos x

This is a product of exe^{x} and cosx\cos x, so the product rule differentiates each factor once, holding the other fixed, and adds.

ddx[f(x)g(x)]=f(x)g(x)+f(x)g(x)\frac{d}{dx}\left[f(x)g(x)\right] = f'(x)g(x) + f(x)g'(x)

Take f(x)=exf(x) = e^{x} and g(x)=cosxg(x) = \cos x, so f(x)=exf'(x) = e^{x} and g(x)=sinxg'(x) = -\sin x.

ddx(excosx)=excosx+ex(sinx)\frac{d}{dx}\left(e^{x}\cos x\right) = e^{x}\cos x + e^{x}\cdot(-\sin x)

Both terms share a factor of exe^{x}, so factor it out.

excosxexsinx=ex(cosxsinx)e^{x}\cos x - e^{x}\sin x = e^{x}(\cos x - \sin x)

Where the minus sign comes from

The subtraction is from cosine

The product rule itself only adds. The minus sign appears because cosx\cos x differentiates to sinx-\sin x, which carries its own minus sign into the second term.

The reverse operation is a classic loop: excosxdx=ex(sinx+cosx)2+C\int e^{x}\cos x\,dx = \frac{e^{x}(\sin x + \cos x)}{2} + C, found by integration by parts twice and solving for the original integral.

Where the derivative of e^x cos x shows up on the AP exam

The product rule is Topic 2.8, on both AB and BC. Pairing exe^{x} with a trigonometric function is common, and the factored form ex(cosxsinx)e^{x}(\cos x - \sin x) is the answer keys usually expect.

Common mistakes with the derivative of e^x cos x

  • Answering exsinx-e^{x}\sin x, multiplying the derivatives instead of using the product rule.
  • Answering ex(cosx+sinx)e^{x}(\cos x + \sin x), forgetting that cosx\cos x differentiates to sinx-\sin x.
  • Answering ex(sinx+cosx)e^{x}(\sin x + \cos x), which is the derivative of exsinxe^{x}\sin x, not this one.

Check yourself, not just the answer

Type derivatives and get graded on mathematical equivalence, with rule-level hints when you miss, in the Derivative Practice Checker.

Frequently asked questions

What is the derivative of e^x cos x?

ddx(excosx)=ex(cosxsinx)\frac{d}{dx}(e^{x}\cos x) = e^{x}(\cos x - \sin x), from the product rule after factoring out exe^{x}.

Why is there a minus sign?

The second term is ex(sinx)e^{x}\cdot(-\sin x), because cosine differentiates to sinx-\sin x. Factoring gives ex(cosxsinx)e^{x}(\cos x - \sin x).

What is the integral of e^x cos x?

excosxdx=ex(sinx+cosx)2+C\int e^{x}\cos x\,dx = \frac{e^{x}(\sin x + \cos x)}{2} + C, by integration by parts applied twice.