2

I'm a programmer, I'm always looking for new formulas and new way of computing things, to satisfy my curiosity I would like to know if there are any formulas, or I should say equalities, that make use of both $\pi$ and $\sqrt{2}$ .

I would also like to know if it's possible to generalize this relatively to any n-sided polygon ( even a 3D figure ), $\sqrt{2}$ that usually appears in quadrilaterals only.

Of course I would like to know about any possible domain, but since we should start from something, I would say that the domain of polygons and polyhedron triggers my interest in the first place.

  • 2
    This seems relevant. – David Mitra May 20 '14 at 11:48
  • 2
    Apparently Plato thought that $\pi=\sqrt{2}+\sqrt{3}$, exactly. In fact $\sqrt{2}+\sqrt{3}$ approximates $\pi$ to within two-thousandths of a percent, which is not bad. – David H May 20 '14 at 11:53
  • @DavidMitra it's basically the top rated answer at the moment, if I'm not mistaking, nice to read a longer explanation. – user2485710 May 20 '14 at 11:59
  • @DavidH it this linked to some study in geometry ? – user2485710 May 20 '14 at 12:00
  • 1
    @user2485710 It's based on simple mensuration formulas for plane shapes. The area of a unit circle is $\pi$. An inscribed octagon inside the circle will have area $2\sqrt{2}$. A circumscribed hexagon around the circle will have area $2\sqrt{3}$. The average of the areas of the hexagon and octagon is then $\sqrt{2}+\sqrt{3}$. – David H May 20 '14 at 12:10
  • @DavidH so there is a generic formula to plot the perimeter, or the vertices or the area of an N-sided polygon using trigonometry ? – user2485710 May 20 '14 at 12:30
  • 1
    @user2485710 For regular polygons, yes. See the wiki. – David H May 20 '14 at 12:32
  • Also see https://math.stackexchange.com/questions/85217/why-is-this-series-of-square-root-of-twos-equal-pi?lq=1 – chx Apr 15 '15 at 19:33

9 Answers9

5

$$ \pi = 2\sqrt 2 \cdot \frac{2}{\sqrt{2+\sqrt2}} \cdot \frac{2}{\sqrt{2+\sqrt{2+\sqrt2}}} \cdots. $$

user133281
  • 16,341
3

Pretty trivial, but for the sake of completeness:

$$\sin\frac\pi4=\cos\frac\pi4=\frac1{\sqrt2}$$

Here I'd say the $\frac\pi4$ relates to a regular octagon, or the canonical eighth root of unity, so yes, it generalizes to other regular $n$-gons, resulting in other algebraic numbers for the sine and cosine of the corresponding angles resp. the real and imaginary part of the corresponding root of unity.

If you want to go 3D, you'd probably start using Euler angles and quaternions, but I'll not go into this.

MvG
  • 44,006
3

Stirling's approximation: $$ n! \sim \sqrt{2 \pi n}\left(\frac{n}{e}\right)^n $$

lhf
  • 221,500
2

I had fun doing that back in the days; lots of paper and the smallest mistake would end in chaos. I felt I had discovered something in the end :) (Note: bug in the code snippet: k=3 is skipped; the line "if k>3 then" should be "if k>2 then".)

I was $17$ years old when I took on that task, alone at home with a lot of scratch paper. I remember the wow effect when the pattern emerged. It was about expressing PI in function of the square root of $2$. Focus recommended! In the last $35$ years, I mentioned it $3$ or $4$ times and it never raised much interest, probably because expressing an irrational number in function of another no more rational one does not make sense :). In iteration $3$, the function starts to look like the precedent one; then it's obvious between $3$ and $5$ and it goes on, making it easy to program. It will get closer to PI before breaking due to the variable's limitations. Here a code snippet (too) quickly put together for demo purposes.

enter image description here enter image description here

Original post: https://www.facebook.com/yazel.boudour/posts/353578401680948


yaz
  • 21
1

You can use the Taylor series of $\sin(x)$ to calculate square roots using $\pi$.

For example, you can calculate the square root of 2 as follows:

$$\sin{(45^\circ)}=\sin{(\frac\pi4)}=\frac{\sqrt2}{2}$$

Therefore:

$$\sqrt2=2\cdot\sum_{x=1}^n \frac{(\frac{\pi}{4})^{4x-3}}{(4x-3)!}-\frac{(\frac{\pi}{4})^{4x-1}}{(4x-1)!}$$

I haven't tried personally, but I imagine you could relate a lot of square roots back to $\pi$ like this. Simply find the angle, in radians of a triangle with a side length of $\sqrt x$ and then expand by expressing the angle in terms of $\pi$ using the Taylor series.

1

$$t_n=\bigg(-\dfrac14\bigg)^n\cdot\dfrac{\displaystyle{2n\choose n}}{1-2n}\qquad=>\qquad\sum_{n=0}^\infty t_n=\sqrt2~,\qquad\qquad\sum_{n=0}^\infty t_n^2=\dfrac4\pi$$


This is based on the fact that $~\displaystyle\sum_{n=0}^N{N\choose n}=2^N,~$ and $\quad\displaystyle\sum_{n=0}^N{N\choose n}^2={2N\choose N}.~$ Now let $N=\dfrac12$

and use the fact that $\Big(\tfrac12\Big)!=\dfrac{\sqrt\pi}2$ . See binomial series, Vandermonde's identity, and $\Gamma$ function

for more details.

Lucian
  • 49,312
  • and this is optimal for what kind of applications ? – user2485710 May 20 '14 at 13:05
  • 1
    @user2485710: None that I'm aware of. Why? Are you only interested in formulas that have practical applications? If so, then please specify that explicitly in the body of the post, by mentioning exactly what kind of applications you have in mind. – Lucian May 20 '14 at 13:56
  • since I was mentioning geometry, polyhedron and polygons I was assuming that this had something to do with it. Anyway since there is a $\sum_{n=0}^\infty$ equal to $\sqrt{2}$ maybe this can be used to approximate some computations . – user2485710 May 20 '14 at 14:10
  • Since the two constants you mention are connected to two basic geometric shapes (the unit square and the unit circle), then all formulas about them are connected to the latter as well. But not all connections are necessarily practical. Euler's and de Moivre's formulas are quite helpful in plotting regular polygons or stars, for instance, since they give the coordinates of their vertices. As far as computations are concerned, all processors know how to extract a square root, and all programming languages know the value of $\pi$, so I doubt there's any practical application there. – Lucian May 20 '14 at 14:52
0

For a programmer the Ramanujan formula(e) might be quite useful.

0

Here are some formulas relating $\pi$ and $\sqrt{2}$. Given the Riemann zeta function,

$$\zeta(s) = \sum_{k=1}^\infty \frac{1}{k^s}$$

Let $q=e^{\pi\sqrt{2}}$. Then,

$$\begin{aligned}\frac{3}{2}\,\zeta(3) &= \frac{\pi^3}{24}\sqrt{2}-2\sum_{k=1}^\infty \frac{1}{k^3(q^{k}-1)}-\sum_{k=1}^\infty\frac{1}{k^3(q^{2k}-1)}\\ \frac{3}{2}\,\zeta(5) &= \frac{\pi^5}{270}\sqrt{2}-4\sum_{k=1}^\infty \frac{1}{k^5(q^{k}-1)}+\sum_{k=1}^\infty \frac{1}{k^5(q^{2k}-1)}\\ \frac{9}{2}\,\zeta(7) &= \frac{41\pi^7}{37800}\sqrt{2}-8\sum_{k=1}^\infty\frac{1}{k^7(q^{k}-1)}-\sum_{k=1}^\infty\frac{1}{k^7(q^{2k}-1)} \end{aligned}$$

0

$$\exp(i (\sqrt{2})^2 \pi)=1$$

David H
  • 32,536