The goal of this notebok is to check the veracity of the following important information you may have seen on social networks

We will reproduce the previous equation, step by step as: $$ \frac{\pi e^{\frac{A}{B}} - e^{i E}}{C D} $$


In [1]:
from sympy import *
init_printing(use_latex=True) 
t = Symbol('t')
k = Symbol('k')
n = Symbol('n')

In [2]:
A=Limit(2**(2*n) * factorial(n)**2 * log(7) / factorial(2*n) / sqrt(n), n, +oo)
A


Out[2]:
$$\lim_{n \to \infty}\left(\frac{2^{2 n} n!^{2}}{\sqrt{n} \left(2 n\right)!} \log{\left (7 \right )}\right)$$

In [3]:
A.doit()


Out[3]:
$$\sqrt{\pi} \log{\left (7 \right )}$$

In [4]:
B=Integral(exp(-t**2), (t,0,+oo))
B


Out[4]:
$$\int_{0}^{\infty} e^{- t^{2}}\, dt$$

In [5]:
B.doit()


Out[5]:
$$\frac{\sqrt{\pi}}{2}$$

In [6]:
C = Integral(3 / (t**6 + 1), (t,0,+oo))
C


Out[6]:
$$\int_{0}^{\infty} \frac{3}{t^{6} + 1}\, dt$$

In [7]:
C.doit()


Out[7]:
$$\pi$$

In [8]:
D = Integral(exp(-pi*t**2), (t,-oo,+oo))
D


Out[8]:
$$\int_{-\infty}^{\infty} e^{- \pi t^{2}}\, dt$$

In [9]:
D.doit()


Out[9]:
$$1$$

In [10]:
E=Sum( 8*pi/(4*k+1)/(4*k+3), (k,0,+oo))
E


Out[10]:
$$\sum_{k=0}^{\infty} \frac{8 \pi}{\left(4 k + 1\right) \left(4 k + 3\right)}$$

In [11]:
E.doit().simplify()


Out[11]:
$$\pi^{2}$$

Conclusion


In [12]:
total=( pi*exp(A.doit()/B.doit()) - exp(I*(E).doit().simplify()) )/ C.doit() / D.doit()
total.simplify()


Out[12]:
$$49 - \frac{e^{i \pi^{2}}}{\pi}$$

Which leads me to the conclusion the expression is false ! In fact, it seems that the sum expression shoud not have a $\pi$ in it, and that the both exponentials should be factorized by $\pi$.

The original web page with the mistake is http://www.brouty.fr/Maths/anniv.html.


In [13]:
total2=( pi*(exp(A.doit()/B.doit()) - exp(I*(E/pi).doit().simplify()) )) / C.doit() / D.doit()
total2


Out[13]:
$$50$$