TITLE: Mismatching results using Fundamental Theorem of Calculus.
QUESTION [6 upvotes]: First time poster here, thanks in advance! 
To get right to my question, it concerns solving for x in the following equation:
$$\int_{0}^{x}(t^2+1) dt=x^2$$
Where the "standard" approach would be to apply the fundamental theorem of calculus like this:
$$\frac{\mathrm{d} }{\mathrm{d} x} \int_{0}^{x}(t^2+1) dt= \frac{\mathrm{d} }{\mathrm{d} x} 
 x^2$$
$$x^2+1=2x$$
Then solving for x would return x=1
However, why do you get a different result by first computing the definite integral with respect to t, then putting the bounds (x and 0) and getting this:
$$\frac{x^3}{3}+x=x^2$$
And clearly, here x must equal 0. Furthermore evaluating x=1 on the first equation does not hold true while evaluating x=0 does.
Perhaps it is wrong to evaluate integrals with variable bounds like that? Then how come double and triple integrals regularly use variable bounds that way?.
Is there something fundamentally wrong with taking the derivative of both sides?
Again, any help and explanation is very much appreciated!
EDIT: Thanks for the very clear answers everyone, makes complete sense now.

REPLY [8 votes]: There's no reason to think that solutions to $f'(x)=g'(x)$ will be solutions to $f(x)=g(x)$ (or vice versa). For instance, the equation $x^2+1=x$ has no solutions, but, after differentiating both sides, we get $2x=1$, which clearly has a solution.