Solve $\int \frac{\sin(x)+\cos(x)}{e^x}~dx$

calculusintegrationtrigonometry

How should I calculate this integral$$\int\frac{\sin(x)+\cos(x)}{e^x}dx~~~~?$$
I don't know what is the first step, so I tried symbolab calculator but this cannot solve.
Can someone help me to solve this? Thank you in advance.

Best Answer

$$\dfrac{d(e^{-x}(a\cos x+b\sin x)}{dx}$$

$$=e^{-x}(-a\sin x+b\cos x-a\cos x-b\sin x)$$

Compare the coefficients of $e^{-x}\cos x,e^{-x}\sin x$ with $$e^{-x}(\cos x+\sin x)$$ to find

$b-a=1,-a-b=1,a=?,b=?$

Related Question