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.

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.
