Thursday, 20 April 2017

The Euler Line

I started reading "How Euler Did Even More" by C. Edward Sandifer of the Western Connecticut State University, published and distributed by The Mathematical Association of America. This is a follow up on another book by Sandifer called "How Euler Did It". Ed apparently inspired The Euler Archive, a digital library dedicated to the work and life of Leonhard Euler. The individual chapters, which were posted month by month to the MAA Online and then collated into these two books, can be found in this archive (link). The actual chapter on the Euler line is located here.

The first chapter in the book is about the Euler line which is:
a line determined from any triangle that is not equilateral. It is a central line of the triangle, and it passes through several important points determined from the triangle, including the orthocenter, the circumcentre, the centroid, the Exeter point and the centre of the nine-point circle of the triangle. From Wikipedia.
Euler's line (red) is a straight line through the centroid (orange), orthocentre (blue), circumcentre (green) and centre of the nine-point circle (red).
Euler showed this in 1765, although he did not realise the importance of his discovery at the time. Here is an interesting excerpt from the Sandifer's chapter on the Euler line:
A hundred years ago, if you’d asked people why Leonhard Euler was famous, those who had an answer would very likely have mentioned his discovery of the Euler line, the remarkable property that the orthocenter, the centre of gravity and the circumcenter of a triangle are collinear. But times change, and so do fashions and the standards by which we interpret history. 
At the end of the 19th century, triangle geometry was regarded as one of the crowning achievements of mathematics, and the Euler line was one of its finest jewels. Mathematicians who neglected triangle geometry to study exotic new fields like logic, abstract algebra or topology were taking brave risks to their professional careers. Now it would be the aspiring triangle geometer taking the risks.
Euler seems to have been more interested in reconstructing the triangle from the various centres than in the fact that these centres were collinear. Sandifer compares Euler to Columbus in the conclusion to the chapter:
In some ways, Euler’s discovery of the Euler line is analogous to Columbus’s “discovery” of America. Both made their discoveries while looking for something else. Columbus was trying to find China. Euler was trying to find a way to reconstruct a triangle, given the locations of some of its various centres. Neither named his discovery. Columbus never called it “America” and Euler never called it “the Euler line.” 
Both misunderstood the importance of their discoveries. Columbus believed he had made a great and wonderful discovery, but he thought he’d discovered a better route from Europe to the Far East. Euler knew what he’d discovered, but didn’t realise how important it would turn out to be. 
Finally, Columbus made several more trips to the New World, but Euler, as with his polyhedral formula and the Königsberg bridge problem, made an important discovery but never went back to study it further.
The Wikipedia article makes the important point that the incentre does not normally lie on the Euler line, except in the case of an isosceles triangle. In the case of an equilateral triangle, there is no line because all the points are coincident. An interesting point is that there is an equivalent Euler line for the quadrilateral and tetrahedron. There are also other points that lie on the Euler line. These are:
A comprehensive biography of Euler can be found here on the MacTutor site where the biographies of many other mathematicians can be found. To quote from this site: Euler was the most prolific writer of mathematics of all time and we owe to Euler the notation $f(x)$ for a function (1734), $e$ for the base of natural logs (1727), $i$ for $\sqrt{-1}$ (1777), $\pi$ for pi, $\Sigma$ for summation (1755), the notation for finite differences $\Delta y$ and $\Delta^2 y$ and many others.

Sunday, 9 April 2017

i to the power i

I'd never thought about it before until I saw the problem posed and then answered. Here is the problem: what is the value of ? Can it be evaluated? Is it a real number or a complex number? Well, it turns out that it's a real number and transcendental. One way of working out its value is to replace the  in the base with  because:


So we can replace  with  which becomes   which in turn becomes simply . This of course we can evaluate and it turns out to be approximately:

0.207879576350761908546955619834978770033877841631769608075...
It looks even stranger if we pose the problem in the form . In whatever form it's posed however, the result is the same: a transcendental, real number with the value shown above. Of course, this leads one to pose other problems such as the value of   or . Having posed the problems, I guess I'll have to now investigate them.

  is easy because it can be written as:

 
WolframAlpha will give us an answer to   (  ) but it's not entirely clear why. I'll need to investigate further. Note that my previous post on Power Towers and Tetration is relevant to this problem.

Sunday, 12 March 2017

Power Towers and Tetration

How is an expression like \(2^{{{2}^{2}}^{0}}\) evaluated? Such an expression is often termed a power tower and the convention is that the evaluation takes place from the top down so we have:

\(2^{{2}^{1}}=2^2=4\)

I saw this question posed in Quora and it evoked hundreds of responses.

The term used in this context is tetration which Wikipedia explains as follows:
In mathematics, tetration (or hyper-4) is the next hyper-operation after exponentiation, and is defined as iterated exponentiation. The word was coined by Reuben Louis Goodstein, from tetra-(four) and iteration. Tetration is used for the notation of very large numbers.  
The notation \({^{n}a}\) means \({a^{a^{\cdot^{\cdot^{a}}}}}\), the application of exponentiation \(n-1\) times.
Shown below are the first four hyperoperations, with tetration as the fourth:

Addition
\(a + n = a + \underbrace{1 + 1 + \cdots + 1}_n\)
\(n\) copies of 1 added to \(a\).

Multiplication
\(a \times n = \underbrace{a + a + \cdots + a}_n\)
\(n\) copies of \(a\) combined by addition.

Exponentiation
\(a^n = \underbrace{a \times a \times \cdots \times a}_n\)
\(n\) copies of \(a\) combined by multiplication.

Tetration
\({^{n}a} = \underbrace{a^{a^{\cdot^{\cdot^{a}}}}}_n\)
\(n\) copies of \(a\) combined by exponentiation, right-to-left.

Here is a proper definition:

For any positive real number \(a>0\) and non-negative integer \(n \ge 0 \), we define \(\,\! {^{n}a} \) by:$${^{n}a} := \begin{cases} 1 &\text{if }n=0 \\ a^{\left[^{(n-1)}a\right]} &\text{if }n>0 \end{cases} $$As we can see from the definition, when evaluating tetration expressed as an "exponentiation tower", the exponentiation is done at the deepest level first (in the notation, at the highest level). For example:$$\,\!\ ^{4}2 = 2^{2^{2^2}} = 2^{\left[2^{\left(2^2\right)}\right]} = 2^{\left(2^4\right)} = 2^{16} = 65,\!536$$Note that exponentiation is not associative, so evaluating the expression in the other order will lead to a different answer:$$\,\! 2^{2^{2^2}} \ne \left[{\left(2^2\right)}^2\right]^2 = 2^{2 \cdot 2 \cdot2} = 256$$Exponential towers must be evaluated from top to bottom (or right to left). Computer programmers refer to this choice as right-associative.

Source: https://en.wikipedia.org/wiki/Tetration 

Note: there's nothing very original about this post. I've copied the rather involved LaTeX code from the Wikipedia editing page, modified it by getting rid of the maths arrow brackets and replaced them with \( signs. I was mainly interested to see how the LaTeX would convert and as it turned out the transfer from Wikipedia to Blogger was quite straightforward.

Thursday, 2 March 2017

The Gaussian Integral

By way of revising some earlier topics that I've covered and of practising my LaTeX skills, I'm covering the evaluation of the Gaussian Integral: $$ \int_{-\infty}^\infty e^{-x^2} \mathrm{d}x$$ $$ \text{Let } I= \int_{-\infty}^\infty e^{-x^2} \mathrm{d}x \,
\text{ and }  \,I= \int_{-\infty}^\infty e^{-y^2} \mathrm{d}y$$ $$ \text{Then } I^2=\displaystyle \int_{-\infty}^\infty \int_{-\infty}^\infty e^{-(x^2+y^2)} \mathrm{d}x \,\mathrm{d}y$$ Changing to polar coordinates requires use of the Jacobian \(r\), treated after the evaluation of the integral: $$I^2= \int_0^\infty re^{-r^2} \mathrm{d}r \int_0^{2 \pi} \mathrm{d}\theta$$ $$I^2= 2\pi\int_0^\infty  r \, e^{-r^2} \mathrm{d}r$$ $$I^2= 2 \pi\, \left[ - \frac{1}{2} \, e^{-r^2} \right ]_0 ^ \infty=\pi $$ $$ \text{Therefore }I=\sqrt{\pi} \, \text{ and } \, \int_{-\infty}^\infty e^{-x^2} \mathrm{d}x=\sqrt{\pi}$$Now, about the Jacobian, let's suppose that \( x \) and \( y \) are functions of both \(u\) and \(v \), that is \( x=g(u,v) \) and \( y=h(u,v) \). The Jacobian is defined as: $$
\begin{equation}
\frac{\partial (x,y)}{\partial (u,v)} =
\left|
\begin{array}{cc}
\dfrac{\partial x}{\partial u}& \dfrac{\partial x}{\partial v} \\
\dfrac{\partial y}{\partial u}& \dfrac{\partial y}{\partial v} \\
\end{array}
\right|
\end{equation}$$ Let's work with the specific change from rectangular to polar coordinates that is used in the solution to the Gaussian Integral.

We have \(x=r \cos \theta \) and \(y=r \sin \theta\)

This means that \( \dfrac{\partial x}{\partial r}=\cos \theta \) and \( \dfrac{\partial x}{\partial \theta}=-r \sin \theta \)
Also \( \dfrac{\partial y}{\partial r}=\sin \theta \) and \( \dfrac{\partial y}{\partial \theta}=r \cos \theta \). Thus: $$
\begin{equation}
\frac{\partial (x,y)}{\partial (r,\theta)} =
\left|
\begin{array}{cc}
\cos \theta & -r \sin \theta \\
\sin \theta  &r \cos \theta\\
\end{array}
\right|
\end{equation}$$ The determinant evaluates to \(r \cos^2 \theta + r \sin^2 \theta=r \) (the value of the Jacobian).

The Gaussian Integral is closely connected with the normal distribution via the probability density function \( \phi (x)=\dfrac{1}{\sqrt{2 \pi}}e^{-\frac{1}{2}x^2} \), where $$\int_{-\infty} ^\infty \phi(x) \mathrm{d}x=\dfrac{1}{\sqrt{2 \pi}}\int_{-\infty} ^\infty e^{-\frac{1}{2}x^2} \mathrm{d}x =1$$ Wikipedia states that "in statistics one often uses the related error function, or \( \text{erf}(x) \), defined as the probability of a random variable with normal distribution of mean 0 and variance 1/2 falling in the range \( [-x,x] \)"; that is: $$\text{erf}(x)=\dfrac{1}{\sqrt{\pi}}\int_{-x}^x e^{-t^2} \mathrm{d}t$$Here is an informative video which explains why \( \pi \) appears as the evaluation of the integral. It also explains how the double integral used to evaluate the integral is two dimensional and is finding the volume under a surface. By using the shell method to evaluate the integral, the need for the Jacobian is avoided:

Friday, 24 February 2017

Sums of Squares Revisited

My first post for this mathematics blog concerned the conditions required for a number to be expressible as the sum of two squares. The date was 26th September 2015. I thought I might start revisiting some of my earlier posts just to reacquaint myself with their content. Let's consider prime numbers first. Fermat's theorem on the sums of two squares states that any prime number that is congruent to 1 modulus 4 can be expressed as a sum of two squares.

In other words, if \(p\) is a prime, then \(p=x^2+y^2\) where \(x\) and \(y\) are integers, if and only if \(p \equiv 1 \pmod{4}\). Applied to my current day count of \(24799\) (a prime), we find that \(24799 \equiv 3 \pmod{4}\) and so it cannot be written as the sum of two squares. In fact, it cannot even be written as the sum of three squares because the number can be expressed in the form \(4^a(8b+7)\) with \(a=0\) and \(b=3099\). By Legendre's 3-square theorem, such a number cannot be expressed as a sum of three squares.

Primes that can be expressed as the sum of two squares are called Pythagorean Primes.

If the number is composite, none of its \(4k+3\) primes can have an odd exponent. For example, two days ago I was \(24797\) days old and this number factorises to \(137 \times 181\). Now \(137 \equiv 1 \pmod{4}\) and \(181 \equiv 1 \pmod{4}\), so there are no \(4k+3\) primes and thus the number is expressible as a sum of two squares (in two different ways as it turns out): \(24797=59^2+146^2=74^2+139^2\).

There is a reason that \(24797\) can be expressed as a sum of squares in two different ways. Remember that its factors \(137\) and \(181\) are both primes satisfying \(p \equiv 1 \pmod{4}\) and so each can be expressed as a sum of two squares. Specifically, \(137=4^2+11^2\) and \(181=9^2+10^2\). It can easily be shown that the product of two sums of squares is equal to a sum of squares in two different ways. Here is the demonstration: $$(a^2+b^2)(c^2+d^2)=(ac-bd)^2+(ad+bc)^2=(ac+bd)^2+(ad-bc)^2$$There is an interesting history attached to this identity:
It is actually first found in Diophantus' Arithmetica (III, \(19\)), of the third century A.D. It was rediscovered by Brahmagupta (\(598\)–\(668\)), an Indian mathematician and astronomer, who generalised it (to the Brahmagupta identity) and used it in his study of what is now called Pell's equation. His Brahmasphutasiddhanta was translated from Sanskrit into Arabic by Mohammad al-Fazari, and was subsequently translated into Latin in \(1126\). The identity later appeared in Fibonacci's Book of Squares in \(1225\). Source.
However, take yesterday's number \(24798=2 \times 3 \times 4133\). Clearly, \(3\) is a \( 4k+3\) prime raised to an odd power and so \(24798\) cannot be expressed as sum of two squares. As it happens, \(4133 \equiv 1 \pmod{4}\) but that doesn't matter because \(3\) has already ruined things.

Thursday, 23 February 2017

LaTeX and Integrating Square Root of Tangent Function

The following integration follows the steps outlined in this YouTube video that I watched, so I'm not claiming any originality here. However, I wanted to practise my LaTeX skills and so, using MacTex, a LaTeX implementation for OS X, and TeXShop, the front-end text editor, I translated the steps outlined in the video into LaTeX. MacTex produced a crisp PDF output file but later I wondered what would happen if I copied the code and pasted it into this blog. Well, turns out it rendered almost perfectly. The result is shown below:

**********************************************

How can we deal with  \( \! \! \int \sqrt{\tan x} \, \mathrm {d} x \)? If the square root sign wasn't there it would be easy and we'd get \( \ - \log(\cos x)+C \). However, it is there and we need to find a way to deal with it. Well, it turns out that there is a judicious substitution that we can use to get the process started and that substitution is \( u=\sqrt{\tan x} \).

This means that \( u^2=\tan x \) and so \( {2 \, u \, \mathrm {d} u} /{\mathrm {d}  x}=\sec^2 x \). \( \mathrm{d}x \)can now be written as \( 2 \, u \, \mathrm {d} u /sec^2 x \) and thus the integral becomes \( \! \! \int 2 \, u^2 \, \mathrm{d} u/\sec^2x \)and the problem now is to express \( \sec^2 x \) in terms of \(u\). Fortunately that's not too difficult with recourse to a little trigonometry. We know \( \tan x=u^2 \) and if we write this as \( \tan x=u^2/1 \) (opposite over adjacent) then the hypotenuse of the associated right-angled triangle is \( \sqrt{1+u^4} \).

Thus \( \cos x=1/\sqrt{1+u^4} \), \( \sec^2 x=1+u^4 \) and the integral becomes: $$\! \! \int \frac{2 \, u^2}{1+u^4} \mathrm {d} u$$There is still a way to go before we arrive at the solution to our problem but this is a far more manageable integral than the one that we started with. Now we need to spend some time manipulating the integral to get it into the right form. Firstly, let's divide top and bottom by \(u^2\). This gives us: $$\! \! \int \frac {2} {u^2+1/u^2} \mathrm {d} u$$The next step is to us modify the numerator 2 so that it looks like this:$$1+1/u^2+1-1/u^2$$Now we separate the integral into two halves as follows:$$\! \! \int \frac {1 + 1/u^2}{u^2+1/u^2} \mathrm {d} u \quad + \quad \! \! \int \frac {1 - 1/u^2}{u^2+1/u^2} \mathrm {d} u$$The denominators in both integrals can be rewritten as shown:$$\! \! \int \frac {1 + 1/u^2}{(u-1/u)^2+2} \mathrm {d} u \quad + \quad \! \! \int \frac {1 - 1/u^2}{(u+1/u)^2-2} \mathrm {d} u$$Each integral needs to be dealt with separately so let's begin with the integral on the left hand side. However, we need to make another substitution before we proceed. Let $t=u-1/u$. Differentiating both sides w.r.t. u, gives $\mathrm {d} t/\mathrm{d}u=1+1/u^2$ and so the integral on the left hand side can be rewritten:$$\! \! \int \frac {1 + 1/u^2}{(u-1/u)^2+2} \mathrm {d} u=\! \! \int \frac {1}{t^2+2} \mathrm {d} t$$An integral of the form $$\! \! \int \frac {1}{t^2+a^2} \mathrm {d} t =\frac{1}{a} \tan^{-1} \bigg (\frac{t}{a}\bigg ) + C $$and so we end up with $$\frac{1}{\sqrt{2}}\tan^{-1} \bigg (\frac {t}{\sqrt{2}}\bigg ) + C $$Now we need to backtrack, replacing $t$ by $u$ and $u$ by $\sqrt{\tan x}$. This will give us firstly $$\frac{1}{\sqrt{2}}\tan^{-1} \bigg (\frac {u-1/u}{\sqrt{2}}\bigg ) + C $$And then $$\frac{1}{\sqrt{2}}\tan^{-1} \bigg (\frac {\sqrt{\tan x}-1/\sqrt{\tan x}}{\sqrt{2}}\bigg ) + C $$But this is only the left hand side of our integral! Now we need to go back and deal with the right hand side integral which was:$$\quad \! \! \int \frac {1 - 1/u^2}{(u+1/u)^2-2} \mathrm {d} u$$This time let $t=u+1/u$. Differentiating both sides w.r.t. u, gives $\mathrm {d} t/\mathrm{d}u=1-1/u^2$ and so the integral on the left hand side can be rewritten:$$\quad \! \! \int \frac {1 - 1/u^2}{(u+1/u)^2-2} \mathrm {d} u=\! \! \int \frac {1}{t^2-2} \mathrm {d} t$$This integral can be solved by rewriting $t^2-2$ as $(t-\sqrt{2})(t+\sqrt{2})$ and then using the method of partial fractions to find A and B in the expression:$$\frac{A}{t-\sqrt{2}}+\frac{B}{t+\sqrt{2}}$$This leads to $(A+B)t+(A-B)\sqrt{2}=1$, $A=-B$, $2A\sqrt{2}=1$ and $A=1/2\sqrt{2}$
Hence $B=-1/2\sqrt{2}$ and the integral can be now be rewritten as:$$\int \frac{1/2\sqrt{2}}{t-\sqrt{2}} \mathrm {d} t-\int \frac{1/2\sqrt{2}}{t+\sqrt{2}} \mathrm {d} t$$Both these integrals are natural logarithms and so the result obtained is:
$$\frac{1}{2\sqrt{2}}(\ln (t-\sqrt{2})-\ln (t+\sqrt{2}))+C$$This simplifies to:$$\frac{1}{2\sqrt{2}}\ln \bigg(\frac {t-\sqrt{2}}{t+\sqrt{2}} \bigg )+C$$Now we need to backtrack, replacing $t$ by $u$ and $u$ by $\sqrt{\tan x}$. This will give us firstly$$\frac{1}{2\sqrt{2}}\ln \bigg(\frac {(u+1/u)-\sqrt{2}}{(u+1/u)+\sqrt{2}} \bigg )+C$$And then $$\frac{1}{2\sqrt{2}}\ln \bigg(\frac {(\sqrt{\tan x}+1/\sqrt{\tan x})-\sqrt{2}}{(\sqrt{\tan x}+1/\sqrt{\tan x})+\sqrt{2}} \bigg )+C$$Putting both integrals together now we get the result that:$$\! \! \int \sqrt{\tan x} \mathrm {d} x=\frac{1}{\sqrt{2}}\tan^{-1} \bigg (\frac {\sqrt{\tan x}-1/\sqrt{\tan x}}{\sqrt{2}}\bigg )+ \\ \frac{1}{2\sqrt{2}}\ln \bigg(\frac {(\sqrt{\tan x}+1/\sqrt{\tan x})-\sqrt{2}}{(\sqrt{\tan x}+1/\sqrt{\tan x})+\sqrt{2}} \bigg )+C$$
It was an arduous process but in the end our goal was accomplished.

Sunday, 19 February 2017

General Solution to Cubic Equation

In a recent post titled All Cubic Polynomials Are Point Symmetric, the key point was that the \(x\) coordinate of the point of symmetry is given by: $$ x=\frac{-b}{3a}$$ and this fact also plays a crucial role in devising a solution to the general cubic equation \( ax^3+bx^2+cx+d=0\). It enables the point of symmetry in the graph of the polynomial to be translated horizontally so it lies on the \(y\) axis and the new equation is much easier to solve because the \(x^2\) term is removed.
Knowledge of the quadratic formula is older than the Pythagorean Theorem. Solving a cubic equation, on the other hand, was the first major success story of Renaissance mathematics in Italy. The solution was first published by Girolamo Cardano (1501-1576) in his Algebra book Ars Magna. Source
The technique finds a single real root and the other two roots (real or complex) can be found by polynomial division and the use of the quadratic formula. The first step in the solution is to horizontally translate the point of symmetry so it lies on the \(y\) axis. This is achieved by means of the substitution:$$x=y-\frac{b}{3a}$$This produces:$$a(y-\frac{b}{3a})^3+b(y-\frac{b}{3a})^2+c(y-\frac{b}{3a})+d=0$$Multiplying this out gives$$ay^3+(c-\frac{b^2}{3a})y+(d+\frac{2b^2}{27a^2}-\frac{bc}{3a})=0$$After division by \(a\), this equation is of the general form \(y^3+Ay=B\) and was solved by Scipione del Ferro (1465-1526).

Consider a specific cubic equation e.g. \(x^3-15x^2+81x-175=0\).

Here the substitution will be \(x=y+5\) because \(a=1\) and \(b=-15\) leading to \(y^3+6y-20=0\). The situation is shown in the graph below, where it can be seen that the root of the original equation is 7 and that of the translated equation is 2 (although algebraically we don't know that yet):


We need to find \(s\) and \(t\) such that \(3st=A\) and \(s^3-t^3=B\).

It can be shown that \(y=s-t\) is then a solution of \(y^3+Ay=B\):$$(s-t)^3+3st(s-t)=s^3-t^3$$ $$ (s^3-3s^2t+3st^2-t^3)+(3s^2t-3st^2)=s^3-t^3$$Let's solve \(3st=A\) and \(s^3-t^3=B\) for the simplified cubic \(y^3+6y=20\).

\(3st=6\) and so \(s=2/t\).

Substituting into \(s^3-t^3=20\) gives \((2/t)^3-t^3=20\).

Multiplying by \(t^3\) gives \(t^6+20t^3-8=0\)

Taking the positive root \(t^3=-10+\sqrt{108}\) and \(t=\sqrt[3]{-10+\sqrt{108}}\)

Now \(s^3=20+t^3\) and so \(s^3=20+(-10+\sqrt{108})=10+\sqrt{108}\)

This means that \(s=\sqrt[3]{10+\sqrt{108}}\) and then, because \(y=s-t\), we have:

\(y=\sqrt[3]{10+\sqrt{108}}-\sqrt[3]{-10+\sqrt{108}}\)

But \(x=y+5\) and so \(x=\sqrt[3]{10+\sqrt{108}}-\sqrt[3]{-10+\sqrt{108}}+5\)

Remarkably, this formidable root (the only real root) evaluates to 7!

So that means \( \sqrt[3]{10+\sqrt{108}}-\sqrt[3]{-10+\sqrt{108}}=2\). Why is it so?

Well, here is how it all comes about:

\(\sqrt[3]{10 + \sqrt{108}} - \sqrt[3]{\sqrt{108} - 10}\)

\(=\sqrt[3]{10 + 6 \sqrt{3}} - \sqrt[3]{6 \sqrt{3} - 10}\)

\(=\sqrt[3]{1^3+3\sqrt{3}+3(\sqrt{3})^2+(\sqrt{3})^3}-\sqrt[3]{-1^3+3\sqrt{3}-3(\sqrt{3})^2+(\sqrt{3})^3}\)

\(=\sqrt[3]{(1+\sqrt{3})^3}-\sqrt[3]{(-1+\sqrt{3})^3}\)

\(=1+\sqrt{3}+1-\sqrt{3}\)

\(=2\)