<s>[INST] given $f(x)$ is continuous and $\int_0^{x^2}f(t)dt = x+sin\frac{\pi}{2}x$,solve $f(1)=?$ given $f(x)$ is continuous and $\int_0^{x^2}f(t)dt = x+\sin\frac{\pi}{2}x$,solve $f(1)=?$
we know
$$[\int_0^{x^2}f(t)dt]^\prime= f(x^2) \cdot2x$$
and
$$[x+\sin\frac{\pi}{2}x]^\prime = 1+ \frac{\pi}{2}\cos\frac{\pi}{2}x$$
therefore
$$f(x^2) \cdot2x = 1+ \frac{\pi}{2}\cos\frac{\pi}{2}x$$
substitute $x$ by $x=1$, we have:
$$f(1) = \frac{1}{2}$$
however by substitute $x$ by $x = -1$ we have:
$$f(1) = -\frac{1}{2}$$
more strangely , if I substitute $x$ by $x = 0 $ we have:
$$ f(x^2)\cdot 2x = 0$$ while
$$ 1 + \frac{\pi}{2} \cos\frac{\pi}{2}x \neq 0$$
what's wrong with it?
Thank you!
 [/INST] The issue is that the identity can only be valid for $x\geq 0$ or $x\leq 0$ but not both. The reason is simple: The LHS of the desired relation is even in $x$, but the RHS is odd! So the formula can't hold for all $x$, and we should limit ourselves to one particular sign.

Regarding the behavior at zero, the conclusion that $f(x^2)\cdot 2x\to 0$ as $x\to 0$ assumes that $f(0)$ exists. But if we rearrange the results shown in the OP to solve for $f(x^2)$, we have $$f(x^2)=\frac{1}{2x}\left(1+\frac{\pi}{2}\sin\frac{\pi}{2}x\right)$$ which diverges as $x\to 0$. More precisely, $f(x^2)\approx 1/(2x)$ for small $x$ and so $f(x^2)\cdot 2x\to 1$.
</s>