Compute $f(2)$ if $\int_0^{x^2(1+x)} f(t) dt = x$ for all $x \geq 0$ This is exercise 22(d) of section 5.5 (p.209) of Apostol's Calculus, vol.I.

Compute $f(2)$ is $f$ is continuous and satisfies the given formula for all $x \geq 0$. $$\int_0^{x^2(1+x)} f(t) dt = x$$

I tried to differentiate both sides so that I have $x^2(1+x) f(x^2(1+x)) = 1$. But the answer would be $f(2) = \frac{1}{12}$, which I know is wrong. Any help?
 A: You need to use the chain rule here, the derivative of the left hand side is not $g(x)f(g(x))$ but rather $g'(x)f(g(x))$, where $g(x) = x^2(1+x)$.
A: $$\int_{0}^{x^2(1+x)}f(t)dt=x$$
Differentiating on both sides yield
$$(3x^2+2x)f(x^3+x^2)=1$$

$$ \text{ put } x=1 \implies 5\cdot f(2)=1\implies f(2)=\frac{1}{5}$$

A: $$\int_0^{x^2(1+x)} f(t)\ dt = x$$
Differentiating both sides with respect to $x$ yields
$$\frac{d}{dx}\left(\int_0^{x^2(1+x)} f(t)\ dt \right)= \frac{dx}{dx}$$
$$\frac{d}{dx}\left( F\left(x^2(1+x)\right)-F(0)\right)= 1$$
$$\frac{d}{dx}F\left(x^2(1+x)\right)- \frac{d}{dx} F(0)= 1$$
$$ f\left(x^2(1+x)\right) \frac{d}{dx}\left(x^2(1+x)\right)- 0= 1$$
$$ f\left(x^2(1+x)\right) \left(2x+3x^2\right)= 1$$
Also note that 
$$ x^2(1+x)=2\Rightarrow x=1 $$
Therefore 
$$ f\left(2\right) \cdot 5= 1$$
$$ f\left(2\right) = \frac15$$
A: here is another way to do this. we will use the fact that $$(1+0.1)^2(1+1+0.1)=(1+2\times 0.1 + \cdots)(2 + 0.1) = 2+5\times0.1+\cdots $$  putting $x = 1, 1+0.1$ in $\int_0^{x^2(1+x)} f(t) dt = x, $ we get $$\int_0^2f(t)\, dt = 1, \int_0^{2+5\times0.1+\cdots}f(t)\,dt=1+0.1$$ subtracting one from the other, $$\int_2^{2+5\times0.1+\cdots}f(t)\,dt=0.1\to f(2)\times5\times0.1=0.1 \to f(2)=\frac15.$$
