Let $f(x)$ be a continuous function. Which of the following must be an even function?
$(1) \int_{0}^{x} f(t^2)\mathop{dt}$
(2) $\int_{0}^{x} f(t)^2\mathop{dt}$
(3) $\int_0^x t(f(t) - f(-t))\mathop{dt}$
(4) $\int_0^x t(f(t) + f(-t)) \mathop{dt}$.
I know an even function satisfies $f(x) = f(-x)$, so I thought it should be the first one since $t^2 = (-t)^2$, but the integral is confusing me. I know for sure that $f(x^2)$ would be an even function without the integral, but the integral makes me think that this is a trick answer. I'm thinking it might also be 4, because I saw somewhere that the integral of an odd function is an even function, and $f(t) = t(f(t) + f(-t))$ satisfies $f(-t) = -t(f(-t) + f(t)) = -\left(t(f(t) + f(-t))\right) = -f(t)$ (it's odd).
Can someone please explain which of the two reasons are right?
Let $F(x)=\int_0^x t(f(t)+f(-t))\,dt$. Then,
$$\begin{align} F(-x)&=\int_0^{-x}t(f(t)+f(-t))\,dt\\\\ &\overbrace{=}^{t\mapsto -t}\int_0^x (-t)(f(-t)+f(t))\,(-1)\,dt\\\\ &=\int_0^x t(f(t)+f(-t))\,dt\\\\ &=F(x) \end{align}$$
Hence $F(x)=F(-x)$ and $F(x)$ is even.
Can you do the other three?