I have obtained a pdf for
G= variable1 -variable2
The pdf for this comes out to be a triangle, which is given by
fG(g)=g+1 for 0
Now , I want to find out the pdf for G^2,So I have to find out
Y=G^2
which can be calculated using this formula
$g(y)=G'(y)=\frac{1}{2\sqrt{y}}(f(\sqrt{y})+f(-\sqrt{y}))$
https://math.stackexchange.com/a/263943/53984 But the main problem is when I put g+1 in the above formula for the specific range from 0 to 1 .The pdf is somehow not coming correct.Please help me out in this problem.