Integral: The CAS & I

Evaluate $\displaystyle\int \frac{1}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx, \alpha_2 \ne \alpha_1.$

$\displaystyle\int \frac{1}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{-(x^2-(\alpha_1+\alpha_2)x+\alpha_1 \alpha_2)}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{-x^2+(\alpha_1+\alpha_2)x-\alpha_1 \alpha_2}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{-x^2+(\alpha_1+\alpha_2)x-\left(\frac{\alpha_1+\alpha_2}{2}\right)^2 + \left(\frac{\alpha_1+\alpha_2}{2}\right)^2-\alpha_1 \alpha_2}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{\left(\frac{\alpha_1+\alpha_2}{2}\right)^2-\alpha_1 \alpha_2-x^2+(\alpha_1+\alpha_2)x-\left(\frac{\alpha_1+\alpha_2}{2}\right)^2}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{\left(\frac{\alpha_1+\alpha_2}{2}\right)^2-\alpha_1 \alpha_2-\left(x^2-(\alpha_1+\alpha_2)x+\left(\frac{\alpha_1+\alpha_2}{2}\right)^2\right)}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{\frac{\alpha_1^2+\alpha_2^2+2\alpha_1\alpha_2-4\alpha_1\alpha_2}{4}-\left(x^2-(\alpha_1+\alpha_2)x+\left(\frac{\alpha_1+\alpha_2}{2}\right)^2\right)}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{\frac{\alpha_1^2+\alpha_2^2-2\alpha_1\alpha_2}{4}-\left(x^2-(\alpha_1+\alpha_2)x+\left(\frac{\alpha_1+\alpha_2}{2}\right)^2\right)}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{\frac{\left(\alpha_1-\alpha_2\right)^2}{4} - \frac{4x^2-4x(\alpha_1+\alpha_2)+(\alpha_1+\alpha_2)^2}{4}}}\;dx$

$= \displaystyle\int \frac{2}{\sqrt{\left(\alpha_2-\alpha_1\right)^2-\left(2x-(\alpha_1+\alpha_2)\right)^2}}\;dx$

For $a \ne 0, \int\frac{1}{\sqrt{a^2-x^2}}\;dx = \arcsin(\frac{x}{|a|})$ (see Exercise-1)

$=\arcsin\left(\frac{2x-(\alpha_1+\alpha_2)}{|\alpha_2-\alpha_1|}\right)$

Exercise-1 Show that for $a \ne 0, \int\frac{1}{\sqrt{a^2-x^2}}\;dx = \arcsin(\frac{x}{|a|})$.

A Computer Algebra Aided Proof in Plane Geometry

Given $\Delta ABC$ and two squares $ABEF, ACGH$ in Fig. 1. The squares are sitting on the two sides of $\Delta ABC, AB$ and $AC$, respectively. Both squares are oriented away from the interior of $\Delta ABC$. $\Delta BCP$ is an isosceles right triangle. $P$ is on the same side of $A$. Prove that points $E, P$ and $G$ lie on the same line.

Fig. 1

Introducing rectangular coordinates show in Fig. 2:

Fig. 2

We observe that

$y>0\quad\quad\quad(1)$

$x_1 < -a\quad\quad(2)$

$x_3 > a\quad\quad\quad(3)$

$CG=CA\implies (x-a)^2+y_3^2 = (x-a)^2 +y^2\quad\quad(4)$

$AB=AE\implies (x+a)^2+y^2=(x_1+a)^2+y_1^2\quad\quad(5)$

$CG\perp CA \implies y_3 y = -(x-a)(x_3-a)\quad\quad\quad(6)$

$BE\perp AB \implies y_1y = -(x_1+a)(x+a)\quad\quad\quad(7)$

Fig. 3

Solving system of equations (4), (5), (6), (7), we obtain four set of solutions:

$x_1=-y-a, y_1=x+a, x_3=y+a, y_3=a-x\quad\quad(8)$

$x_1=y-a, y_1=-x-a, x_3=y+a, y_3=a-x\quad\quad(9)$

$x_1=-y-a, y_1=x+a, x_3=a-y, y_3=x-a\quad\quad(10)$

$x_1=y-a, y_1=-x-a, x_3=a-y, y_3=x-a\quad\quad(11)$

Among them, only (10) truly represents the coordinates in Fig. 2.

Fig. 4

By Heron’s formula (see “Had Heron Known Analytic Geometryâ€¦“), the area of triangle with vortex $(-y-a, x+a), (0, a), (y+a, a-x)$ is

$\frac{1}{2}\begin{vmatrix} -y-a & x+a & 1 \\ 0 & a &1 \\ y+a & a-x & 1\end{vmatrix}$.

From Fig. 4, we see that it is zero.

Therefore,

$E, P, G$ lie on the same line.

The reason we do not consider (9), (10), (11) is due to the fact that

(9) contradicts (2) since $y>0, a>0 \implies x_1=y-a=-a+y>-a$.

And,

by (1), (10) and (11) indicate $x_3=a-y which contradicts (3).

Exercise-1 Prove “$E, P, G$ lie on the same line” with complex numbers (hint: see “Treasure Hunt with Complex Numbers“).

A Proof without Trigonometric Function

Problem: $A$ and $B$ are squares. Without invoking trigonometric functions, show that the area of triangle $C$ equals that of $D.$

Solution: Introducing a rectangular coordinate system and complex number $V_1, V_2, P, W_1, W_2, Q:$

Let $A_1, A_2$ denote the area of triangle $C$ and $D$ respectively.

We have

$P = V_2-V_1.\quad\quad\quad(1)$

Let $s_1 = \frac{|V_1| + |V_2| + |P|}{2} \overset{(1)}{=} \frac{|V_1| + |V_2| + |V_2 - V_1|}{2}.$

By Heron’s formula derived without invoking trigonometric function (see “An Algebraic Proof of Heronâ€™s Formula“),

$A_1 = \sqrt{s_1(s_1-|V_1|)(s_1-|V_2|)(s_1-|P|)}\overset{(1)}=\sqrt{s_1(s_1-|V_1|)(s_1-|V_2|)(s_1-|V_2-V_1|)}.\quad(*)$

We also have

$W_1 = \bold{i}V_1, \quad W_2 = -\bold{i}V_2\quad\quad\quad(2)$

(see “Treasure Hunt with Complex Numbers“) and,

$Q = W_2-W_1\overset{(2)}{=}-\bold{i}V_2-\bold{i}V_1.\quad\quad\quad(3)$

Similarly,

Let $s_2 = \frac{|W_1| + |W_2| + |Q|}{2} \overset{(2), (3)}{=} \frac{|iV_1| + |-\bold{i}V_2| +|-\bold{i}V_2-\bold{i}V_1|}{2}=\frac{|V_1| + |V_2| +|V_2+V_1|}{2}.$

$A_2 = \sqrt{s_2(s_2-|W_1|)(s_2-|W_2|)(s_2- |Q|)}$

$\overset{(2), (3)}{=}\sqrt{s_2(s_2-|\bold{i}V_1|)(s_2-|-\bold{i}V_2|)(s_2- |-\bold{i}V_2-\bold{i}V_1|)}.$

That is,

$A_2=\sqrt{s_2(s_2-|V_1|)(s_2-|V_2|)(s_2- |V_2+V_1|)}\quad\quad\quad(**)$

It is shown by Omega CAS Explorer that the expression under the square root of $A_1$ is the same as that of $A_2:$

Therefore,

$A_1 = A_2.$

Exercise-1 The two squares with area 25 and 36 ( see figure below) are positioned so that $AB=7.$ Find the area of triangle TSC.

My Pi

Besides “Wallis’ Pi“, there is another remarkable expression for the number $\pi$ as an infinite product. We derive it as follows:

From the trigonometric identity

$\sin(2x) = 2\sin(x)\cos(x)$,

we have

$\sin(x) = 2\sin(\frac{x}{2})\cos(\frac{x}{2})$

$= 2\cdot 2\sin(\frac{x}{4})\cos(\frac{x}{4}) \cdot\cos(\frac{x}{2})$

$= 2\cdot 2\cdot 2\sin(\frac{x}{8})\cos(\frac{x}{8})\cdot \cos(\frac{x}{4})\cdot \cos(\frac{x}{2})$

$\ddots$

$= 2^n\sin(\frac{x}{2^n})\cdot \prod\limits_{i=1}^{n}\cos(\frac{x}{2^i})$.

That is,

$\sin(x) = 2^n\sin(\frac{x}{2^n})\cdot \prod\limits_{i=1}^{n}\cos(\frac{x}{2^i}).$

Dividing both sides by $x$ yields

$\frac{\sin(x)}{x} = \frac{2^n\sin(\frac{x}{2^n})}{x}\cdot \prod\limits_{i=1}^{n}\cos(\frac{x}{2^i})=\frac{\sin(\frac{x}{2^n})}{\frac{x}{2^n}}\cdot \prod\limits_{i=1}^{n}\cos(\frac{x}{2^i})$

or,

$\prod\limits_{i=1}^{n} \cos(\frac{x}{2^i})=\frac{\sin(x)}{x} /\frac{\sin(\frac{x}{2^n})}{\frac{x}{2^n}}$.

It follows that since $\lim\limits_{n \rightarrow \infty}\frac{\sin(\frac{x}{2^n})}{\frac{x}{2^n}}=1$,

$\lim\limits_{n \rightarrow \infty}\prod\limits_{i=1}^{n} \cos(\frac{x}{2^i})=\lim\limits_{n \rightarrow \infty}\frac{\sin(x)}{x}/\lim\limits_{n \rightarrow \infty}\frac{\sin(\frac{x}{2^n})}{\frac{x}{2^n}}=\frac{\sin(x)}{x}$;

i.e.,

$\frac{\sin(x)}{x}=\lim\limits_{n \rightarrow \infty}\prod\limits_{i=1}^{n} \cos(\frac{x}{2^i}).\quad\quad\quad(1)$

Let

$x = \frac{\pi}{2},$

(1) becomes

$\frac{2}{\pi} =\lim\limits_{n\rightarrow \infty}\prod\limits_{i=1}^{n}\cos(\frac{\pi}{2\cdot2^i})=\lim\limits_{n\rightarrow \infty}\cos(\frac{\pi}{4})\cos(\frac{\pi}{8})...\cos(\frac{\pi}{2\cdot 2^n}).\quad\quad\quad(2)$

We know

$\cos(\frac{\pi}{4}) = \frac{\sqrt{2}}{2}.$

Applying the half-angle formula

$\cos(\frac{x}{2}) = \pm \sqrt{\frac{1+\cos(x)}{2}}$

gives

$\cos(\frac{\pi}{8}) = \sqrt{\frac{1+\cos(\frac{\pi}{4})}{2}} = \frac{\sqrt{2+\sqrt{2}}}{2};$

$\cos(\frac{\pi}{16}) = \sqrt{\frac{1+\cos(\frac{\pi}{8})}{2}} = \frac{\sqrt{2+\sqrt{2+\sqrt{2}}}}{2};$

$\ddots$

Hence,

$\frac{2}{\pi} = \frac{\sqrt{2}}{2} \cdot\frac{\sqrt{2+\sqrt{2}}}{2}\cdot \frac{\sqrt{2+\sqrt{2+\sqrt{2}}}}{2}...\quad\quad\quad(3)$

We compute the value of $\pi$ according to (3):

Fig. 1

Exercise-1 Compute $\pi$ from (1) by letting $x = \frac{\pi}{6}.$

Gotta Catch ‘Em All !

Solving $\frac{d^2y}{dx^2} = \frac{y}{x}\cdot\frac{dy}{dx}.$

Even though ‘contrib_ode’, Maxima’s ODE solver choked on this equation (see “An Alternate Solver of ODEs“), it still can be solved as demonstrated below:

multiplied by $x,$

$x\frac{d^2y}{dx^2} = y\frac{dy}{dx},$

i.e.,

$x\frac{d}{dx}\left(\frac{dy}{dx}\right) = y\frac{dy}{dx}.$

Integrate it, we have

$\int x\frac{d}{dx}\left(\frac{dy}{dx}\right)\;dx = \int y \frac{dy}{dx} \;dx \implies \int \left(\frac{dy}{dx}\right)'\cdot x\;dx = \frac{1}{2}y^2+c.\quad\quad\quad(1-1)$

By $\int u'\cdot v\;dx = u\cdot v - \int u\cdot v'\;dx$ (see “Integration by Parts Done Right“),

$\int \left(\frac{dy}{dx}\right)'\cdot x\;dx = \frac{dy}{dx}\cdot x-\int\frac{dy}{dx}\cdot x'\;dx \overset{x'=1}{=} x\frac{dy}{dx}-\int \frac{dy}{dx}\;dx = x\frac{dy}{dx}-y.$

As a result, (1-1) yields a new ODE

$x\frac{dy}{dx} -y = \frac{1}{2}y^2 + c\quad\quad\quad(1-2)$

or,

$2x\frac{dy}{dx}=2y+y^2+c_1,\quad c_1=2c.\quad\quad\quad(1-3)$

Upon submitting (1-3) to Omega CAS Explorer in non-expert mode, the CAS asks for the range of $c_1.$

Fig. 1

Depending on the range provided, ‘ode2’ gives three different solutions (see Fig. 2, 3 and 4).

Fig. 2 $c_1>1$

Fig. 3 $c_1<1$

Fig. 4 $c_1=1$

Let’s also solve (1-3) manually:

If $y^2+2y+c_1=0,$ (1-3) has a constant solution

$y=c_2.\quad\quad\quad(2-1)$

In fact, this solution can be observed from $\frac{d^2y}{dx^2} = \frac{y}{x}\cdot\frac{dy}{dx}$ right away.

Otherwise ($y^2+2y+c_1 \ne 0$),

$\frac{1}{y^2+2y+c_1}\cdot\frac{dy}{dx}=\frac{1}{2x}.$

That is,

$\frac{1}{y^2+2y+1+c_1-1}\cdot\frac{dy}{dx}=\frac{1}{2x}$

or

$\frac{1}{(y+1)^2+c_1-1}\cdot\frac{dy}{dx}=\frac{1}{2x}.$

For $c_1-1>0,$ let $k=\sqrt{c_1-1},$ we have

$\frac{1}{(y+1)^2+k^2}\cdot\frac{dy}{dx}=\frac{1}{2x}.$

Divide both numerator and denominator on the left side by $k^2$,

$\frac{1}{k^2}\cdot\frac{1}{(\frac{y+1}{k})^2+1}\cdot\frac{dy}{dx}=\frac{1}{2x}.$

Write it as

$\frac{1}{k}\cdot\frac{1}{k}\cdot\frac{1}{(\frac{y+1}{k})^2+1}\cdot\frac{dy}{dx}=\frac{1}{2x}.$

Multiply both sides by $k,$

$\frac{1}{k}\cdot\frac{1}{(\frac{y+1}{k})^2+1}\cdot\frac{dy}{dx}=k\cdot\frac{1}{2x}$

Integrate it,

$\int\frac{1}{k}\cdot\frac{1}{(\frac{y+1}{k})^2+1}\cdot\frac{dy}{dx}\;dx=\int k\cdot\frac{1}{2x}\;dx,$

we obtain

$\arctan(\frac{y+1}{k}) = \frac{k}{2}\log(|x|)+c_2.$

i.e.,

$\arctan(\frac{y+1}{\sqrt{c_1-1}}) = \frac{\sqrt{c_1-1}}{2}\log(|x|)+c_2$

or,

$y = 2k_1\tan(k_1\log|x| +k_2) -1\quad\quad\quad(2-2)$

where $k_1=\frac{\sqrt{c_1-1}}{2}, k_2=c_2.$

For $c_1-1<0,$ let $k=\sqrt{1-c_1},$

$\frac{1}{(y+1)^2-k^2}\cdot\frac{dy}{dx}=\frac{1}{2x}$

$\frac{1}{(y+1-k)\cdot(y+1+k)}\cdot\frac{dy}{dx}=\frac{1}{2x}$

$\frac{1}{2k}\left(\frac{1}{y+1-k} - \frac{1}{y+1+k}\right)\cdot\frac{dy}{dx}= \frac{1}{2x}$

$\int \left(\frac{1}{y+1-k} - \frac{1}{y+1+k}\right)\cdot\frac{dy}{dx}\;dx= \int\frac{k}{x}\;dx$

$\log|y+1-k| - \log|y+1+k| = k\cdot\log|x| + c_2$

$\log\bigg|\frac{y+1-k}{y+1+k}\bigg| = k\cdot\log|x| + c_2$

$\log\bigg|\frac{y+1-\sqrt{1-c_1}}{y+1+\sqrt{1-c_1}}\bigg| = \sqrt{1-c_1}\cdot\log|x| + c_2$

$y= -\frac{k_2(1+k_1)|x|^{k_1}+k_1-1}{k_2|x|^{k_1}-1}, \quad k_1=\sqrt{1-c_1}, k_2=e^{c_2}.\quad\quad\quad(2-3)$

For $c_1-1=0 \quad(c_1=1),$

$\frac{1}{(y+1)^2}\cdot\frac{dy}{dx}=\frac{1}{2x}$

$\int \frac{1}{(y+1)^2}\cdot\frac{dy}{dx}\;dx=\int \frac{1}{2x}\;dx$

$-\frac{1}{y+1} = \frac{1}{2}\log|x| +c_2$

$y+1 = \frac{-1}{\frac{1}{2}\log|x|+c_2}$

$y = -1 - \frac{1}{\frac{1}{2}\log|x|+c_2}.\quad\quad\quad(2-4)$

Notice when $c_1 = 0, c=0.$ (1-2) becomes

$\frac{dy}{dx} - \frac{1}{x}y = \frac{1}{2x}y^2.$

This is a Bernoulli’s Equation $\frac{dy}{dx}+f(x)y=g(x)y^{\alpha}$ with $f(x)=\frac{1}{x}, g(x)=\frac{1}{2x}$ and $\alpha=2.$ Solving it (see “Meeting Mr. Bernoulli“),

$y^{1-2} = e^{(2-1)\int -\frac{1}{x}\;dx}\cdot\left((1-2)\int e^{-(2-1)\int-\frac{1}{x}\;dx} \cdot \frac{1}{2x}\;dx+c\right)$

$= e^{-\log|x|}\cdot\left(-\int e^{\log|x|} \frac{1}{2x}\;dx +c\right)$

$= \frac{1}{|x|}\cdot\left(-\int |x|\cdot\frac{1}{2x}\;dx + c\right)$

$= \frac{1}{|x|}\cdot\left(-\int (\pm x)\cdot\frac{1}{2x}\;dx+c\right)$

$= \frac{1}{|x|}\cdot\left(-(\pm)\int \frac{1}{2}\;dx + c\right)$

$= \frac{1}{|x|}\cdot\left(-\frac{1}{2}(\pm x) + c\right)$

$= \frac{1}{|x|}\cdot\left(-\frac{1}{2}|x|+c\right)$

$= -\frac{1}{2} + \frac{c}{|x|}$

$\frac{1}{y} = -\frac{1}{2} + \frac{c}{|x|}\implies y = \frac{-2|x|}{|x|-2c}.\quad\quad\quad(3-1)$

Since $c_1 =0 \implies c_1-1=0-1 = -1 <0,$ we can verify (3-1) as follows:

substitute $c_1=0$ into (2-3),

$y = -\frac{k2(1+\sqrt{1-0})|x|^{\sqrt{1-0}}+\sqrt{1-0}-1}{k_2|x|-1}=-\frac{2k_2|x|}{k_2|x|-1}\overset{k_2=\frac{1}{2c}}{=}\frac{-2|x|}{|x|-2c}.$

Unsurprisingly, this is the same as (3-1).

Exercise-1 Mathematica solves $\frac{d^2y}{dx^2} = \frac{y}{x}\cdot\frac{dy}{dx}:$

But it only return one solution. Show that it is equivalent to (2-2).

Exercise-2 Solving (1-2) using ‘contrib_ode’.

Exercise-3 Show that (2-2), (2-3) and (2-4) are equivalent to results shown in Fig. 2, 3 and 4 respectively.

Integral: I vs. CAS

Evaluate $\displaystyle\int\frac{\sqrt{1+p^2}}{p}\;dp$

Let

$u = \sqrt{1+p^2},\quad\quad\quad(1)$

we have

$u^2=1+p^2 \implies p^2=u^2-1 \implies p =\pm\sqrt{u^2-1} \quad\quad\quad(2)$

and

$\frac{dp}{du}= \pm\frac{1}{2}\cdot\frac{2u}{\sqrt{u^2-1}} =\pm \frac{u}{\sqrt{u^2-1}}.\quad\quad\quad(3)$

Consequently,

$\int\frac{\sqrt{1+p^2}}{p}\;dp$

$\overset{(1), (2)}{=} \int \frac{u}{\pm\sqrt{u^2-1}}\cdot\frac{dp}{du}\;du$

$\overset{(3)}{=}\int \frac{u}{\pm\sqrt{u^2-1}}\cdot(\pm\frac{u}{\sqrt{u^2-1}})\;du$

$= \int\frac{u^2}{u^2-1}\;du$

$= \int \frac{u^2-1+1}{u^2-1}\;du$

$= \int du + \int \frac{1}{u^2-1}\;du$

$= u +\int \frac{1}{2}\left(\frac{1}{u-1}-\frac{1}{u+1}\right)\;du$

$= u+\frac{1}{2}\log\frac{u-1}{u+1}$

$= u + \frac{1}{2}\log\frac{(u-1)^2}{u^2-1}$

$= \sqrt{1+p^2} + \frac{1}{2}\log\frac{\sqrt{p^2+1}-1)^2}{p^2+1-1}$

$=\sqrt{1+p^2}+\frac{1}{2}\log\frac{(\sqrt{p^2+1}-1)^2}{p^2}$

$=\sqrt{1+p^2}+\log\frac{\sqrt{|p|^2+1}-1}{|p|}$

$= \sqrt{1+p^2} +\log\frac{(\sqrt{p^2+1}-1)(\sqrt{p^2+1}+1)}{|p|(\sqrt{p^2+1}+1)}$

$= \sqrt{1+p^2} + \log\frac{p^2+1-1}{|p|(\sqrt{p^2+1}+1)}$

$= \sqrt{1+p^2} + \log\frac{p^2}{|p|(\sqrt{1+p^2}+1)}$

$\overset{p^2=|p|^2}{=} \sqrt{1+p^2} + \log\frac{|p|}{\sqrt{p^2+1}+1}$

$= \sqrt{1+p^2} + \log\left(\frac{\sqrt{1+p^2}+1}{|p|}\right)^{-1}$

$= \sqrt{1+p^2} - \log\frac{\sqrt{1+p^2}+1}{|p|}$

$=\sqrt{1+p^2}-\log(\sqrt{\frac{1}{|p|^2} + \frac{p^2}{|p|^2}} +\frac{1}{|p|})$

$\overset{|p|^2=p^2}{=}\sqrt{1+p^2} - \log(\sqrt{(\frac{1}{|p|})^2 + 1} + \frac{1}{|p|})$

From “Deriving Two Inverse Functions“:

$\mathrm{arcsinh}(x) = \log(\sqrt{x^2+1} + x), x\in (-\infty, \infty).$

Therefore,

$\int\frac{\sqrt{1+p^2}}{p}\;dp = \sqrt{1+p^2} - \mathrm{arcsinh}\left(\frac{1}{|p|}\right).\quad\quad\quad(*)$

Had we written $\int\frac{1}{u^2-1}\;du$ as $\int-\frac{1}{2}(\frac{1}{u+1}-\frac{1}{u-1})\;du,$ we would have

$\int du + \int\frac{1}{u^2-1}\;du$

$= u -\frac{1}{2}\int(\frac{1}{u+1}-\frac{1}{u-1})\;du$

$= u-\frac{1}{2}(\log(u+1)-\log(u-1))$

$= u-\frac{1}{2}\log\frac{u+1}{u-1}$

$= u-\frac{1}{2}\log\frac{(u+1)(u+1)}{(u-1)(u+1)}$

$= u-\frac{1}{2}\log\frac{(u+1)^2}{u^2-1}$

$= \sqrt{1+p^2}-\frac{1}{2}\log\frac{(\sqrt{1+p^2} + 1)^2}{1+p^2-1}$

$= \sqrt{1+p^2}-\frac{1}{2}\log\frac{(\sqrt{1+p^2}+1)^2}{p^2}$

$= \sqrt{1+p^2}-\log\frac{\sqrt{1+p^2}+1}{|p|}$

$= \sqrt{1+p^2}-\log(\sqrt{1+(\frac{1}{|p|})^2}+\frac{1}{|p|})$

$= \sqrt{1+p^2}-\mathrm{arcsinh}(\frac{1}{|p|}),$

the same as (*).

How i Was Born

In Memory of Johann Weilharter (1953-2021)

Girolamo Cardano (1501-76) was an Italian intellect whose interests and proficiencies ranged through those of mathematician, physician, biologist, physicist, chemist, astrologer, astronomer, philosopher, writer, and gambler.

While conducting research on solving algebraic equations, Cardano discovered that by means of a suitable substitution, the general cubic equation

$y^3+by^2+cy+d=0$

can be simplified. His substitution is $y = x-\frac{b}{3}$, which yields

$(x-\frac{b}{3})^3 + b(x-\frac{b}{3})^2+c(x-\frac{b}{3})+d =0.$

Upon expanding and rearrange the terms, this becomes

$x^3+px=q,$

a depressed cubic (without the $x^2$ term) where $p = c-\frac{b^2}{3}, q = -d+\frac{bc}{3}-\frac{2b^3}{27}.$

Cadano applied this substitution in solving cubic equation $y^3-15y^2+81y-175=0:$

Substituting $y=x-(-15/3) = x+5$ into the cubic in $y$, he obtained a depressed cubic in $x.$ namely,

$x^3+6x=20.$

Without a formula for this simplified equation, Cardano proceeded to solve it by way of ad hoc factoring:

$x^3+6x-20$

$= x^3-2x^2+2x^2+6x-20$

$= x^3-2x^2+2x^2-4x+10x-20$

$= x^2(x-2)+2x(x-2)+10(x-2)$

$= (x-2)(x^2+2x+10).$

Clearly, $x=2$ is a solution to $x^3+6x=20.$

Applying the quadratic formula to $x^2+2x+10=0$ gave $\frac{-2 \pm \sqrt{-36}}{2}.$ But this expression was immediately dismissed (for Cardano knew $x^2+2x+10=0$ has no real solution).

Therefore, $y=x+5 = 2+5=7$ is the only solution to the original cubic equation.

$x^2+2x+10=0$ has no solution

Cardano also solved $y^3+3y^2-12y-18=0$ in a similar fashion:

Obtaining first the depressed cubic (with $y=x-1$)

$x^3-15x=4.$

Next is the ad hoc factoring again:

$x^3-15x-4$

$= x^3-4x^2+4x^2-15x-4$

$= x^3-4x^2+4x^2-15x-4$

$= x^3-4x^2+4x^2-16x+x-4$

$= x^2(x-4)+4x(x-4)+(x-4)$

$= (x-4)(x^2+4x+1).$

Surely,

$(x-4)(x^2+4x+1)=0 \implies x=4$ is a solution.

Furthermore, two additional solutions: $x = \frac{-4\pm\sqrt{4^2-4}}{2} = -2\pm\sqrt{3}$ were obtained by applying the quadratic formula to $x^2+4x+10=0.$

$x^3-15x=4$ has three solutions: $4, -2+\sqrt{3}, -2-\sqrt{3}$

But Cardano did not like the ad hoc factoring. He wanted a formula that readily solves the depressed cubic $x^3+px=q$, one that resembles the formula for the quadratics (see “Deriving the quadratic formula without completing the square“).

His relentless search for such a formula took many years (see William Dunham’s “Journey through genuis“) but, lo and behold, he found one:

$x = \sqrt[3]{\frac{q}{2}+\sqrt{\frac{q^2}{4} + \frac{p^3}{27}}} - \sqrt[3]{-\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}\quad\quad\quad(*)$

To be clear, (*) is not Cardano’s own making. The formula bears the name ‘Cardano’s formula’ today only because Cardano was the one who published it in his 1545 book “Ars Magna” but without its derivation. However, in a chapter titled “On the Cube and First Power Equal to the Number”, Cardano did give acknowledgement to Scipio del Ferro and Niccolo Fontana, who had independently derived (*) around 1515, but had kept the knowledge away from the public.

We derive (*) as follows:

Consider an algebraic identity that reminiscent of the depressed cubic $x^3+px=q.$ Namely,

$(u-v)^3+\underbrace{3uv}_{p}(u-v)=\underbrace{u^3-v^3}_{q}.$

It suggests that if we can determine the quantity $u$ and $v$ in terms of $p$ and $q$ from

$\begin{cases} 3uv = p \\u^3-v^3=q\end{cases}\quad\quad\quad(1-1, 1-2)$

then $u-v$ is a solution to $x^3+px=q.$

Asume $u \ne 0$, (1-1) gives

$v = \frac{p}{3u}.$

Substituting this into (1-2) yields

$u^3-\frac{p^3}{27u^3}=q.$

Multply both sides by $u^3$ and rearrange terms, we have a sixth-degree equation:

$u^6-qu^3-\frac{p^3}{27} =0.$

But it is also quadratic in$u^3$.

$(u^3)^2-qu^3-\frac{p^3}{27} = 0.$

Therefore, using the formula for quadratics,

$u^3 = \frac{q}{2}\pm\sqrt{\frac{q^2}{4} + \frac{p^3}{27}}\implies u =\sqrt[3]{\frac{q}{2}\pm\sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}.$

There are two cases to consider.

For

$u =\sqrt[3]{\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}},\quad\quad\quad(1-3)$

we have $v^3 \overset{(1-2)}{=} u^3-q = \frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}-q,$ i.e.,

$v = \sqrt[3]{-\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}.\quad\quad\quad(1-4)$

It follows that

$x \overset{(*)}{=} u-v \overset{(1-3), (1-4)}{=} \sqrt[3]{\frac{q}{2}+\sqrt{\frac{q^2}{4} + \frac{p^3}{27}}} - \sqrt[3]{-\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}\quad\quad\quad(1-5)$

For $u =\sqrt[3]{\frac{q}{2} - \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}, \;v=\sqrt[3]{-\frac{q}{2} -\sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}.$

$x = u-v = \sqrt[3]{\frac{q}{2} - \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}-\sqrt[3]{-\frac{q}{2} -\sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}$

$= -\sqrt[3]{-\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}} + \sqrt[3]{\frac{q}{2} +\sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}$

$= \sqrt[3]{\frac{q}{2}+\sqrt{\frac{q^2}{4} + \frac{p^3}{27}}} - \sqrt[3]{-\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}},$

the same as (1-5).

If $u=0,$ we see that on the one hand,

$\left(p \overset{(1-1)}{=} 0 \implies v \overset{(1-2)}{=} -\sqrt[3]{q}\right) \implies u-v = 0-(-\sqrt[3]{q}) =\sqrt[3]{q}.$

On the other hand, letting $p =0$ in (*) yields

$u-v = \sqrt[3]{\frac{q}{2}+\sqrt{\frac{q^2}{4} + 0}} -\sqrt[3]{-\frac{q}{2} + \sqrt{\frac{q^2}{4} + 0}}$

$= \sqrt[3]{\frac{q}{2}+\frac{|q|}{2}} -\sqrt[3]{-\frac{q}{2} + \frac{|q|}{2}}$

$= \begin{cases} \sqrt[3]{\frac{q}{2}+\frac{q}{2}} - \sqrt[3]{-\frac{q}{2}+\frac{q}{2}} = \sqrt[3]{q}, \;q \ge 0\\ \sqrt[3]{\frac{q}{2}-\frac{q}{2}} - \sqrt[3]{-\frac{q}{2}-\frac{q}{2}} = \sqrt[3]{q},\;q<0\end{cases}$

Cardano first tested (*) on cubic $x^3+6x=20$ by letting $p=6, q=20.$. The formula yields

$x = \sqrt[3]{\frac{20}{2}+\sqrt{\frac{20^2}{4} + \frac{6^3}{27}}} - \sqrt[3]{-\frac{20}{2} + \sqrt{\frac{20^2}{4} + \frac{6^3}{27}}}= \sqrt[3]{10+\sqrt{108}} - \sqrt[3]{-10+\sqrt{108}}.$

It came as a surprise to Cardano initially. But he quickly realized that this sophisticated looking expression is nothing more than “2”, the unique solution of $x^3+6x=20$, in disguise.

Today, this is easily checked by a CAS:

For a mathematical proof, see “A Delightful Piece of Mathematics“.

Cardano then tested the formula on cubic $x^3-15x=4.$ Substituting $p = -15, q=4$ into it gave

$x = \sqrt[3]{2+\sqrt{-121}} - \sqrt[3]{-2+\sqrt{-121}}\quad\quad\quad(**)$

He was startled by the result!

The presence of $\sqrt{-121}$ alone did not surprise him for he had seen negative number under the square root before (while solving $x^2+2x+10=0,$ a quadratic clearly has no solution). What really perplexed Cardano this time was the fact that square root of negative number appearing in the result for a cubic that has three real solutions!

Cardano thus sought the value of $\sqrt[3]{2+\sqrt{-121}} - \sqrt[3]{-2+\sqrt{-121}}$ to see which solution, amongst $4, -2+\sqrt{3}$ and $-2+\sqrt{3}$ it represents.

He started with $\sqrt[3]{2+\sqrt{-121}}$. At once, Cardano noticed that $2+\sqrt{-121}$ is a number in the form of

$a+\sqrt{-b}.$

And he speculated that the result of calculating $\sqrt[3]{2+\sqrt{-121}}$ has the same manner.

So Cardano wanted to find $a$ and $b$ such that

$\sqrt[3]{2+\sqrt{-121}} = a+\sqrt{-b}.$

He proceeded as follows:

Cubing both sides gives

$2+\sqrt{-121} = a^3 +3a^2\sqrt{-b}-3ab-b\sqrt{-b} = a^3-3ab+3a^2\sqrt{-b}-b\sqrt{-b}.$

Equating the similar parts on both sides yields a system of nonlinear algebraic equations

$\begin{cases} a^3-3ab=2 \\ 3a^2\sqrt{-b}-b\sqrt{-b} = \sqrt{-121} \end{cases}\quad\quad\quad(1-6, 1-7)$

Squaring both (1-6) and (1-7) gives:

$\begin{cases} a^6-6a^4b+9a^2b^2=4 \\ -9a^4b+6a^2b^2-b^3=-121\end{cases}\quad\quad\quad(1-8, 1-9)$

and subtracting (1-9) from (1-8) results in

$a^6+3a^4b+3a^2b^2+b^3 =125 \implies (a^2+b)^3 = 125\implies a^2+b=5$

or,

$b = 5-a^2.$

Substituting it back into (1-6) yields

$4a^3-15a=2 \implies a^3 = \frac{15}{4}a + \frac{1}{2}.$

And so,

$a^3-\frac{15}{4}a = \frac{1}{2}$

This is a depressed cubic with $p=-\frac{15}{4}, q=\frac{1}{2}.$ By Cardano’s formula,

$a=\sqrt[3]{\frac{1}{4} + \sqrt{\frac{1}{4}(\frac{1}{2})^2 + \frac{1}{27}(\frac{-15}{4})^3}}-\sqrt[3]{-\frac{1}{4} + \sqrt{\frac{1}{4}(\frac{1}{2})^2 + \frac{1}{27}(\frac{-15}{4})^3}}$

$=\sqrt[3]{\frac{1}{4} + \sqrt{\frac{1}{16} - \frac{3375}{27\cdot64}}}-\sqrt[3]{-\frac{1}{4} + \sqrt{\frac{1}{16} - \frac{3375}{27\cdot64}}}$

$=\sqrt[3]{\frac{1}{4} + \sqrt{\frac{1}{16}-\frac{3375}{1728}}}-\sqrt[3]{-\frac{1}{4} + \sqrt{\frac{1}{16}-\frac{3375}{1728}}}$

That is,

$a =\sqrt[3]{\frac{1}{4} + \sqrt{\underline{-\frac{121}{64}}}}-\sqrt[3]{-\frac{1}{4} + \sqrt{\underline{-\frac{121}{64}}}}$

So solving $4a^3-15a=2$ for $a$ by Cardano’s formula resulting in having to calculate another square root of a negative number. Cardano was put right back to where he had started. With the frustration he called the cubic “irreducible” and pursued the matter no further.

It would be another generation before Rafael Bombelli (1576-72) took upon the challenge of calculating $\sqrt[3]{2+\sqrt{-121}}$ again.

Bombelli’s was an engineer who knew how to drain the swampy marshes, and only between his engineering projects was he actively engaged in mathematics. Being practical and sound minded, he read the near-mystical $\sqrt{-121}$ not as the square root of a negative number but a symbolic representation for a new type of number that extends the real number. He imagined a set for a new type of number that

[1] Has every real number as its member.

[2] The arithmetic operations ($+, \cdot$) are so defined that the commutative, associative and distributive law are obeyed.

[3] There is a member $\bold{i}$ such that $\bold{i}\cdot\bold{i} = -1.$ i.e.,

$\bold{i}^2=-1.\quad\quad\quad(2-1)$

Bombelli sanity checked his idea by consider any quadratic equation

$ax^2+bx+c=0.$

That is

$x^2+2hx+g=0$

where $g=\frac{c}{a}, h=\frac{b}{2a}$ which can be written as

$(x+h)^2+g-h^2=0\quad\quad\quad(2-2)$

or,

$(x+h)^2=h^2-g.$

if $h^2-g$ is positive, then it has a square root, and $-h + \sqrt{h^2-g}$ is a solution of the equation (so is the number $-h-\sqrt{h^2-g}).$ If $h^2-g$ is not positive, then $g-h^2$ is, and therefore has a square root $\sqrt{g-h^2}.$

Let

$x = -h + \sqrt{g-h^2}\cdot \bold{i}.\quad\quad\quad(2-3)$

The left side of (2-2) becomes

$(\underline{-h+\sqrt{g-h^2}\cdot \bold{i}}+h)^2+g-h^2$

$= (g-h^2)\cdot \bold{i}^2 +g-h^2$

$=(g-h^2)\cdot(\bold{i}^2+1)$

$\overset{[3]}{=}(g-h^2)\cdot (-1+1)$

$=(g-h^2)\cdot 0$

$= 0$

That is, (2-3) is a solution of (2-2).

Bombelli was elated as it suggested that by considering his set which contains the real numbers and $\bold{i},$ all quadratic equations have solutions!

It also gave him much needed confidence in showing what $\sqrt[3]{2+\sqrt{-121}} - \sqrt[3]{-2+\sqrt{-121}}$ really is.

Right away, Bombelli saw

$(\sqrt{121}\cdot\bold{i})^2\overset{[1],[2]}{=}(\sqrt{121})^2\cdot\bold{i}^2 \overset{[3]}{=} 121\cdot (-1) = -121$

so he replaced $\sqrt{-121}$ in $\sqrt[3]{2+\underline{\sqrt{-121}}}$ with $\sqrt{121}\cdot\bold{i}:$

$\sqrt[3]{2+\sqrt{-121}}=\sqrt[3]{2+\sqrt{121}\cdot\bold{i}} = \sqrt[3]{2+11\cdot\bold{i}}.$

He then anticipated that the value of $\sqrt[3]{2+11\cdot\bold{i}}$ is a new type of number $a+b\cdot\bold{i}$ where $a$ and $b$ are real numbers. i.e.,

$\sqrt[3]{2+11\cdot\bold{i}} = a + b\cdot \bold{i},\quad a,b \in R.\quad\quad\quad(3-1)$

And finally, he proceeded to find $a$ and $b$ from (3-1).

As an illustration, we solve (3-1) for $a, b$ as follows:

Cubing it gives

$2+11\cdot\bold{i} = (a+b\cdot\bold{i})^3.$

Since

$(a+b\cdot \bold{i})^3 = a^3+3a^2(b\bold{i})+3a(b\bold{i})^2+(b\cdot\bold{i})^3$

$=a^3+3a^2b\bold{i}+3ab^2\bold{i}^2+b^3\bold{i}^2\bold{i}$

$\overset{[3]}{=}a^3+3a^2b\bold{i}-3ab^2-b^3\bold{i}$

$= a^3-3ab^2 + (3a^2b-b^3)\cdot\bold{i},$

this is

$2+11\cdot\bold{i} = a^3-3ab^2 + (3a^2b-b^3)\cdot\bold{i}.$

Equating similar terms on both sides yields a system of nonlinear equations:

$\begin{cases} a^3-3ab^2=2 \\ 3a^2b-b^3=11 \end{cases}$

After factoring, it becomes

$\begin{cases} a(a^2-3b^2)=2 \\ b(3a^2-b^2)=11 \end{cases}\quad\quad\quad(3-2, 3-3)$

Assuming $a$ and $b$ are both integers, then $a$ and $a^2-3b^2$ on the left side of (3-2) are two integer factors of $2.$ Since $2$ has only two factors, namely, $1$ and $2.$ If $a=1$ then from (3-1), $1\cdot(1-3b^2) =2 \implies b^2 < 0,$ a contradiction. However, $(a=2, 2(4-b^2)=2)$ yields $b=-1$ or $+1.$ While $(a=2, b=-1) \implies b(3a^2-b^2)=(-1)\cdot(3\cdot 2^2-(-1)^2)=-11$ contradicts (3-3), $(a=2,b=1)$ gives $1\cdot(3\cdot 2^2-1^2)=11.$ Therefore, $a=2, b=1$ is the solution to (3-2, 3-3). i.e.,

$\sqrt[3]{2+\sqrt{-121}} = 2+\bold{i}.\quad\quad\quad(3-4)$

It is also easy to see that (3-4) is true as follows:

$(2+\bold{i})^3=2^3+3\cdot 2^2\cdot \bold{i}+ 3\cdot 2\cdot \bold{i}^2+\bold{i}^3$

$= 8 + 12\cdot \bold{i} +6\cdot \bold{i}^2 + \bold{i}^2\cdot \bold{i}$

$\overset{[3]}{=} 8 + 12\cdot \bold{i}-6-\bold{i}$

$= 2 + 11\cdot \bold{i}$

$= 2 + \sqrt{121}\cdot \bold{i}$

$= 2+\sqrt{-121}.$

And so

$2 + \sqrt{-121} = (2+\bold{i})^3 \implies \sqrt[3]{2+\sqrt{-121}} = 2 + \bold{i}.$

Similarly, Bombelli obtained (see Exercise-1)

$\sqrt[3]{-2+\sqrt{-121}} = -2+\bold{i}.\quad\quad\quad(3-5)$

By (3-4) and (3-5) Bombelli was able to reproduce the solution to cubic $x^3-15x=4$:

$x = \sqrt[3]{2+\sqrt{-121}}-\sqrt[3]{-2+\sqrt{-121}}=2+\bold{i}-(-2+\bold{i})=4.$

Thus, with $\bold{i}$ and the ordinary rules of real numbers’ arithmetic, Bombelli broke the mental logjam concerning negative number under the square root.

Satisfied with his work that unlocked what seemed to be an impassable barrier, Bombelli moved on without constructing his set for the new type of number in a logically unobjectionable way. The world had to wait another two hundred years for that (see “Mr. Hamilton does complex numbers”). Still, Bombelli deserves the credit for not only recognizing numbers of a new type have a role to play in algebra, but also giving $\bold{i}$ its initial impetus and now undisputed legitimacy.

Exercise-1 Show that $\sqrt[3]{-2+\sqrt{-121}} = -2+\bold{i}.$

How to solve a quartic equation

Begin with a general quartic equation

$x^4+bx^3+cx^2+dx+e=0,\quad\quad\quad(*)$

depress it using the substitution

$x = y - \frac{b}{4},$

creates a new quartic equation (without the $y^3$ term) in $y:$

$y^4+qy^2+ry+s=0\quad\quad\quad(**)$

where

$\begin{cases}q=c-\frac{3b^2}{8}\\r=d-\frac{bc}{2}+\frac{b^3}{8}\\s=e-\frac{bd}{4}+\frac{b^2c}{16}-\frac{3b^4}{256}\end{cases}$

When $r=0,$ i.e., $d-\frac{bc}{2}+\frac{b^3}{8}=0,$ the quartic equation in $y$ becomes a quadratic equation in $y^2:$

$(y^2)^2+qy^2+s=0.$

It follows that

$y^2 = \frac{-q\pm \sqrt{q^2-4s}}{2} \implies y=\pm\sqrt{\frac{-q\pm\sqrt{q^2-4s}}{2}}\implies x=y-\frac{b}{2}.$

For example, to solve quartic equation $x^4+2x^3-3x^2-4x+4=0$, depress it using the substitution $x = y-\frac{1}{2},$ we obtain

$y^4-\frac{9}{2}y^2+\frac{81}{16}=0.$

This is a quadratic equation in $y^2:$

$(y^2)^2-\frac{9}{2}y^2+\frac{81}{16}=0.$

Therefore,

$y^2 = \frac{\frac{9}{2} \pm \sqrt{(\frac{9}{2})^2-4\cdot 1\cdot \frac{81}{16}}}{2}=\frac{9}{4}\implies y = \pm\sqrt{\frac{9}{4}} = \pm\frac{3}{2}.$

Consequently,

$x_1 = \frac{3}{2}-\frac{1}{2} = 1, x_2=-\frac{3}{2}-\frac{1}{2} = -2.$

In general, we solve the depressed quartic equation as follows:

Substituting $u+v+w$ for $y$ in the left side of (**) yields

$y^4+qy^2+ry+s$

By $\begin {cases} y^2 = (u+v+w)^2=u^2+v^2+w^2+2(uv+uw+vw),\\ y^4 = (y^2)^2 = \left((u^2+v^2+w^2)+2(uv+uw+vw)\right)^2 \\= (u^2+v^2+w^2)^2+4(u^2+v^2+w^2)(uv+uw+vw) + 4(uv+uw+vw)^2 \\= (u^2+v^2+w^2)^2+2(u^2+v^2+w^2)\cdot 2(uv+uw+vw) + 4(uv+uw+vw)^2\end {cases}$

$= \underbrace{(u^2+v^2+w^2)^2 + 4(u^2+v^2+w^2)(uv+uw+vw)+4(uv+uw+vw)^2}_{y^4}+ q\underbrace{(u^2+v^2+w^2+2(uv+uw+vw))}_{y^2}+ r\underbrace{(u+v+w)}_{y}+s$

$= (u^2+v^2+w^2)^2+4(u^2+v^2+w^2)(uv+uw+vw)+4(uv+uw+vw)^2 + +q(u^2+v^2+w^2)+2q(uv+vw+uw) + r(u+v+w)+s$

$= (u^2+v^2+w^2) +q(u^2+v^2+w^2) + 4(u^2+v^2+w^2)(uv+uw+vw) + 2q(uv+uw+vw) +4(uv+uw+vw)^2 + r(u+v+w)+s$

$= (u^2+v^2+w^2) + q(u^2+v^2+w^2) + 2(uv+uw+vw)(2(u^2+v^2+w^2) + q) +4(u^2v^2+u^2w^2+v^2w^2 + 2u^2vw + 2v^2uw +2w^2uv) + q(u^2+v^2+w^2)+r(u+v+w)+s$

$= (u^2+v^2+w^2) + q(u^2+v^2+w^2) + 2(uv+uw+vw)(2(u^2+v^2+w^2) + q) +4(u^2v^2+u^2w^2+v^2w^2) + 8u^2vw + 8v^2uw +8w^2uv) + q(u^2+v^2+w^2)+r(u+v+w)+s$

$= u^2+v^2+w^2) + q(u^2+v^2+w^2) + 2(uv+uw+vw)(2(u^2+v^2+w^2) + q) +4(u^2v^2+u^2w^2+v^2w^2) + 8u^2vw + 8v^2uw +8w^2uv + r(u+v+w)+s$

$=(u^2+v^2+w^2) + q(u^2+v^2+w^2) + 2(uv+uw+vw)(2(u^2+v^2+w^2) + q) +4(u^2v^2+u^2w^2+v^2w^2) + 8uvw(u + v + w) + r(u+v+w)+s$

$= (u^2+v^2+w^2) + q(u^2+v^2+w^2) + 2(uv+uw+vw)(\underline{2(u^2+v^2+w^2) + q}) +4(u^2v^2+u^2w^2+v^2w^2) + (\underline{8uvw+r})(u + v + w) +s$

If $\begin{cases} 2(u^2+v^2+w^2) + q=0 \\ 8uvw + r=0\end{cases}\quad\quad\quad(1)$

$=(u^2+v^2+w^2)^2+q(u^2+v^2+w^2) + 4(u^2v^2+u^2w^2+v^2w^2)+s$

Since $(1) \implies \begin{cases} u^2+v^2+w^2 = -\frac{q}{2}\\ uvw = -\frac{r}{8}\end{cases}\quad\quad\quad(2)$

$= (-\frac{q}{2})^2 + q \cdot (-\frac{q}{2}) + 4(u^2v^2+u^2w^2+v^2w^2)+s$

$= \frac{q^2}{4} - \frac{q^2}{2} + 4(u^2v^2+u^2w^2+v^2w^2)+s$

$= -\frac{q^2}{4} + s + 4(u^2v^2+u^2w^2+v^2w^2)$

$= -\frac{q^2-4s}{4} + 4(\underline{u^2v^2+u^2w^2+v^2w^2})$

If $u^2v^2 + u^2w^2+v^2w^2 = \frac{q^2-4s}{16}\quad\quad\quad(3)$

$= 0.$

It means that $u+v+w$ is a solution of $(**)$ if

$\begin{cases} u^2+v^2+w^2=-\frac{q}{2} \\ u^2v^2+u^2v^2+v^2w^2=\frac{q^2-4s}{16}\\ uvw=-\frac{r}{8}\end{cases}\quad\quad\quad(4-1, 4-2, 4-3)$

Moreover, squaring (4-3) gives

$\begin{cases} u^2+v^2+w^2=-\frac{q}{2} \\ u^2v^2+u^2v^2+v^2w^2=\frac{q^2-4s}{16}\\ u^2v^2w^2=\frac{r^2}{64}\end{cases}\quad\quad\quad(5-1, 5-2, 5-3)$

By Vieta’s theorem, $u^2, v^2, w^2$ satisfying (5-1, 5-2, 5-3) are the three solutions of cubic equation

$z^3+\frac{q}{2}z^2+\frac{q^2-4s}{16}z-\frac{r^2}{64}= 0.$

(See “How to solve a cubic equation“)

Suppose the three solutions are $z_1, z_2, z_3,$ we have

$u^2=z_1 \implies u = \pm\sqrt{z_1}, v^2 = z_2 \implies v = \pm\sqrt{z_2}, w^2=z_3 \implies w=\pm \sqrt{z_3}.$

Clearly, there are eight combinations of $u,v,w:$

$\begin{cases} u=\sqrt{z_1} \\ v= \sqrt{z_2} \\w=\sqrt{z_3} \end{cases} \begin{cases} u=\sqrt{z_1} \\ v= \sqrt{z_2} \\w=-\sqrt{z_3} \end{cases} \begin{cases} u=\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=\sqrt{z_3} \end{cases} \begin{cases} u=\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=-\sqrt{z_3} \end{cases}$

$\begin{cases} u=-\sqrt{z_1} \\ v= \sqrt{z_2} \\w=\sqrt{z_3} \end{cases} \begin{cases} u=-\sqrt{z_1} \\ v= \sqrt{z_2} \\w=-\sqrt{z_3} \end{cases} \begin{cases} u=-\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=\sqrt{z_3} \end{cases} \begin{cases} u=-\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=-\sqrt{z_3} \end{cases}$

Among them, only four are valid due to constraint (4-3) placed on the product $u\cdot v\cdot w.$

From (5-3), we see $uvw = \sqrt{z_1}\sqrt{z_2}\sqrt{z_3}= \pm\frac{r}{8}.$

If $\sqrt{z1}\sqrt{z_2}\sqrt{z_3} = +\frac{r}{8},$ the valid ones are:

$\begin{cases} u=\sqrt{z_1} \\ v= \sqrt{z_2} \\w=-\sqrt{z_3} \end{cases}$ since $uvw=\sqrt{z_1}\cdot \sqrt{z_2}\cdot -\sqrt{z_3}=-\sqrt{z_1}\sqrt{z_2}\sqrt{z_3} = -\frac{r}{8}$

$\begin{cases} u=\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=\sqrt{z_3} \end{cases}$ since $uvw=\sqrt{z_1}\cdot -\sqrt{z_2}\cdot \sqrt{z_3}=-\sqrt{z_1}\sqrt{z_2}\sqrt{z_3} = -\frac{r}{8}$

$\begin{cases} u=-\sqrt{z_1} \\ v= \sqrt{z_2} \\w=\sqrt{z_3} \end{cases}$ since $uvw=-\sqrt{z_1}\cdot \sqrt{z_2}\cdot \sqrt{z_3}=-\sqrt{z_1}\sqrt{z_2}\sqrt{z_3} = -\frac{r}{8}$

$\begin{cases} u=-\sqrt{z_1} \\ v=-\sqrt{z_2} \\w=-\sqrt{z_3} \end{cases}$ since $uvw=-\sqrt{z_1}\cdot -\sqrt{z_2}\cdot -\sqrt{z_3}=-\sqrt{z_1}\sqrt{z_2}\sqrt{z_3} = -\frac{r}{8}$

Otherwise $\sqrt{z_1}\sqrt{z_2}\sqrt{z_3}=-\frac{r}{8}$, we have

$\begin{cases} u=\sqrt{z_1} \\ v= \sqrt{z_2} \\w=\sqrt{z_3} \end{cases} \begin{cases} u=\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=-\sqrt{z_3} \end{cases} \begin{cases} u=-\sqrt{z_1} \\ v= \sqrt{z_2} \\w=-\sqrt{z_3} \end{cases} \begin{cases} u=-\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=\sqrt{z_3} \end{cases}$

Consequently, a solution to the general quartic equation (*) is

$x = u+v+w - \frac{b}{4}.$

There are four such solutions.

Exercise-1 Show that (5-3) $\implies uvw = \sqrt{z_1}\sqrt{z_2}\sqrt{z_3}= \pm\frac{r}{8}.$

How to solve a cubic equation

Consider the general cubic equation

$x^3+bx^2+cx+d=0.\quad\quad\quad(*)$

Let

$y = x + \omega \implies x = y - \omega.\quad\quad\quad(1)$

Substituting (1) into (*), we have

$(y-\omega)^3 + b(y-\omega)^2+c(y-\omega) + d = 0.$

This is a new cubic equation in $y$:

$y^3 + (b-3\omega)y^2 + (3\omega^2-2b\omega+c)y - \omega^3+b\omega^2-c\omega+d=0\quad\quad\quad(2)$

Let

$\omega = \frac{b}{3}\quad\quad\quad(3)$

so that (2) becomes

$y^3 + (c-\frac{b^2}{3})y+d-\frac{bc}{3}+\frac{2b^3}{27}=0.$

That is

$y^3+py=q\quad\quad\quad(4)$

where $p = c-\frac{b^2}{3}, q = -d+\frac{bc}{3}-\frac{2b^3}{27}$ (see Fig. 1).

Thus, (4) is the so called depressed cubic equation. A solution is readily available through Cardano’s formula (see “Through the Mind’s Eye“).

Once we know $y$, (1) gives

$x = y - \frac{b}{3}.$

Fig. 1

Wallis’ Pi

There is a remarkable expression for the number $\pi$ as an infinite product. Starting with definite integral $\int\limits_{0}^{\frac{\pi}{2}} \sin^{m}(x)\;dx, m=0,1,2,3,4...$, we derive it as follows:

$\int\limits_{0}^{\frac{\pi}{2}} \sin^m(x)\;dx$

$=\int\limits_{0}^{\frac{\pi}{2}}\sin^{m-1}(x)\cdot\sin(x)\;dx$

$= \int\limits_{0}^{\frac{\pi}{2}} \sin^{m-1}(x)\cdot(-\cos(x))'\;dx$

By $\int\limits_{a}^{b} u\cdot v'\;dx = u\cdot v \bigg|_{b}^{a}- \int\limits_{b}^{a} u' \cdot v\;dx,$

$= \sin^{m-1}(x)\cdot(-\cos(x))\bigg|_{0}^{\frac{\pi}{2}} - \int\limits_{0}^{\frac{\pi}{2}}(\sin^{m-1}(x))'\cdot(-\cos(x))\;dx$

$= 0 - \int\limits_{0}^{\frac{\pi}{2}}(m-1)\sin^{m-2}(x)\cos(x)\cdot(-\cos(x))\;dx$

$= +\int\limits_{0}^{\frac{\pi}{2}}(m-1)\sin^{m-2}(x)\cdot\cos^2(x)\;dx$

$\overset{\cos^2(x) = 1-\sin^2(x)}{=}\int\limits_{0}^{\frac{\pi}{2}}(m-1)\sin^{m-2}(x)\cdot (1-\sin^{2}(x))\;dx$

$= \int\limits_{0}^{\frac{\pi}{2}}(m-1)\sin^{m-2}(x) - (m-1)\sin^{m}(x)\;dx$

$= (1-m)\int\limits_{0}^{\frac{\pi}{2}}\sin^{m}(x)\;dx + (m-1)\int\limits_{0}^{\frac{\pi}{2}}\sin^{m-2}(x)\;dx.$

That is,

$m\int\limits_{0}^{\frac{\pi}{2}}\sin^{m}(x)\;dx = (m-1)\int\limits_{0}^{\frac{\pi}{2}}\sin^{m-2}(x)\;dx.$

And so,

$\int\limits_{0}^{\frac{\pi}{2}}\sin^{m}(x) \; dx= \frac{m-1}{m}\int\limits_{0}^{\frac{\pi}{2}}\sin^{m-2}(x)\;dx.\quad\quad\quad(1)$

By repeated application of (1) we have the following values for $I_{m} = \int\limits_{0}^{\frac{\pi}{2}} \sin^{m}(x)\;dx$:

For even $m$,

$I_{2n} = \left(\prod\limits_{k=0}^{n-1}\frac{2n-2k-1}{2n-2k}\right)I_0\overset{I_0 = \int\limits_{0}^{\frac{\pi}{2}}\;dx = \frac{\pi}{2}}{\implies}I_{2n}= \left(\prod\limits_{k=0}^{n-1}\frac{2n-2k-1}{2n-2k}\right)\cdot \frac{\pi}{2}.$

Similarly, for odd $m$,

$I_{2n+1} = \left(\prod\limits_{k=0}^{n-1}\frac{2n+1-2k-1}{2n+1-2k}\right)\cdot I_{1}\overset{I_1 = \int\limits_{0}^{\frac{\pi}{2}}\sin^{1}(x)\;dx = 1}{\implies} I_{2n+1}= \prod\limits_{k=0}^{n-1}\frac{2n-2k}{2n-2k+1}.$

i.e.,

$I_{2n} = \frac{2n-1}{2n}\cdot\frac{2n-3}{2n-2}\cdot\frac{2n-5}{2n-4}\cdot\frac{2n-7}{2n-6}\cdot...\cdot\frac{5}{6}\cdot\frac{3}{4}\cdot\frac{1}{2}\cdot\frac{\pi}{2}\quad\quad\quad(2)$

$I_{2n+1} =\frac{2n}{2n+1}\cdot\frac{2n-2}{2n-1}\cdot\frac{2n-4}{2n-3}\cdot\frac{2n-6}{2n-5}\cdot ...\cdot\frac{6}{7}\cdot\frac{4}{5}\cdot\frac{2}{3}\quad\quad\quad\quad\quad(3)$

Since for $0 we have $\sin^{2n-1}(x) > \sin^{2n}(x) > \sin^{2n+1}(x).$ It means

$\int\limits_{0}^{\frac{\pi}{2}}\sin^{2n-1}(x) > \int\limits_{0}^{\frac{\pi}{2}}\sin^{2n}(x)\;dx > \int\limits_{0}^{\frac{\pi}{2}}\sin^{2n+1}(x)\;dx>0$

or,

$I_{2n-1} > I_{2n} > I_{2n+1}>0.$

Hence,

$\frac{I_{2n-1}}{I_{2n+1}}>\frac{I_{2n}}{I_{2n+1}} > 1.\quad\quad\quad(4)$

Moreover, we have

$I_{2n+1} \overset{(1)}{=} \frac{(2n+1)-1}{2n+1}I_{(2n+1)-2} = \frac{2n}{2n+1} I_{2n-1},$

so that

$\frac{I_{2n-1}}{I_{2n+1}} = \frac{2n+1}{2n}.\quad\quad\quad(5)$

And,

$\frac{I_{2n}}{I_{2n+1}} \overset{(2), (3)}{=} \frac{(2n+1)\cdot(2n-1)^2\cdot (2n-3)^2...7^2\cdot 5^2\cdot 3^2}{(2n)^2\cdot (2n-2)^2\cdot (2n-4)^2\cdot ...\cdot 6^2\cdot 4^2\cdot 2^2}\cdot \frac{\pi}{2}$

$= \frac{(2n)^2\cdot (2n-1)^2\cdot (2n-2)^2\cdot (2n-3)^2\cdot (2n-4)^2\cdot...\cdot 7^2\cdot 6^2\cdot 5^2\cdot 4^2\cdot 3^2\cdot 2^2}{(2n)^4(2n-2)^4\cdot (2n-4)^4...6^4\cdot 4^4\cdot 2^4}\cdot (2n+1)\cdot\frac{\pi}{2}$

$= \frac{\left((2n)\cdot (2n-1)\cdot (2n-2)\cdot (2n-3)\cdot (2n-4)\cdot...\cdot 7\cdot 6\cdot 5\cdot 4\cdot 3\cdot 2\right)^2}{(2^4\cdot n^4)\cdot (2^4\cdot(n-1)^4) \cdot (2^4\cdot (n-2)^4)\cdot...\cdot (2^4\cdot 3^4)\cdot (2^4\cdot 2^4)\cdot 2^4}\cdot (2n+1)\cdot\frac{\pi}{2}$

$= \frac{((2n)!)^2}{\underbrace{2^4\cdot 2^4\cdot ...\cdot 2^4}_{n 2^4s}\cdot (n\cdot(n-1)\cdot(n-2)\cdot ...\cdot 3\cdot 2\cdot 1)^4}(2n+1)\cdot\frac{\pi}{2}$

$= \frac{((2n)!)^2\cdot (2n+1)}{2^{4n}\cdot(n!)^4}\cdot \frac{\pi}{2}$

gives

$\frac{I_{2n}}{I_{2n+1}} = \frac{((2n)!)^2(2n+1)}{2^{4n}(n!)^4}\cdot\frac{\pi}{2}.\quad\quad\quad(6)$

Substituting (5) and (6) into (4) yields

$\frac{2n+1}{2n} >\frac{((2n)!)^2(2n+1)}{2^{4n}(n!)^4}\cdot\frac{\pi}{2}>1.$

Since $\lim\limits_{n \rightarrow \infty} \frac{2n+1}{2n} = 1, \lim\limits_{n \rightarrow \infty}1 = 1,$ by Squeeze Theorem for Sequences,

$\lim\limits_{n \rightarrow \infty}\frac{((2n)!)^4(2n+1)}{2^{4n}(n!)^4} \cdot \frac{\pi}{2}= 1\implies \lim\limits_{n \rightarrow \infty}\frac{((2n)!)^2(2n+1)}{2^{4n}(n!)^4}=\frac{2}{\pi}.$

Consequently,

$\lim\limits_{n \rightarrow \infty} \frac{2^{4n}(n!)^4}{((2n)!)^2(2n+1)}= \frac{\pi}{2},$

i.e.,

$\pi = 2\cdot\lim\limits_{n \rightarrow \infty}\frac{2^{4n}(n!)^4}{((2n)!)^2(2n+1)}.$

This is Wallis’ product representation for $\pi,$ named after John Wallis who discovered it in 1665.

Maxima knows Wallis’ Pi:

Fig. 1

So does Mathematica:

Fig. 2

Its convergence to $\pi$ is illustrated in Fig. 3:

Fig. 3