So this was my solution:
Say, $Z = X^{2}$, then $X=\pm \sqrt{Z}$
and,
$$P(Z=z)=P(X = \sqrt{z}) + P(X = -\sqrt{z}) = \frac{z}{18} + \frac{z}{18} = \frac{z}{9}$$
for
$$0<z<9$$
However:
$$\int_{0}^{9}P(z) dz = \int_{0}^{9}\frac{z}{9}dz = \frac{9}{2} \neq 1$$
Where did I go wrong?
Edit: I tried to do this problem intuitively. I looked through my textbook and found:
$$f_{Y}(y) = f_{X}(g^{-1}(y))\left | \frac{dx}{dy} \right |$$
So updated question: why do we need to multiply by the jacobian? Is it because if you were to do this problem using the cdf and took its derivative to get the pdf, you would end up with that term which happens to be the jacobian? Is there a way to intuitvely understand why that term is there?
$$P(Z=z)=P(X=\sqrt{z})+P(X=−\sqrt{z})=0$$
with a pdf, the probability of the random variable to be equal to a given value is $0$.
The correct answer is $g(z)=\dfrac{\sqrt{z}}{18}$ for $0\leq z<9$, proof :
With $Z=X^2$, and $g$ the pdf of $Z$:
$$P(0\leq Z < a) = P(-\sqrt{a}<X<\sqrt{a}) = \int_{-\sqrt{a}}^{\sqrt{a}} \frac{x^2}{18}dx$$
given that :
$$\int_{-\sqrt{a}}^{\sqrt{a}} \frac{x^2}{18}dx = \frac{a^{\frac{3}{2}}}{27}$$
and $$P(0\leq Z < a) = \int_0^a g(z)dz$$
We have $$\int_0^a g(z)dz = \frac{a^{\frac{3}{2}}}{27}$$
and from that we get $g(z) = \dfrac{\sqrt{z}}{18}$ with the derivative