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.