hi, i have a problem with differentiating please help

(I think) It is well known that for an integral-defined function, differentiating them with the upper limit(i.e. 'x') takes the integral away. (*) i.e.

$\displaystyle \frac{d}{dx}\int_{0}^{x}\ f(t) \ dt = f(x)$

The problem is, I came across a weird question today:

determine $\displaystyle \frac{d}{dx}\int_{0}^{x}\frac{e^{t}}{e^t+e^{2x}} \ dt$

Well, integrating $\displaystyle \frac{e^{t}}{e^t+e^{2x}}$ first and differentiating yields the (probably) correct answer

$\displaystyle \frac{1+2e^x-{e^{2x}}}{(e^x+1)(e^{2x}+1)}$

But when i apply the rule (*) 'differentiation of integral-defined function', it gives a completely different result

$\displaystyle \frac{e^x}{e^x+e^{2x}}$

Can anybody tell why?