Given #2y=-x^2 + 4xy#
and
#x=rcos(theta)# and #y=rsin(theta)# we can substitute:
#2rsin(theta) = -(rcos(theta))^2+4(rcos(theta))(rsin(theta))#
#2rsin(theta) = -r^2cos^2(theta)+4r^2cos(theta)sin(theta)#
Since #r ne 0# for all #theta# we can divide through by #r#:
#2sin(theta) = -rcos^2(theta)+4rcos(theta)sin(theta)#
Now we can factor #r# from the right side:
#2sin(theta) = r(-cos^2(theta)+4cos(theta)sin(theta))#
Now we can solve for #r#:
#r = (2sin(theta))/ (-cos^2(theta)+4cos(theta)sin(theta))#
and for no very good reason, I'd rather rewrite the denominator:
#r = (2sin(theta))/ (4cos(theta)sin(theta)-cos^2(theta))#