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?

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.$$
