A question on definite integral to find a value

Would you please tell me whether there is any wrong on this problem? given that $g$ is continuous on $[0,\infty)\rightarrow \mathbb{R}$ satisfying $\int_{0}^{x^2(1+x)}g(t)dt=x \forall x\in [0,\infty)$ then I need to find what is $g(2)$?

-
You can answer the question. Hint: think Fundamental Theorem of Calculus. – John Engbers Jun 3 '12 at 18:50
ok got it thank you $g(x^2(1+x))-g(0)=1$ so put $x=1$ we get $g(2)=1+g(0)$ but what is $g(0)$? – Un Chien Andalou Jun 3 '12 at 18:54
Not quite --- see the comments below for an answer. – John Engbers Jun 3 '12 at 19:16

Let $G(x) = \int _{0} ^{x} g(t) dt$. Since $g(t)$ is continuous, we can deduce that $G(x)$ exists and will be differentiable for $x \ge 0$.

Then, by your condition, $G(x^2(1+x))=x$.

Differentiating both sides with respect to $x$, we get $(2x(1+x)+x^2) \times g(x^2(1+x))=1$.

Simplifying, we get $g(x^2(1+x))= \frac{1} {3x^2+2x}$

Now, we set $(x^2(1+x))=2$. This is true when $x=1$ and has two imaginary roots at $x=i-1$ and $x=-i-1$.

We are looking for real solutions, so $x=1$ and $g(2)=\frac {1} {5}$

-

Note that $$\frac{d}{dx}\int_0^{x^2(1+x)}g(t)\,dt=g(x^2(1+x))(2x+3x^2)=\frac{d}{dx}x=1.$$ So now solve for $g(2)$.

-