I'm a student and I'm studying random variables and very new to it. I was studying the Uniform distribution and in it, it calculates the Expected of $X^2$ by $$ E\left(X^2\right) = \int_{- \infty}^\infty x^2 p(x) dx $$ I understand the calculation of it, but if the Probability density function plot of $X$ is like that (I fully understand that) I can't imagine the Probability density function of the $X^2$ because if we span the Probability density function of $X$ which is within $[a,b]$ to $[a^2,b^2]$ then the integral of $\int_{a^2}^{b^2} p(\sqrt x) dx$ may not be equal to 1 I guess.
Could you help me figure out what is the Probability density function of $X^2$?