Find $\int e^{-x}\cos x\,dx$ without using complex numbers $\int e^{-x} \cos{x} dx $ - i know how to solve with Euler complex representation, but can't figure out how to solve with integration by parts or something.
 A: Hint: integrate by parts twice, differentiating the trig term each time and look hard at the integral you're left with.
A: Use 
$$\int dx \: e^{-x} \cos{x} = -\int d(e^{-x}) \cos{x} = -[e^{-x} \cos{x}] - \int dx \: e^{-x} \sin{x}$$
Apply this once more to the integral on the right and solve for the original integral.
$$\int e^{-x} \sin{x} = -\int d(e^{-x}) \sin{x} = -[e^{-x} \sin{x}] + \int dx \: e^{-x} \cos{x}$$
Therefore
$$\int dx \: e^{-x} \cos{x} = e^{-x} [\sin{x} - \cos{x}] - \int dx \: e^{-x} \cos{x}$$
or
$$2 \int dx \: e^{-x} \cos{x} = e^{-x} [\sin{x} - \cos{x}]$$
A: Solution:


*

*Take the integral as $$\int\frac{\cos x}{e^x}dx$$

*Use the formula $$\int e^{\alpha x}\cos(\beta x)dx=\frac{e^{\alpha x}(\alpha \cos(\beta x)+\beta \sin(\beta x)}{\alpha^2+\beta ^2}$$

*Here, $\alpha=-1$ and $\beta=1$. Therefore, your intergral now becomes $$\frac{e^{-1x}(-1\cos(1x)+(1)\sin(1x))}{-1^2 + 1^2}$$

*Your answer:
$$\int e^{-x} \cos{x} dx=\frac{\sin x-\cos x}{2e^x}$$


EDIT: To prove step 2, refer this answer.
It says:
In general, if you want to find
$$\int e^{ax}\cdot \sin{bx}\cdot dx$$
you can argue as follows:
Note that for any $\alpha$ or $\beta$, you have
$$\eqalign{
  & \frac{d}{{dx}}\left( {{e^{\alpha x}}\sin \beta x} \right) = \alpha {e^{\alpha x}}\sin \beta x + \beta {e^{\alpha x}}\cos \beta x  \cr
  & \frac{d}{{dx}}\left( {{e^{\alpha x}}\cos \beta x} \right) = \alpha {e^{\alpha x}}\cos \beta x - \beta {e^{\alpha x}}\sin \beta x \cr}$$
so that any integral of the form
$$\int e^{\alpha x}\cdot \sin{\beta x}\cdot dx$$
is a linear combination of the former functions. Let's then find c1 and c2 such that
$$\frac{d}{{dx}}\left( {{c_1}{e^{\alpha x}}\sin \beta x + {c_2}{e^{\alpha x}}\cos \beta x} \right) = {e^{\alpha x}}\sin \beta x$$
This means we need
$$\eqalign{
  & {c_1}\alpha  - {c_2}\beta  = 1  \cr
  & {c_1}\beta  + {c_2}\alpha  = 0 \cr}$$
This will yield with little work
$$\eqalign{
  & {c_1} = \frac{\alpha }{{{\alpha ^2} + {\beta ^2}}}  \cr
  & {c_2} =  - \frac{\beta }{{{\alpha ^2} + {\beta ^2}}} \cr}$$
which means that, in general:
$$\int {{e^{\alpha x}}} \cdot\sin \beta x\cdot dx = {e^{\alpha x}}\frac{{\alpha \sin \beta x - \beta \cos \beta x}}{{{\alpha ^2} + {\beta ^2}}} + C$$
Analogously, you will get that
$$\int {{e^{\alpha x}}} \cdot\cos \beta x\cdot dx = {e^{\alpha x}}\frac{{\alpha \cos \beta x + \beta \sin \beta x}}{{{\alpha ^2} + {\beta ^2}}} + C$$
A: So, you are in a differential equations course?  Then: How about solving the differential equation $y' = e^{-x}\cos x$ using the method of undetermined coefficients, explained in that course?
A: This is not a differential equation, but an integral. You don't solve integrals, you compute them.
You can call the integral "I" integrate by parts once or twice and get an expression of the kind $I=f(x)+g(x)I$. Then $2I=\frac fg(x)$
