miércoles, 28 de febrero de 2024

A family of trigonometric formulas for the roots of quadratic equations

 This note presents alternative trigonometric formulas for finding the roots of quadratic equations where $a$, $b$, and $c$ are non-zero real numbers.

Before the era of calculators, trigonometric formulas were favored for computing quadratic roots due to their time and labor-saving benefits. However, it's not advisable nowadays to rely on these formulas over the traditional quadratic formula for root calculations. Nonetheless, the trigonometric formulas showcased in this note have hinted at certain identities that appear useful for integrating irrational functions. Thus, the sole purpose of this note is to document the origins of these identities.

In the formulas presented, each inverse trigonometric or hyperbolic function assumes real values only when its argument lies in the corresponding real domain. Specifically:

$\alpha = \sin^{-1}\left(\frac{b}{2\sqrt{ac}}\right)$ and $\gamma = \cos^{-1}\left(\frac{b}{2\sqrt{ac}}\right)$ are real-valued if and only if 

$$\left|\frac{b}{2\sqrt{ac}}\right|\;\le\;1.$$

$\beta = \csc^{-1}\left(\frac{b}{2\sqrt{ac}}\right)$ and $\delta = \sec^{-1}\left(\tfrac{b}{2\sqrt{ac}}\right)$ are real-valued if and only if 

$$\left|\frac{b}{2\sqrt{ac}}\right|\;\ge\;1.$$

$\eta = \tanh^{-1}\left(\frac{b}{2\sqrt{ac}}\right)$ is real-valued if and only if 

$$\left|\frac{b}{2\sqrt{ac}}\right|\;<\;1.$$

$\theta = \coth^{-1}\left(\frac{b}{2\sqrt{ac}}\right)$ is real-valued if and only if 

$$\left|\frac{b}{2\sqrt{ac}}\right|\;>\;1.$$

Consequently, each theorem in this note implicitly presumes that \(b/(2\sqrt{ac})\) lies within the necessary interval so that the stated inverse trigonometric or hyperbolic expression remains real-valued. If one allows complex-valued functions, these restrictions need not apply, but the resulting roots may lie in the complex plane.

Theorem 1. Let $a$, $b$, and $c$ be non-zero real numbers. For the quadratic equation $ax^2+bx+c=0$, the roots are given by:

$$x_{1}=  ie^{i\alpha}\sqrt{\frac{c}{a}}\qquad \text{and}\qquad  x_2=-ie^{-i\alpha}\sqrt{\frac{c}{a}},\tag{1}$$

where $\alpha=\sin^{-1}{\left(\frac{b}{2\sqrt{ac}}\right)}$.

Proof. Consider the quadratic equation $a^2+bx+c=0$. Multiplying both sides by $a$ and making the substitutions $ax=p$ and $ac=q^2$ yields

$$p^2+bp+q^2=0.$$

Let's make the substitution $\sin{\alpha} = \frac{b}{2q}$. Consequently,

$$\begin{aligned}0&=p^2+bp+q^2\\&=p^2+2qp\sin{\alpha}+q^2\\&=p^2\left(\sin^2{\frac{\alpha}{2}}+\cos^2{\frac{\alpha}{2}}\right)+4qp\sin{\frac{\alpha}{2}}\cos{\frac{\alpha}{2}}+q^2\left(\sin^2{\frac{\alpha}{2}}+\cos^2{\frac{\alpha}{2}}\right)\\&=\left(p\sin{\frac{\alpha}{2}}+q\cos{\frac{\alpha}{2}}\right)^2 + \left(p\cos{\frac{\alpha}{2}}+q\sin{\frac{\alpha}{2}}\right)^2\\&=\left(p\sin{\frac{\alpha}{2}}+q\cos{\frac{\alpha}{2}}\right)^2  -i^2\left(p\cos{\frac{\alpha}{2}}+q\sin{\frac{\alpha}{2}}\right)^2 .\end{aligned}$$

Factorizing the difference of squares and then factorizing again, one of the factor of the quadratic equation can be express as follows

$$p\left(\sin{\frac{\alpha}{2}}+i\cos{\frac{\alpha}{2}}\right)+q\left(\cos{\frac{\alpha}{2}}+i\sin{\frac{\alpha}{2}}\right).$$

Setting the factor equal to zero, undoing the substitutions $ax=p$ and $ac=q^2$ and solving for $x$, we obtain 

$$\begin{aligned}x_1&=-\left(\frac{\cos{\frac{\alpha}{2}}+i\sin{\frac{\alpha}{2}}}{\sin{\frac{\alpha}{2}}+i\cos{\frac{\alpha}{2}}}\right)\sqrt{\frac{c}{a}}\\&= -(\sin{\alpha}-i\cos{\alpha})\sqrt{\frac{c}{a}}\\&=ie^{i\alpha}\sqrt{\frac{c}{a}}. \end{aligned}$$

The other factor is given by

$$p\left(\sin{\frac{\alpha}{2}}-i\cos{\frac{\alpha}{2}}\right)+q\left(\cos{\frac{\alpha}{2}}-i\sin{\frac{\alpha}{2}}\right).$$

And similarly,

$$x_2=-ie^{-i\alpha}\sqrt{\frac{c}{a}}.$$ 

Theorem 2. For the quadratic equation $ax^2+bx+c=0$ with non-zero real numbers $a$, $b$, and $c$, the roots are given by:

$$x_{1}=-\tan{\frac{\beta}{2}}\sqrt{\frac{c}{a}}\qquad \text{and} \qquad x_{2}=-\cot{\frac{\beta}{2}}\sqrt{\frac{c}{a}},\tag{2}$$

where $\beta=\csc^{-1}{\left(\frac{b}{2\sqrt{ac}}\right)}$.

Proof. Multiplying by $a$ the quadratic equation $ax^2+bx+c=0$ and then substituting $ax=p$ and $ac=q^2$, we have

$$p^2+bp+q^2=0.$$

Use the substitution $\csc{\beta}=\frac{b}{2q}$, then

$$\begin{aligned}0&=p^2+bp+q^2\\&=p^2+2qp\csc{\beta}+q^2\\&=\csc{\beta}\left(p^2\sin{\beta}+2qp+q^2\sin{\beta}\right)\\&=2p^2\sin{\frac{\beta}{2}}\cos{\frac{\beta}{2}}+2qp\left(\sin^2{\frac{\beta}{2}}+\cos^2{\frac{\beta}{2}}\right)+2q^2\sin{\frac{\beta}{2}}\cos{\frac{\beta}{2}}\\&=p^2\sin{\frac{\beta}{2}}\cos{\frac{\beta}{2}}+qp\sin^2{\frac{\beta}{2}}+ qp\cos^2{\frac{\beta}{2}}+q^2\sin{\frac{\beta}{2}}\cos{\frac{\beta}{2}}\\&= p\sin{\frac{\beta}{2}}\left(p\cos{\frac{\beta}{2}}+q\sin{\frac{\beta}{2}}\right)+q\cos{\frac{\beta}{2}}\left(p\cos{\frac{\beta}{2}}+q\sin{\frac{\beta}{2}}\right)\\&= \left(p\cos{\frac{\beta}{2}}+q\sin{\frac{\beta}{2}}\right)\left(p\sin{\frac{\beta}{2}}+q\cos{\frac{\beta}{2}}\right).\end{aligned}$$

By setting the factors equal to zero, undoing substitutions $ax=p$ and $ac=q^2$ and solving for $x$, we obtain the desired formulas in $(2)$.

Remark. We acknowledge that formulas similar to those presented in Theorem 2 were previously obtained in the work titled Lehrbuch der Gleichungen des II. Grades (Quadratische Gleichungen).

Theorem 3. Let $a$, $b$ and $c$ be non-zero real numbers. If $ax^2+bx+c=0$, then the roots are given by:

$$x_{1}=  -e^{i\gamma}\sqrt{\frac{c}{a}}\qquad \text{and}\qquad  x_2=-e^{-i\gamma}\sqrt{\frac{c}{a}},\tag{3}$$

where $\gamma=\cos^{-1}{\left(\frac{b}{2\sqrt{ac}}\right)}$.

Proof. Consider the quadratic equation $ax^2+bx+c=0$. Multiplying both sides by $a$ and substituting $ax=p$ and $ac=q^2$ yields

$$p^2+bp+q^2=0.$$

By making the substitution $\cos{\gamma} = \frac{b}{2q}$, it follows that

$$\begin{aligned}0&=p^2+bp+q^2\\&=p^2+2qp\cos{\gamma}+q^2\\&=p^2\left(\sin^2{\frac{\gamma}{2}}+\cos^2{\frac{\gamma}{2}}\right)+4qp\left(\cos^2{\frac{\gamma}{2}}-\sin^2{\frac{\gamma}{2}}\right)+q^2\left(\sin^2{\frac{\gamma}{2}}+\cos^2{\frac{\gamma}{2}}\right)\\&=\sin^2{\frac{\gamma}{2}} (p-q)^2+\cos^2{\frac{\gamma}{2}}(p+q)^2\\&=\sin^2{\frac{\gamma}{2}} (p-q)^2-i^2\cos^2{\frac{\gamma}{2}}(p+q)^2.\end{aligned}$$

By factoring the difference of squares first and then applying further factorization, one of the factors of the quadratic equation can be represented as follows

$$p\left(\sin{\frac{\gamma}{2}}+i\cos{\frac{\gamma}{2}}\right)+q\left(-\sin{\frac{\gamma}{2}}+i\cos{\frac{\gamma}{2}}\right).$$

Setting the factors equal to zero, undoing substitutions $ax=p$ and $ac=q^2$ and solving for $x$, we obtain

$$\begin{aligned}x_1&=\left(\frac{\sin{\frac{\gamma}{2}}-i\cos{\frac{\gamma}{2}}}{\sin{\frac{\gamma}{2}}+i\cos{\frac{\gamma}{2}}}\right)\sqrt{\frac{c}{a}}\\&= -(\cos{\gamma}+i\sin{\gamma})\sqrt{\frac{c}{a}}\\&=-e^{i\gamma}\sqrt{\frac{c}{a}}.\end{aligned}$$

The other factor is given by

$$p\left(\sin{\frac{\gamma}{2}}-i\cos{\frac{\gamma}{2}}\right)-q\left(\sin{\frac{\gamma}{2}}+i\cos{\frac{\gamma}{2}}\right).$$

And similarly,

$$x_2=-e^{-i\gamma}\sqrt{\frac{c}{a}}.$$

Remark. Similar formulas to those in Theorem 3 were obtained in the paper: Simons, Stuart, “Alternative approach to complex roots of real quadratic equations,” Mathematical Gazette 93, March 2009, 91–92.

Theorem 4. Let $a$, $b$ and $c$ be non-zero real numbers. If $ax^2+bx+c=0$, then the roots are given by: 

$$x_{1,2}=\frac{\tan{\frac{\delta}{2}\pm1}}{\tan{\frac{\delta}{2}\mp1}}\sqrt{\frac{c}{a}},\tag{4}$$

where $\delta=\sec^{-1}{\left(\frac{b}{2\sqrt{ac}}\right)}$.

Proof. Consider the quadratic equation $ax^2+bx+c=0$. Multiplying both sides by $a$ and substituting $ax=p$ and $ac=q^2$ yields

$$p^2+bp+q^2=0.$$

Use the substitution $\sec{\delta}=\frac{b}{2q}$, then

$$\begin{aligned}0&=p^2+bp+q^2\\&=p^2+2qp\sec{\delta}+q^2\\&=\sec{\delta}\left(p^2\cos{\delta}+2qp+q^2\cos{\delta}\right)\\&=\cos{\delta}(p^2+q^2)+2qp\\&= \cos{\delta}(p+q)^2-2qp\cos{\delta}+2qp\\&= \left(\cos^2{\frac{\delta}{2}}-\sin^2{\frac{\delta}{2}}\right)(p+q)^2-2qp\left(1-2\sin^2{\frac{\delta}{2}}\right)+2qp\\&=  \cos^2{\frac{\delta}{2}}(p+q)^2 -\sin^2{\frac{\delta}{2}}(p+q)^2 +4qp\sin^2{\frac{\delta}{2}}\\&=   \cos^2{\frac{\delta}{2}}(p+q)^2 -\sin^2{\frac{\delta}{2}}\left((p+q)^2 -4qp\right)\\&= \cos^2{\frac{\delta}{2}}(p+q)^2 -\sin^2{\frac{\delta}{2}}(p-q)^2\\&= \left(\cos{\frac{\delta}{2}}(p+q) +\sin{\frac{\delta}{2}}(p-q)\right) \left(\cos{\frac{\delta}{2}}(p+q) -\sin{\frac{\delta}{2}}(p-q)\right).\end{aligned}$$

Expanding and then factorizing again, one of the factors of the quadratic equation is given by

$$p\left(\cos{\frac{\delta}{2}}+\sin{\frac{\delta}{2}}\right)+q\left(\cos{\frac{\delta}{2}}-\sin{\frac{\delta}{2}}\right).$$ 

By setting the factors equal to zero, undoing substitutions $ax=p$ and $ac=q^2$ and solving for $x$, we obtain

$$\begin{aligned}x_1&=\frac{\sin{\frac{\delta}{2}}+\cos{\frac{\delta}{2}}}{\sin{\frac{\delta}{2}}-\cos{\frac{\delta}{2}}}\sqrt{\frac{c}{a}}\\&= \frac{\tan{\frac{\delta}{2}+1}}{\tan{\frac{\delta}{2}-1}}\sqrt{\frac{c}{a}}. \end{aligned}$$

The other factor is given by

$$p\left(\cos{\frac{\delta}{2}}-\sin{\frac{\delta}{2}}\right)+q\left(\cos{\frac{\delta}{2}}+\sin{\frac{\delta}{2}}\right).$$

Similarly, 

$$x_2=\frac{\tan{\frac{\delta}{2}-1}}{\tan{\frac{\delta}{2}+1}}\sqrt{\frac{c}{a}}.$$

Theorem 5. Let $a$, $b$ and $c$ be non-zero real numbers. If $ax^2+bx+c=0$, then the roots are given by:

$$x_{1,2}=\frac{i\pm e^{\eta}}{i\mp e^{\eta}}\sqrt{\frac{c}{a}},\tag{5}$$

where $\eta=\tanh^{-1}{\left(\frac{b}{2\sqrt{ac}}\right)}$.

Proof. Consider the quadratic equation $ax^2+bx+c=0$. Multiplying both sides by $a$ and substituting $ax=p$ and $ac=q^2$ yields

$$p^2+bp+q^2=0.$$

Use the substitution $\tanh{\eta}=\frac{b}{2q}$, then

$$\begin{aligned}0&=p^2+bp+q^2\\&=p^2+2qp\tanh{\eta}+q^2\\&=(e^{2\eta} + 1) p^2 + 2 (e^{2\eta} - 1) p q + (e^{2\eta} + 1) q^2\\&=e^{2\eta}(p + q)^2 + (p - q)^2\\&=e^{2\eta}(p + q)^2 - i^2(p - q)^2 \\&=(e^{\eta}p + i p + e^{\eta}q - i q)(e^{\eta}p - i p + e^{\eta}q + i q)\\&= \left(p(e^{\eta} + i) + q(e^{\eta} - i)\right)\left(p(e^{\eta} - i) + q(e^{\eta} + i)\right)\end{aligned}$$

Setting the factor equal to zero, undoing the substitutions $ax=p$ and $ac=q^2$ and solving for $x$, we obtain 

$$x_{1}=\frac{i- e^{\eta}}{i+e^{\eta}}\sqrt{\frac{c}{a}}.$$

And similarly,

$$x_{2}=\frac{i+ e^{\eta}}{i-e^{\eta}}\sqrt{\frac{c}{a}}.$$

Theorem 6. Let $a$, $b$ and $c$ be non-zero real numbers. If $ax^2+bx+c=0$, then the roots are given by:

$$x_{1,2}=\frac{1\pm e^{\theta}}{1\mp e^{\theta}}\sqrt{\frac{c}{a}},\tag{6}$$

where $\theta=\coth^{-1}{\left(\frac{b}{2\sqrt{ac}}\right)}$.

Proof. Consider the quadratic equation $ax^2+bx+c=0$. Multiplying both sides by $a$ and substituting $ax=p$ and $ac=q^2$ yields

$$p^2+bp+q^2=0.$$

Use the substitution $\coth{\theta}=\frac{b}{2q}$, Then, similar to how we proceeded previously,

$$\begin{aligned}0&=p^2+bp+q^2\\&=p^2+2qp\coth{\theta}+q^2\\&=(e^{2\theta} - 1) p^2 + 2 (e^{2\theta} + 1) p q + (e^{2\theta} - 1) q^2\\&=e^{2\theta}(p + q)^2 - (p - q)^2 \\&=\left( p e^{\theta} + p + q e^{\theta} - q \right) \left( p e^{\theta} - p + q e^{\theta} + q \right)\\&=\left(p(e^x + 1) + q(e^x - 1)\right)\left(p (e^x - 1) + q (e^x + 1)\right)\end{aligned}$$

Setting the factor equal to zero, undoing the substitutions $ax=p$ and $ac=q^2$ and solving for $x$, we obtain 

$$x_{1}=\frac{1- e^{\theta}}{1+e^{\theta}}\sqrt{\frac{c}{a}}= -\tanh\left(\frac{1}{2} \text{coth}^{-1}(x)\right)\sqrt{\frac{c}{a}}.$$

And similarly,

$$x_{2}=\frac{1+ e^{\theta}}{1-e^{\theta}}\sqrt{\frac{c}{a}}.$$

jueves, 15 de febrero de 2024

Integrals yielding $e^{\pi}$ or $e^{-\pi}$

 Lately, I've been playing a lot with integrals, and coincidentally (with a bit of algebraic manipulation), I've come across these two beauties:

$$\int_{0}^{1} \left(\frac{5}{2} \left((x - \sqrt{x^2 - 1})^{2i} + x^4\right) - 1\right) \, dx = e^{\pi},\tag{1}$$

$$\int_{0}^{1} \left( -\frac{5}{2\left( x - \sqrt{x^2 - 1}\right)^{2i}} - \frac{5x^4}{2} + 1 \right) \, dx = e^{-\pi}.\tag{2}$$

$e^{\pi}$ is known as Gelfond's constant.

I have provided these integrals as a response to a question on MathSE. The proofs are left as exercises for the reader.