# What is the Probability density function of $X^2$ where X is an Uniform distribution

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

• I actually computed the pdf of $X^2$ for a general random variable here: math.stackexchange.com/a/3043502/90543 – jgon Dec 23 '18 at 17:21
• @jgon thank you. it was hard for me to understand your answer because I'm very new to it, but finally, I get it. so I was right, it is not that simple that in the basic tutorials they just integral $\int_{- \infty}^\infty x^2 p(x) d_x$ to find the Expected. nice answer. – Peyman mohseni kiasari Dec 23 '18 at 17:36