If $\int x e^x \cos x d x =f(x)+c$, then f (x) is equal to
Answer & explanation
Correct answer: option 1
I = real part of $\int x e^{(1+i) x} d x$ $=\frac{x e^{(1+i) x}}{1+i}-\int \frac{e^{(1+i) x}}{1+i} d x=\frac{x e^{(1+i) x}}{1+i}-\frac{e^{(1+i) x}}{(1+i)^2}$
$=e^{(1+i) x}\left[\frac{x(1+i)-1}{(1+i)^2}\right]$
$=e^{x}(\cos x+i \sin x)\left[\frac{(x-1)+i x}{1+i-1}\right]$
$=\frac{e^x}{-2}[i \cos x-\sin x][(x-1)+ix]$
$I=\frac{e^x}{2}[(x-1) \sin x+x \cos x]+c$
Hence (1) is the correct answer.