# Is there an inverse function for F[x] = {Cos[x], Sin[x]} in Mathematica?

Mathematica has functions ArcCos, ArcSin, and ArcTan, but none of these does what I need, which is, given two real numbers a and b, at least one of them being nonzero, to find the angle x such that

{Cos[x], Sin[x]} == {a,b}/Sqrt[a^2+b^2].

Is there a simple way to build such a function? Thanks for any help.

• There's a reason why I'm not called bobthemathematician, but how about rolling your own? Solve[{Cos[x] == a/Sqrt[a^2 + b^2], Sin[x] == b/Sqrt[a^2 + b^2]}, x] – bobthechemist Nov 12 '14 at 4:00
• ArcTan[a, b] does what you want. – Rahul Nov 12 '14 at 4:10
• ArcTan[a,b] is the best answer in terms of efficiency but was entered as a comment so it could not be accepted. The answer by HaoLiang and Kuba also works and provides good insight. – Soldalma Nov 12 '14 at 12:53

Arg[#1 + I*#2] &[a, b]

• How is this different from ArcTan[#1,#2]&[a,b]? – Ruslan Feb 14 '16 at 7:53