Integrate the following equation. (exponential function) Integrate $$\frac{e^x -2}{e^{x/2}}$$
This is my calculation: 

but it is wrong....
 A: The second part is false. One has
$$\int \frac{2}{e^{\frac{1}{2}x}} = 2\int e^{-\frac{1}{2}x} = -4e^{-\frac{1}{2}x} + C.$$
A: Notice, divide the numerator by $e^{x/2}$ & integrate as follows $$\int \frac{e^x-2}{e^{x/2}}\ dx=\int \left(e^{x/2}-2e^{-x/2}\right)\ dx$$
$$=\int e^{x/2}\ dx-2\int e^{-x/2}\ dx$$
$$=2e^{x/2}\ dx-2(-2)e^{-x/2}+C$$
$$=\color{red}{2e^{x/2}+4e^{-x/2}+C}$$
A: It looks like you attempted to use substitution to replace
$$ \int \frac{\frac12 dx}{e^{x/2}}$$
with
$$ \int \frac{du}{u} = \ln(u) + C. $$
The fatal flaw here is that if $u = e^{x/2}$,
then $du = \frac12 e^{x/2} dx \neq \frac12 dx$.
The correct substitution is
$$ \tfrac 12 dx = \frac{1}{e^{x/2}} du = \frac{du}{u}.$$
$$ \int \frac{\frac12 dx}{e^{x/2}}
= \int \frac{du}{u^2} = -\frac{1}{u} + C = -\frac{1}{e^{x/2}} + C
= - e^{-x/2} + C.$$
Of course you can get this much quicker by just writing
$$ \int \frac{\frac12 dx}{e^{x/2}}
= \int \tfrac12 e^{-x/2} dx$$
as in the other answers.
It looks like you are not writing out your substitutions explicitly,
nor are you using the $dx$ notation to keep track of the variable of
integration. The first is a shortcut and the second is questionable
notation. Since you make errors doing things this way, perhaps
it would be better to use more explicit notation instead.
