# Atan2 formula

1. Jun 5, 2010

### mnb96

Hello, it is mentioned http://en.wikipedia.org/wiki/Atan2#Definition" that using the tangent half-angle formulas it is possible to express the function atan2 as:

$$\mathrm{atan2}(y,x)=2\mathrm{arctan}\frac{y}{\sqrt{x^2+y^2}+x}$$

How can I derive this result?

Last edited by a moderator: Apr 25, 2017
2. Jun 5, 2010

### tiny-tim

Put y = rsinθ, x = rcosθ, then y/(√(x2 + y2) + x) = sinθ/(1 + cosθ),

which you should be able to prove is tan(θ/2)

3. Jun 6, 2010

### mnb96

Thanks!
Now it´s clear where that formula came from.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook