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