# A Wolfram Notebook Playing with Machin-Like Formulas

This notebook explores a class of interesting identities for the famous mathematical constant π (i.e. ...) involving the arctangent/cotangent functions. Such identities are attractive in their own right, have an interesting history and also continue to hold new surprises. Here, we use the Wolfram Language to explore some well-known classical properties of such identities, as well as to compute and explore a whole family of very recently discovered beautiful identities of this type.

π3.14159

## Machin and Machin-Like Formulas

Machin and Machin-Like Formulas

Machin’s formula is a particular identity for π as a sum of integer multiples of arccotangents having integer arguments:

π

4

-1

-1

This formula was discovered by John Machin in 1706 and used by him to compute π to 100 decimal places. Clearly, Machin’s formula can also be expressed instead using arctangents as:

π

4

-1

1

5

-1

1

239

Both of these identities are readily verified by the Wolfram Language, as can be seen by :

clickinginthecode,thenholdingandpressingtorunit

In[1]:=

4ArcCot[5]-ArcCot[239],4ArcTan-ArcTan

π

4

π

4

1

5

1

239

Out[1]=

{True,True}

## Generalized Machin-Like Formulas

Generalized Machin-Like Formulas

Given the existence of Machin’s formula, it is natural to ask if other such formulas exist. In fact, there turn out to be exactly four two-term identities of this shape in which the multipliers of the arctangents are nonzero integers and the arguments of the arctangents are inverse positive integers. The most famous of these is the following identity:

In[2]:=

π

4

1

2

1

3

Out[2]=

True

... which was discovered by Euler.

Further generalizing to arbitrary numbers of terms and allowing the arguments and coefficients to be rational—as opposed to just integers—gives so-called Machin-like formulas, and allowing argument numerators and/or denominators to be mixed quadratic surds gives a further extension that could be termed “generalized Machin-like formulas.” Many (generalized) Machin-like formulas exist; here is a selection from Wolfram|Alpha:

In[3]:=

WolframAlpha["Machin-like formulas",IncludePods

"NamedMathematicalFormulas",

AppearanceElements{"Pods"},

InputAssumptions{

"*C.Machin%21-like+formulas-_*MathematicalFunctionIdentityPropertyClas

s-"}]