CoCalc Shared FilesPublic / pi-day.sagewsOpen in CoCalc with one click!
Author: Hal Snyder
Views : 9
Description: Happy pi day 2018

Happy π\pi day to all.

Today we also celebrate the life of Stephen Hawking, who passed on 2018-03-14.

%sage R = RealField(1000) R R(pi)
Real Field with 1000 bits of precision 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127
# the Basel problem f1 = sum(1/x^2,x,1,oo,hold=True) f2 = sum(1/x^2,x,1,oo) show(f1==f2)
x=1+1x2=16π2\displaystyle {\sum_{x=1}^{+\infty} \frac{1}{x^{2}}} = \frac{1}{6} \, \pi^{2}
# Gaussian integral g1 = integral(e^(-x^2),x,-oo,oo,hold=True) g2 = integral(e^(-x^2),x,-oo,oo) show(g1==g2)
+e(x2)dx=π\displaystyle \int_{-\infty}^{+\infty} e^{\left(-x^{2}\right)}\,{d x} = \sqrt{\pi}
# Euler's identity h1 = (exp(i*pi,hold=True) + 1) h2 = (exp(i*pi) + 1) show(h1==h2)
e(iπ)+1=0\displaystyle e^{\left(i \, \pi\right)} + 1 = 0