TITLE: Wrong solution for $\int \frac{1 - e^x}{e^x}\, dx$
QUESTION [8 upvotes]: 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$$

REPLY [5 votes]: 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.

REPLY [2 votes]: 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} $$