simplifying an expression which concludes $e^x$ I am solving an high school question right now(well, I'm an high-scholar) and I'm don't understand how they simplify the expression:
$$\frac{-e^{x}+\frac{e^{2x}}{\sqrt{1+e^{2x}}}}{-e^{x}+\sqrt{1+e^{2x}}}$$
To be the expression $$\frac{-e^{x}}{\sqrt{e^{2x}+1}}.$$
I tried to do $$\frac{\frac{e^{2x}+\left(\sqrt{1+e^{2x}}\right)(-e^{x})}{\sqrt{1+e^{2x}}}}{-e^{x}+\sqrt{1+e^{2x}}}=\frac{e^{2x}+\left(\sqrt{1+e^{2x}}\right)(-e^{x})}{\sqrt{1+e^{2x}}\left(-e^{x}+\sqrt{1+e^{2x}}\right)}=\frac{e^{2x}+\left(\sqrt{1+e^{2x}}\right)(-e^{x})}{\sqrt{1+e^{2x}}(-e^{x})+1+e^{2x}}$$ But I don't understand how to continue from here.
 A: $$\require{cancel}\begin{align}\frac{\frac{e^{2x}}{\sqrt{1 + e^{2x}}}- e^x}{\sqrt{1 + e^{2x}} - e^x} \frac{\sqrt{1 + e^{2x}} + e^x}{\sqrt{1 + e^{2x}} + e^x} &= \frac{\frac{\bcancel{e^{2x}}}{\color{#f05}{\cancel{\sqrt{1 + e^{2x}}}}}\color{#f05}{\cancel{\sqrt{1 + e^{2x}}}} + \frac{e^{3x}}{\sqrt{1 + e^{2x}}} - e^x\sqrt{1 + e^{2x}} - \bcancel{e^{2x}}}{1 + \color{#66f}{\cancel{e^{2x}}} - \color{#66f}{\cancel{e^{2x}}}}\\&=\frac{e^{3x} - e^x(1 + e^{2x})}{\sqrt{1 + e^{2x}}}\\&=\color{red}{\frac{- e^x}{\sqrt{1 + e^{2x}}}}\end{align}$$
A: Instead of going from the middle expression in your final line, i.e.,
$$\frac{e^{2x}+\left(\sqrt{1+e^{2x}}\right)(-e^{x})}{\sqrt{1+e^{2x}}\left(-e^{x}+\sqrt{1+e^{2x}}\right)}$$
to
$$\frac{e^{2x}+\left(\sqrt{1+e^{2x}}\right)(-e^{x})}{\sqrt{1+e^{2x}}(-e^{x})+1+e^{2x}}$$
try factoring an $e^x$ out of the numerator of the middle expression instead:
$$\frac{e^{2x}+\left(\sqrt{1+e^{2x}}\right)(-e^{x})}{\sqrt{1+e^{2x}}\left(-e^{x}+\sqrt{1+e^{2x}}\right)}={e^x(e^x+(\sqrt{1+x^{2x}})(-1))\over\sqrt{1+e^{2x}}\left(-e^{x}+\sqrt{1+e^{2x}}\right)}$$
Can you take it from here?
A: Look at the numerator of your big fraction, which is $$-e^x+\frac {e^{2x}}{\sqrt{1+e^{2x}}}$$
Put this over a common denominator $$\frac {-e^x\sqrt{1+e^{2x}}+e^{2x}}{\sqrt{1+e^{2x}}}$$
Extract a factor $-e^x$ from the numerator
$$-e^x\frac {\sqrt{1+e^{2x}}-e^{x}}{\sqrt{1+e^{2x}}}$$
Now divide this by the original denominator and cancel.
This involves fewer and simpler steps than the other methods proposed, but involves spotting that the large factor will cancel in a straightforward way.
