Evaluate the indefinite integral $$\int\frac{(1+e^x)^2}{e^x}\ \mathrm{d}x$$
My attempt: Expand numerator:
$$\int\frac{1+2e^x+e^{2x}}{e^x} \, \mathrm{d}x$$
divide $e^x$ by the numerator:
$$\int (e^{-x}+2+e^{x}) \, \mathrm{d}x$$
the integration part is where I am little confused: Does $\int e^x \, \mathrm{d}x = e^x+C$
and the $e^{-x}$ when I integrate it does it equal zero?
You are correct up till $$\int e^{-x} +2 + e^x \, \mathrm{d}x$$
This evaluates to $$e^x + 2x - e^{-x} + c.$$
This is due to the "rule" that $$\int e^{\alpha x} \, \mathrm{d}x = \frac{e^{\alpha x}}{\alpha} + c.$$ In the case that $\alpha = 1$ we get $\int e^x \, \mathrm{d}x = e^x + c$. For $\alpha = -1$ we get $\int e^{-x} \, \mathrm{d}x = \frac{e^{-x}}{-1} = -e^{-x} + c$
You can try and deduce the above rule by using the substitution $u = \alpha x$ in the integral.