Thursday, February 2, 2012

Integral of x*exp(x)*cos(x) with respect to x

This post is a follow-up to Useful Mnemonic: DETAIL where the problem was posed.

Determine $f(x)=\int x e^x \cos (x)dx$.

CHOICE A (Suggested by DETAIL):
Let $u=x\cos(x)$ and $dv= e^x dx$.
Then $du=\cos(x)-x\sin(x)dx$ and $v=e^x$.
Then $f(x)=x\cos(x)e^x - \int e^x \left[ \cos(x)-x\sin(x) \right] dx$

CHOICE B:
Let $u=x e^x$ and $dv=\cos(x)dx$.
Then $du = e^x+x e^x dx$ and $v=\sin(x)$.
Then $f(x)=x e^x \sin(x) - \int \sin(x) \left[ e^x +x e^x\right] dx$

CHOICE C:
Let $u=e^x$ and $dv=x \cos(x)dx$.
Then $du = e^x dx$ and $v=\int x\cos(x)dx$
Let $\hat{u}=x$ and $d\hat{v}=\cos(x)dx$.
Then $\hat{v}=\sin(x)$
Then $\int x\cos(x)dx = x \sin(x)- \int\sin(x)dx = x\sin (x)+\cos(x) +\hat{C}$
We only concern ourself with a particular $v$, so we assume $\hat{C}=0$.
Then $f(x) = e^x \left[ x\sin(x) + \cos (x) \right] -\int \left[x\sin(x)+\cos(x) \right] e^x dx$

What remarks can we make? For this specific problem, regardless of the above three choices for $u$ and $dv$, we will have to do integration by parts again. DETAIL recommended choice A, but choice B was just as short. Though as a personal opinion, I find it easier to make sign errors when determining antiderivatives to trigonometric functions than when determining antiderivatives to exponential functions.

Recall that $\frac{d}{dt} \sin (t) = \cos (t)$, while $\frac {d}{dt} \cos (t)=-\sin(t)$.

No comments:

Post a Comment