#rtheta+r=2costheta-cotthetaxxsectheta#
#x=rcostheta#
#y=rsintheta#
#r=sqrt(x^2+y^2)#
#theta=tan^-1(y/x)#
#tantheta=y/x#
#costheta=x/r=x/sqrt(x^2+y^2)#
#cottheta=1/tantheta=1/(y/x)=x/y#
#sectheta=1/costheta=1/(x/sqrt(x^2+y^2))=(sqrt(x^2+y^2))/x#
Thus,
#rtheta+r=2costheta-cotthetaxxsectheta " becomes"#
#(sqrt(x^2+y^2))(tan^-1(y/x))+(sqrt(x^2+y^2))=2xxx/sqrt(x^2+y^2)-x/yxx(sqrt(x^2+y^2))/x#
#
Simplifying
#(sqrt(x^2+y^2))(1+tan^-1(y/x))-(sqrt(x^2+y^2))/y#