Post Reply 
[VA] SRC #009 - Pi Day 2021 Special
03-20-2021, 09:36 PM (This post was last modified: 03-21-2021 01:33 AM by robve.)
Post: #32
RE: [VA] SRC #009 - Pi Day 2021 Special
(03-17-2021 02:32 AM)Albert Chan Wrote:  We could use this instead: atan(u) ± atan(v) = atan2(u±v , 1∓uv)       (*)

y = atan(x) - atan((x-1)/(x+1))                       // y undefined when x = -1
= atan2(x - (x-1)/(x+1), 1 + x*(x-1)/(x+1))
= atan2((x²+1)/(x+1), (x²+1)/(x+1))             // numerator always positive.

If x > -1, 4*y = 4*atan(1) = pi
If x < -1, 4*y = 4*(atan(1) - pi) = -3*pi

(*) Proof is trivial: (1+u*i) * (1±v*i) = (1∓u*v) + (u±v)*i

Phase angle of two sides matched, and we have above atan2 identity

A bit late to reply. Initially I also thought about matching angles between complex numbers in polar coordinates with atan2. Subtracting the angles gives the resulting angle of the complex quotient expressed in polar coordinates: \( \arctan \mathrm{e} - \arctan\frac{\mathrm{e} - 1}{\mathrm{e} + 1} = \mathrm{atan2}(\mathrm{e},1) - \mathrm{atan2}(\mathrm{e}-1,\mathrm{e}+1) \) then simplifying the quotient of the corresponding complex coordinates \( \frac{\sqrt{\mathrm{e}^2+1}}{\sqrt{(\mathrm{e}-1)^2+(\mathrm{e}+1)^2}} \cdot \frac{1+\mathrm{e}\mathrm{i}}{\mathrm{e}+1+(\mathrm{e}-1)\mathrm{i}} = \frac{1}{\sqrt{2}}\cdot \frac{1}{1-\mathrm{i}} \)
where the modulus of the denominator is \( \sqrt{2} \) and angle \( \mathrm{atan2}(-1,1) \) i.e. representing \( \frac{1\angle 0}{\sqrt{2}\angle\arctan{-}1} \). This gives
\( \arctan \mathrm{e} - \arctan\frac{\mathrm{e} - 1}{\mathrm{e} + 1} = 0 - \arctan {-}1 = \arctan 1 = \frac{\pi}{4} \).

Just another way to prove this equation, which is an identity that holds for other values than e by the way (with constraints).

(03-17-2021 02:32 AM)Albert Chan Wrote:  We could use this instead: atan(u) ± atan(v) = atan2(u±v , 1∓uv)      

Sure, but this is the same formula I had used in my previous post, albeit yours is in disguise using atan2 instead of atan, i.e. atan(u) ± atan(v) = atan((u±v)/(1∓uv)) = atan2(u±v , 1∓uv) the latter by definition and only if 1∓uv is nonzero, i.e. the necessary constraint I mentioned before.

- Rob

Minor edit: fix typo and \( \LaTeX \). Second edit: comment on atan2 versus arctan.

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [VA] SRC #009 - Pi Day 2021 Special - robve - 03-20-2021 09:36 PM



User(s) browsing this thread: 1 Guest(s)