The solution book gives this as an answer:
$\int \frac{1-e^x}{e^x}dx = \int \frac{1}{e^x}-\frac{e^x}{e^x}dx = -e^{-x} + C$
I would think it would be solved this way:
$\int \frac{1-e^x}{e^x} dx = \int \frac{1}{e^x} -1 \; dx = -e^{-x}-x + C$
The solution book gives this as an answer:
$\int \frac{1-e^x}{e^x}dx = \int \frac{1}{e^x}-\frac{e^x}{e^x}dx = -e^{-x} + C$
I would think it would be solved this way:
$\int \frac{1-e^x}{e^x} dx = \int \frac{1}{e^x} -1 \; dx = -e^{-x}-x + C$
Yes, your approach is correct.
But, remember, you can always check your answer when finding an antiderivative:
We have: $ {d\over dx} (-e^{-x}+C)=e^{-x}\ne e^{-x}-1={1-e^x\over e^x}; $ so the book is wrong.
However:
$ {d\over dx} (-e^{-x}-x+C)=e^{-x}-1 = {1-e^x\over e^x}; $ so, you are right.
The best way to see if you been right in solving your integral is to derive both sides.
As we can see, the books answer:
$\frac{{d}(-e^{-x}+C)}{dx}\neq \frac{ d\{{\int \frac{1}{e^x}-\frac{e^x}{e^x}dx}\}}{dx} $