# Prove that $4\tan^{-1}\left(\frac{1}{5}\right) - \tan^{-1}\left(\frac{1}{239}\right)= \frac{\pi}{4}$

Prove that $$4\tan^{-1} \left(\dfrac{1}{5}\right) - \tan^{-1}\left(\dfrac{1}{239}\right)=\dfrac{\pi}{4}.$$

I was wondering if there was a shorter solution than the method below?

Below is my attempt using what I would call the standard approach to these kinds of problems.

The expression on the left hand side is equivalent to $$\tan^{-1}\left[\tan \left(4\tan^{-1}\left(\dfrac{1}{5}\right)\right)-\tan^{-1}\left(\dfrac{1}{239}\right)\right]\\ =\tan^{-1}\left(\dfrac{\tan(4\tan^{-1}(\frac{1}{5}))-\frac{1}{239}}{1+\frac{1}{239}\tan(4\tan^{-1}(\frac{1}{5}))}\right)\;(1).$$

We have that $$\tan(4\tan^{-1}(\frac{1}{5}))=\dfrac{2\tan(2\tan^{-1}(\frac{1}{5}))}{1-\tan^2(2\tan^{-1}(\frac{1}{5})}\;(2)$$

and that

$$\tan(2\tan^{-1}(\frac{1}{5}))=\dfrac{2\cdot \frac{1}{5}}{1-(\frac{1}{5})^2}=\dfrac{5}{12}\;(3).$$

Plugging in the result of $$(3)$$ into $$(2)$$ gives $$\tan\left(4\tan^{-1}\left(\frac{1}{5}\right)\right) = \dfrac{2\cdot \frac{5}{12}}{1-(\frac{5}{12})^2}=\dfrac{120}{119}\;(4).$$

Pluggin in the result of $$(4)$$ into $$(1)$$ gives that the original expression is equivalent to $$\tan^{-1}\left(\dfrac{\frac{120}{119}-\frac{1}{239}}{1+\frac{1}{239}\cdot\frac{120}{119}}\right)=\tan^{-1}\left(\dfrac{\frac{119\cdot 239 + 239-119}{239\cdot 119}}{\frac{119\cdot 239+120}{119\cdot 239}}\right)=\tan^{-1}(1)=\dfrac\pi4,$$

as desired.

• Basically you have proven that $$\tan\left(4\arctan (\dfrac{1}{5}) - \arctan(\dfrac{1}{239})\right)=1=\tan\left(\frac\pi4\right).$$ I don't think that using Taylor series is going to help you here – User Nov 16 '19 at 22:52
• Whoever told you to solve it using Taylor series should be your deadly enemy. – WhatsUp Nov 16 '19 at 22:57
• @WhatsUp thanks. – user718615 Nov 16 '19 at 22:58
• What weirds me out the most about this is that nobody else on the site, at least from what I could find, had ever asked how to prove Machin's Formula. – URL Nov 16 '19 at 23:22
• See this thread for professional mathematician's take at it. – Jyrki Lahtonen Nov 17 '19 at 6:18

We can also use

$$\arctan(u) \pm \arctan(v) = \arctan\left(\frac{u \pm v}{1 \mp uv}\right)$$

to obtain in four steps

$$\frac{\frac15 - \frac1{239}}{1 + \frac1{5\cdot 239}}=\frac{239-5}{5\cdot 239+1}=\frac{234}{5\cdot 239+1}=\frac9{46} \to$$

$$\to \frac{\frac15 + \frac9{46}}{1 - \frac15\frac9{46}}= \frac7{17} \\\to \frac{\frac15 + \frac7{17}}{1 - \frac15\frac7{17}}= \frac2{3} \\\to \frac{\frac15 + \frac2{3}}{1 - \frac15\frac2{3}}= 1$$

• Very nice. My best compliments. :-) I'm amazed how you remember all these equalities. – Sebastiano Nov 16 '19 at 23:22
• @Sebastiano Thanks! I've encounered it recently in another different context. It is a very useful identity indeed. – user Nov 16 '19 at 23:26

A slightly faster variant of the same computation using the identity $$\tan^{-1} u \pm \tan^{-1} v = \tan^{-1} \frac{u \pm v}{1 \mp u v}$$ can be performed by observing that in the special case $$u = v$$ $$2\tan^{-1} u = \tan^{-1} \frac{2u}{1-u^2}.$$ Consequently, we iterate $$g(u) = 2u/(1-u^2)$$ twice for $$u = 1/5$$ to obtain $$4 \tan^{-1} \frac{1}{5} = \tan^{-1} g(g(\tfrac{1}{5})) = \tan^{-1} \frac{120}{119}.$$ Now we apply the original formula to obtain $$4 \tan^{-1} \frac{1}{5} - \tan^{-1} \frac{1}{239} = \tan^{-1} \frac{\frac{120}{119} - \frac{1}{239}}{1 + \frac{120}{(119)(239)}} = \tan^{-1} 1 = \frac{\pi}{4}.$$ In all, we used three steps instead of four.

It is also worth noting that when $$u, v \in \mathbb Q$$, we can write $$\tan^{-1} \frac{p}{q} \pm \tan^{-1} \frac{r}{s} = \tan^{-1} \frac{ps \pm qr}{qs \mp pr}.$$ If we think of each rational as being represented by an ordered pair, which in turn is an element of the complex numbers, e.g. $$u = p/q$$ has the representation $$z = q + pi$$, and we define the function $$T(z,w) = \tan\left(\tan^{-1} \frac{\Im(z)}{\Re(z)} + \tan^{-1} \frac{\Im(w)}{\Re(w)}\right),$$ then $$T(z,w) = \frac{\Im(zw)}{\Re(zw)}.$$ In fact, the inverse tangent identity is simply a consequence of multiplication in the complex plane: $$\arg(zw) = \arg(z) + \arg(w).$$ I leave the details of this relationship as an exercise for the reader.

From the above, we may then regard Machin's formula as a statement about the existence of a nonzero real number $$\rho$$ such that $$(5+i)^4 = \rho(1+i)(239+i).$$ What is this number?

Shortest proof:

$$(5+i)^4(239-i)=114244+114244i.$$

Taking the arguments,

$$4\arctan \frac15-\arctan\frac1{239}=\frac\pi4.$$

Note that the computation avoids the fractions and immediately generalizes to other Machin-like formulas (https://en.wikipedia.org/wiki/Machin-like_formula#More_terms).

To perform the computation by hand, consider

$$(5+i)^2=24+10i\propto12+5i,$$

$$(12+5i)^2=119+120i,$$

$$(119+120 i)(239-i)=(119\cdot239+120)+(120\cdot239-119)i\propto 1+i.$$

(After simplification by $$119\cdot239$$, we have $$120=239-119$$.)

As advised by Maximilian Janisch, you should use the $$\tan x$$ formula rather $$\tan^{-1}x$$: $$\tan\left[4\tan^{-1} \left(\dfrac{1}{5}\right) - \tan^{-1}\left(\dfrac{1}{239}\right)\right]=\tan\left[\dfrac{\pi}{4}\right] \iff \\ \frac{\tan\left[4\tan^{-1} \left(\dfrac{1}{5}\right)\right]-\frac1{239}}{1+\tan\left[4\tan^{-1} \left(\dfrac{1}{5}\right)\right]\cdot \frac1{239}}=1 \iff \\ \tan\left[4\tan^{-1} \left(\dfrac{1}{5}\right)\right]=\frac{120}{119} \iff \\ \frac{2\tan\left[2\tan^{-1} \left(\dfrac{1}{5}\right)\right]}{1-\tan^2\left[2\tan^{-1} \left(\dfrac{1}{5}\right)\right]}=\frac{120}{119} \iff \\ \frac{2\cdot \frac{2\cdot \frac15}{1-\frac1{5^2}}}{1-\left[\frac{2\cdot \frac15}{1-\frac1{5^2}}\right]^2}=\frac{120}{119} \iff \\ \frac{\frac5{6}}{1-\frac{25}{144}}=\frac{120}{119} \ \checkmark$$