im having problems figuring out how my teacher came up with this solution.

the problem is to convert the following polar to cartesian

r=2-cos(2theta)

we are in agreement for the following steps

r=2-[(cos^2 (theta))-(sin^2(theta))] using the double angle identity

then he has

√(x^2 + y^2) = 2 - [(x/r)^2] + [(y/r)^2]

where did the (x/r) and (y/r) come from and why are they squared??

he goes on to further solve the problem as follows:

√(x^2 + y^2) * (x^2 + y^2) = 2(x^2 + y^2) - (x^2) + (y^2)

final step

√(x^2 + y^2) * (x^2 + y^2) = (x^2) + 3(y^2)

this guy is know to make some mistake ... OFTEN. but i dont want to write this problem off. can someone explain to me what is happening here and a better way to arrive at his answer .. or in the least tell me if the solution is correct.

thanks. its exam review