Answer
$$
f(4)=\frac{\pi}{2}
$$
Work Step by Step
$$
x \sin \pi x=\int_{0}^{x^{2}} f(t) d t
$$
Differentiating both sides of this equation
$$
\begin{aligned}
\frac{d}{dx} \left[ x \sin \pi x \right] &= \frac{d}{dx} \left[\int_{0}^{x^{2}} f(t) d t \right]\\
\sin \pi x+\pi x \cos \pi x &= \frac{d}{dx} \left[\int_{0}^{x^{2}} f(t) d t \right]\\
\end{aligned}
$$
using $\mathrm{FTC} 1$ and the Chain Rule for the right side) gives
$$
\begin{aligned}
\sin \pi x+\pi x \cos \pi x &= 2 x f\left(x^{2}\right)
\end{aligned}
$$
Letting $x=2$ so that $f\left(x^{2}\right)=f(4),$ we obtain
$$\sin 2 \pi+2 \pi \cos 2 \pi=4 f(4),$$
so
$$f(4)=\frac{1}{4}(0+2 \pi \cdot 1)=\frac{\pi}{2}$$