# Concerning Pi, again

For Pi Day this year (2018), I will provide some results related to this interesting mathematical constant. These results are mostly inspired or taken from answers I gave at quora.com about  $\pi$ or about similar mathematical topics.

The millionth decimal digit of π is 1 (verified with Mathematica).

The 10 millionth decimal digit of π is found to be 7, and the 100 millionth decimal digit of π is 2.

The billionth decimal digit of $\pi$ (in base 10) is 9 (verified with Mathematica).

The 2 billionth decimal digit of π is found to be 0 (this result takes a longer time to compute with Mathematica).

Here are some (repeated) number sequences or numeric strings found among the first 2 billion decimal digits of π.

The numeric string 777777777 appears at the 24, 658, 601 st decimal digit of π :

9919408245759718530477777777724846769425931046864

The numeric string 111111111 appears at the 812, 432, 526 th decimal digit of π :

2891450444990691713511111111100399876875718824885

Here are also two numeric strings from 1 to 9 in increasing order and decreasing order:

The numeric string 123456789 appears at the 523, 551, 502 nd decimal digit of π:

7260489917323889207212345678922486448188070486710

The numeric string 987654321 appears at the 719, 473, 323 rd decimal digit of π :

5221398663241526793698765432160793011913242320510

The numeric strings above can be calculated or found with the help of the following link or web page:

Irrational Numbers Search Engine

The numerical value of $\pi^{\pi}$ to 1000 decimal digits is equal to:

36.46215960720791177099082602269212366636550840222881873870933592293407436888169990462007987570677485436814688343670070542736699139359264431565675267180230917777595737242260530320050233549595161382594571885422222305402433199779769167302876444780028452117394296018175249159350019492001619423210110480018557258718860782819839215304503453543238476218257664861595609057280314341958390400811991506636066295817900302292747422204210046403709493285441101884797707466358510710362803891181156618083260884536505255311095948029552909133361385823497120761861157606574436205295895657736468959837126404885207348833917602169536002174958035720670509318770633086434935593202425189496008880555048213388792769304015639745480898380866639428337794250284522113741878602793251848366623602214652151453276098545038540482041645516919082097210265379423765817354600472953993840487842116366153365057093066926223775915023204727672609958737278566633593210689698807508602353552267490321670730929373240451651980750157959708689483469068

Two expressions involving π and infinite sums:

Representation of π in continued fraction form:

The sum of π and e, the base of natural logarithms, is equal to:

$\pi + e=\displaystyle \sum _{k=0}^{\infty } \frac{(3 k)^2+1}{(3 k)!}+2 i \ln \left(\frac{1-i}{1+i}\right)i$

The letter i  represents the imaginary unit of complex numbers.

Another expression involving π, e, and an infinite product:

$\pi = \displaystyle 2 e \prod _{k=1}^{\infty } \left(\frac{2}{k}+1\right)^{(-1)^{k+1} k}$

And here is an identity relating the Golden Ratio, π, e, and the imaginary unit i:

$\displaystyle \varphi=e^{i\pi/5}+e^{-i\pi/5}=\frac{1+\sqrt{5}}{2}$

The value of π can be deduced from the identity above:

$\displaystyle\pi =5 i \ln \left(\frac{1}{2} \left(\varphi -\sqrt{\varphi ^2-4}\right)\right)$

# Some algorithmic texture generation with Mathematica

The LineIntegralConvolutionPlot[] function in Mathematica is defined by the Wolfram Mathematica Documentation Center as :

LineIntegralConvolutionPlot[{vx,vy},{x,xmin,xmax},{y,ymin,ymax}]
generates a line integral convolution plot of white noise with the vector field {vx,vy}.

LineIntegralConvolutionPlot[] can also generate the plot of an image convolved with a vector field .

I will give some plots of line integral convolutions of a number of vector fields . These plots have often visually appealing forms.

Here is the first plot :

The Mathematica code for the image above is :

Below are some more line integral convolution plots using various “ColorFunction” options .The frame has been removed from these plots :

This slideshow requires JavaScript.

And below is another line integral convolution plot with the external frame modified with Photoshop . Looks like a nice piece of art …

The Mathematica code for the image above is :

A last example of a line integral convolution plot with a large size :

Mathematica code for the image above ;

# The equations of electrodynamics , tensors , and gravitation-First Part

The featured image above was made with Mathematica . It represents  the propagation of an electromagnetic wave.

Elements of this post were written for an answer I gave at quora.com , the question was about Maxwell’s equations
in tensor form. I have modified the answer and added material and equations related to General Relativity and gravitation.

Maxwell’s equations are the fundamental equations of classical electromagnetism and electrodynamics. They  can be stated in integral form , in differential form (a set of partial differential equations) , and in tensor form.

The conventional differential  formulation of Maxwell’s equations in the is given by:

In the above equations , E is the electric field (vector field) , B is the magnetic field ( pseudovector field) ,  ρ is the charge density , and  J is the current density.
ε0 is the Vacuum permittivity ,
and μ0 is the Vacuum permeability .

The second and third equations above form the first group of Maxwell’s equations (the generalized Faraday’s law of induction and Gauss’s law for magnetism) , and the the first and last equations above form the second group  (Gauss’s law and Ampere’s circuit law extended by Maxwell) .

The equations of electromagnetism (Maxwell’s equations and the Lorentz force) in covariant form (invariant under Lorentz transformations) can be deduced from the Principle of least action .

The electromagnetic wave equation can be derived from Maxwell’s equations , its solutions are electromagnetic (sinusoidal) waves.

All the steps and equations related to the topic of this post will not be shown here because they would  make the post much too long , but an overview of the equations , calculations and derivations  will be presented.

The development of the components of the Lorentz force and (after some calculations) its formulation in tensor form allows the introduction of the electromagnetic field tensor Fij :

where uj is the four-velocity four-vector .

The variation of the action δS with respect to the coordinates of a particle gives the equations of motion.

The action for a charged particle in an electromagnetic field can be expressed as:

q is the electric charge.

The variation of the action gives:

After some calculations and an integration by parts the variation of the action becomes:

In the equation above , ui is the four-velocity four-vector.

Since the trajectories of the particle are supposed to have the same initial and final coordinates , the first term in the right-hand side of the equality above is equal to zero.
The potentials are a function of the coordinates , and  the following equalities can be used:

Which gives for the variation of the action:

Thus the electromagnetic field tensor emerges  from the variation above ; in fact the electromagnetic tensor is given by the definition:

Ai is the electromagnetic four-potential comprising the electric scalar potential V and the magnetic vector potential A .

The electromagnetic tensor is antisymmetric:

And the diagonal components in it are equal to zero:

The components of this tensor can be found using:

For example:

The others components can also be calculated and one gets for the covariant electromagnetic tensor:

The components of the contravariant tensor can be found using:

where $g^{\text{ij}}$ is the Metric tensor.

The transformation laws for the electromagnetic tensor are given by the general relation:

The following equation :

gives the first group of Maxwell’s equations .

If the Levi-Civita tensor ( $e^{\text{ikmn}}$ ) is used ( a completely antisymmetric 4th rank tensor) , one gets for the first group of equations:

Using the expression of the action with the Lagrangian density and taking the variation of the action as stationary:

The last relation above represents the Lagrange equations. And the electromagnetic tensor  Fik is assumed to have been found and defined after developing the Lorentz force.

The relations above give:

Thus Lagrange’s equations give the result:

And the second group of Maxwell’s equations is given by :

The second group of equations also gives the equation of charge conservation :

Another notation (the comma notation) and an additional way to write Maxwell’s equations in tensor form are the following :

In a gravitational field the electromagnetic tensor is given by:

$\nabla _j$ is the covariant derivative and $\Gamma _{\text{ij}}^k$  are Christoffel’s symbols .
So the relation between the electromagnetic tensor and the potentials is unchanged in the presence of a gravitational field.

The first and second groups of Maxwell’s equations become :

After calculation the first group can be shown to be equal to the original first group of equations without gravitation.

The second group can be expressed as:

where g is the determinant of the metric tensor.

The equations of motion of a particle of charge q in the presence of an electromagnetic field and a gravitational field are given by  :

Or equivalently:

In General Relativity , the energy-momentum tensor Tij of an electromagnetic field in free space is expressed in the form of the electromagnetic stress- energy tensor:

And the Einstein field equations

are called the Einstein-Maxwell equations.

To be continued…

# Question: what is the square root of 36 ? – Part Two

I will continue with answers and results equal to the square root of 36 ( originally answered at quora.com ). This time the results are mostly related to physics.

With physics one has to take into account the units and the corresponding dimensions of the equations and of the constants.

6 and the square root of 36 are dimentionless numbers , so the result must be dimentionless .
If the result is a simple fraction with numerator and denominator , then the units usually cancel out.
In other cases when one deals with logarithms one should multiply with the inverse dimensions to get a dimentionless result.
In one or two results where I didn’t look for the inverse units  I multiplied the equation with a quantity I called (U) ,  which represents the inverse of the units by which one should multiply the result to get a dimentionless number.

Here are the results :

One possible way to explain what I have done here is the following:
If some people , living on an isolated fictitious island or on an another hypothetical planet , attached a great importance to and had a fixation on  the square root of 36 (or the number 6) for one reason or another , and got accustomed to the use of 6 as a fundamental constant ,  unit or number , then they would have likely  tried to construct a system of measurement  based on the number 6 , and  to express physics and math formulas ,equations , constants and rules in relation to 6.

After all , 6 or $\sqrt{36}$ is equal to :

• The floor of  $2 \pi$ :
$2 \pi \approx 6.2831853071795864769$ ;$6=\lfloor 2 \pi \rfloor$
• $\frac{1}{60}$ of the circumference of a circle in degrees.
• It is also  one tenth of 60 seconds which make up a minute , one tenth of 60 minutes which make up an hour , one fourth of 24 hours which equal a day on Earth , one half of  12 months which make up a year , etc.
• A peculiar ‘hexacentric’ system , so to speak.

Or this can be seen as a (creative) exploration of or exercise in advanced math and physics in order to express many equations , formulas and constants in relation to the number 6 (or $\sqrt{36}$ ) .
Or whatever.

Apologies to Isaac Newton , Leonhard Euler , Bernhard Riemann , Einstein , Stokes , Coulomb , Avogadro , Lagrange , and others (wherever they may be) , for playing around with their equations , formulas , constants , and/or functions.

Does the future of humanity depend on answering what is the square root of  36 , or not?
Have philosophers from Antiquity to the present overlooked this fundamental question , which goes beyond the Kantian categories of space and time set out in his Critique of Pure Reason , and beyond Nietzsche’s Beyond Good and Evil , ushering the transmutation of all values and a defining moment for a new era  in the history of Humankind?
It’s just a square root , for common sense’s sake (or is it?).

Anyway , enough philosophizing.

Here are ( $3=\frac{\sqrt{36}}{2}$ ) more answers to $\sqrt{36}$ , this time with images :

$\sqrt{36}$  is equal to :

The number subjected to a geometric rotation in the following image (done with Mathematica and some Photoshop) :

The number expressing the power and the coefficients in the equation of the curve in the polar plot below :

The number expressing the degree of the root  and the power of the variables in the 3D plot below :

The rotated number  and the polar plotted curve in the first two images  above seem to exhibit symmetry.
Symmetry is an very important property in science , math , physics , equations , nature , and wherever it is found.

Online sources and reference works related to what I have written in this answer can be found in my pages about Science booksand philosophy books in this site/blog.

Some other online sources:

http://en.wikipedia.org/wiki/Category:Mathematics

http://en.wikipedia.org/wiki/Category:Physics

# Question: what is the square root of 36 ? – Part One

I went over to www.quora.com a few weeks ago to answer a question about calendars , and then I got busy there. Since I am able to answer different types of questions , I started answering one question after the other , and I got stuck . I mean it’s a good way of getting stuck , answering questions about culture and science is useful and educational , but it can  become time consuming and it requires attention and dedication.

Anyway . somebody came up with a question about the square root of 36. This question was obviously a stale unoriginal question , probably meant as a joke , but I decided to spice it up a little and make it more interesting.
So I answered the question my own way ,  and I got a  good amount of likes and ‘upvotes’ .

I will rewrite the answer  I gave in here (with some modifications ).

Here are some results equal to $\sqrt{36}$  :

An here is another group of results equal to $\sqrt{36}$ .
If one tries to work out or verify  these equalities , it would be a good exercise in intermediate and advanced math ( and physics).

To be continued in another post.

# On the linear relation between two calendars

Given a date in the Islamic calendar , there is a formula which gives a good (approximate) numerical value of the corresponding date in the Gregorian calendar.

To find this formula or relation ,  we note that the ratio of a mean (lunar) year of The Islamic calendar to a solar year is:

$\frac {354 + \frac {11} {30}} {365.242} = 0.970224$

The first year of the Islamic (Hijra or Hegira) calendar started 19th July 622 according to the Gregorian calendar. 19th July is the 200th day of the year and is (approximately ) 0.5476 in parts of the solar year ,while the number of years elapsed is equal to ( y-1) . The days are distributed regularly in both calendars , so the date of the beginning of the year y in Gregorian years is :

$0.970224 (y-1)+622.5476$

which can be written as :

$y_ {\text {ch}} = 0.970224 y_ {\text {hj}} + 621.5774$     (1)

Solving the equation above for the year of the Islamic calendar we get:

$y_ {\text {hj}} = -640.653499 + 1.03069 y_ {\text {ch}}$    (2)

If we try to take a more accurate value for the average year length of  the Gregorian calendar  and take into account additional decimal digits , we get the following slightly more precise formulas replacing the two formulas (1) and (2) above :

yhjtoch(t) = 621.5773576247731 + 0.9702237766245703 t

and:

ychtohj(t) = -640.6536023959899 + 1.0306900573793625 t

Now if we solve the two equations (1) = (2) above or yhjtoch(t) = ychtohj(t) , we should find the date when the two calendars are equal and have the same day of the same month of the same  year . Solving (1) = (2) gives the result 20875.052079 , which corresponds to 19 days  (0.052079×365 ≈ 19) of the year 20875 , or 19th January 20875 , or 19/1/20875 .
yhjtoch(t) = ychtohj(t) gives the result 20874.956161756745132 , which corresponds approximately to the 349th day of the year 20874 , 16 days before the end of the year.
Using a calender converter (within Mathematica  or an online converter ) , we find that the dates when the two calendars are equal lie between 1/5/20874 and 30/5/20874 , i.e the first day of the 5th month (May) of the year 20874 in the Gregorian calendar is also the first day of the 5th month of the year 20874 in the Islamic calendar , and this goes on until the 30th day of the 5th month of the year 20874 in both calendars. Therefore we can see that the dates obtained by making equal the two sets of equations above deviate and are further away from the real dates verified with calendar converters.

From the beginning of the Islamic calendar to the year 20874 there is a very small increase in the difference between the days of the year for the Islamic and the Gregorian calendar, and for the year 20874 the difference between the 2 calendars (if we equate ychtohj(t) and yhjtoch(t) ) is about 215 days , so I made some calculations and I subtracted a small term (0.000001758733 times t) from the formula converting from the Islamic to Gregorian calendar yhjtoch(t) and I got the following :

yhjch(t) = 621.5773576247731 + 0.9702237766245703 t – 0.000001758733 t

yhjch(t) = 621.5773576247731 + 0.9702220178915703 t

yhjch(t) is a little more accurate than the equation (1) above , which differs from the real date by approximately one day for years and dates in the current (21st) century , then the gap widens between yhjch(t) and (1) , with yhjch(t) giving dates a little before the real date , and equation (1) a little after the real (Gregorian calendar) date.For the year 20874 yhjch(t) gives more precise dates.

Setting ychtohj(t) = ychj(t) and solving ychj(t) = yhjch(t) , we get the result 20874.349006727632514 ,which is a date that lies within the interval between 1/5/20874 and 30/5/20874 for the two calendars.

Below is a graph showing ychj(t) and yhjch(t) around t = 20874 and how they intersect :

So the two conversion formulas or linear equations ychj(t) and yhjch(t) can be considered to be the two most accurate ones for converting between the Islamic and Gregorian calendars.

Additional reference work related to this post :
Time measurement and calendar construction , by Broughton Richmond.

# Pi in the sky , and on the computer

Results and things  related to pi are usually published or made known on Pi Day . But you never know when you get inspired by π or find time to explore this ‘venerable’ math constant , and I have on Pi Day . By the way there is also a Pi approximation Day (July 22) , so there’s more than one date to talk or write  about π .

Let’s kick off with an image of the value of pi (in the clouds ) with 12 decimal digits , made with Photoshop.I tried to make it realistic and show π and its numerical value ( 3. 141592653589) as part of the clouds and the sky.

Click on the image above to see and enlarged version.

Now for some computer-based mathematical explorations related to π.
There is a known relation between e ( the base of the natural logarithm ) and π :

$e^{\pi }-\pi =19.999099979$ and is approximately equal to 20 or almost 20 , which is known as an almost integer.
If we try to be more accurate and find the first 1000 decimal digits for the expression above we get (with the help of Mathematica) the following number:

19.99909997918947576726644298466904449606893684322510617247010181721652594440424378488893717172543215169380461828780546649733419980514325361299208647148136824787768176096730370916343136911881572947102843075505750157713461345968680161070464780150721176248631484786057786790083331108325695374657291368002032330492961850463283115054452239990730318010838062172626769958035434209665854687644987964315998803435936569779503997342833135008957566815879735578133492779192490846222394896357465468950148911891909347185826596341254678588264050033689529697396648300564585855142666534919457239163444586998081050100236576797224041127139639108211122123659510905094871070706680635934325684092946890616346767578519812785089761055789304041857980123101280905543416254404987679233496308302396952371198509012175432057419088516489412743155057902167919927734272964964116423666794634333328342687902907792168390827162859622042360176355034576875485783678406122447755263475337650755251536818489395213976127148481818560841182505647  ,
which shows that $e^{\pi }-\pi$ does not approach 20 completely or uniformly.

Here are some more expressions and calculations  involving π (calculated with Mathematica):

I think it remains to be seen if the numbers above are transcendental. The Mathematica (version 10)  command Element[z , Algebraics ] cannot determine whether these numbers belong to the domain of algebraic numbers or not.

Now let’s consider an expression containing π , e and i (the imaginary unit complex number). The following expressions are equivalent:

A 2D complex plot of the last function above (with z between -4 and 4) gives the following graph (made with Maple):

A 3 D complex plot of the same function ( with z between -4-4i and 4+4i)   gives the following graph (with the help of Maple):

A general solution of the function f(z) above for f(z) = 0 is (calculated with Mathematica):

Here is an interesting result:

Using the Mathematica commands Element[z , Algebraics ] and Not[Element[z , Algebraics ]] , it seems that the solutions z of f(z)=0 above ( for different values of the constants ) do not belong to the domain of algebraic numbers , and are therefore  transcendental numbers.

And with this I bid π farewell for now.

# A note about the sinc function as a solution to a differential equation

The (infamous , or famous , take your pick) sinc function is known to be one of two solutions of the differential equation:

This is a linear second order ordinary differential equation with dependent variable x and independent variable y.
I have tried to explore and find the solutions to this differential equation using mostly computer math software and programs.

The Texas Instruments 92 Plus scientific calculator and the Maple computer algebra system agree and give the same solution :

Mathematica gives the following solution:

After converting the exponentials to trigonometric functions the expression above and the solution of the differential equation given by Mathematica becomes:

This solution is less simple than (1). Note that if we make the assumption in Mathematica that λ > 0 ,we get the solution:

If we try to find the graphical representation of solution (1) for different values of the arbitrary constants c1 and c2 and with λ (or n ) between -3 and 3 ,we get the following graphs:

Then I tried to take the absolute value of λ in the numerator of (2) for different values of the arbitrary constants , and compared their graphs  with the graphs of solution (1) for the same values of the constants. λ in (2) and n in (1) are between 1 and 4.

The graphical results are similar but not exactly the same.

Using the Manipulate built-in function in Mathematica , here is an animation of the graphs for solution (1) obtained by varying λ , c1 and c2:

Finally , I will give the solution of a generalized form of the differential equation above

obtained with Mathematica :

In the solution above , Jμ(x) is the Bessel function of the first kind , and Yμ(x) is the Bessel function of the second kind.

# Some more 3D graphics related to the sinc function

I’ll finish exploring the sinc function by showing a few 3D graphs of sinc related curves.
Here is a first set of 3D curves of sinc related functions:

This slideshow requires JavaScript.

As an example , here is the Mathematica code for the 3D curve √(x² + y²)sinc(√(x² + y²)) above:

And here is the second set of 3D surfaces related to sinc:

This slideshow requires JavaScript.

The Mathematica code for the curve given by sinc(x² -y²) is:

I’m somewhat fed up with sinc , so soon I will move on to other subjects.

Update: I will add a last group of six 3D curves related to sinc . They include curves where sinc as a function of x is multiplied by sinc as a function of y , such as sinc(x)×sinc(y) , sinc(ln(x))×sinc(ln(y)) with ‘ln’ the natural logarithm to the base e  rendered as ‘log’ by Mathematica in the image , sinc(sin(x))×sinc(cos(y)) , and sinc(x²)×sinc(y²)  .

This slideshow requires JavaScript.

# 2D and 3D graphics related to the sinc function

After having explored calculus results related to the sinc function , here are a few 2D and 3D graphic results.

The graph of the function above is (made with Mathematica):

We’ll consider more than one way to graph this function in 3D.
First , by taking a specific function of x and y and using the following Mathematica code :

We get the 3D result :

We can use the RevolutionPlot3D buit-in function in Mathematica to get the graph of the solid obtained from the function by revolving around the z-axis:

The graph of the solid obtained by revolving about the x-axis is:

The Mathematica code for the graph above is:

And the graph of the solid obtained from the function by revolving about the y-axis is:

The Mathematica code for the graph above is:

Next is a comparison  between the 2D graph and the 3D graph of the function sinc(tan(w)):

Below is a  set of six 2D graphs of sinc as a function of hyperbolic trigonometric functions:

Mathematica code for the graphs above( rd will be used in the 3D graphs later):

Here are the six 3D graphs related to the above six 2D sinc graphs:

And the Mathematica code for the 3D sinc graphs above: