Math Equations

Tuesday, May 9, 2017

Extremely rational cubic polynomials

By an extremely rational cubic polynomial, I mean a cubic polynomial \(p\) such that both \(p\) and \(p'\) are products of rational linear factors. A parametrization will now be derived.

Seek to satisfy \(p=(a+x)(b+x)(c+x),\ p'=3(d+x)(e+x)\) as polynomials.
\begin{align*}
0=p'(-e)&=ab+ac+bc-2(a+b+c)e+3e^2 \\
(3e-a-b-c)^2&=(a+b+c)^2-3(ab+ac+bc) \\
&=a^2+b^2+c^2-ab-ac-bc
\end{align*}We thus need to parametrize triples \((a,b,c)\) such that the right-hand side is a square.

By the cubic number system, I mean triples \((a,b,c)\) with the following operations.
\begin{align*}
(a,b,c)+(d,e,f)&\equiv(a+d,b+e,c+f) \\
(a,b,c)(d,e,f)&\equiv(ad+bf+ce,ae+bd+cf,af+be+cd) \\
Q(a,b,c)&\equiv a^2+b^2+c^2-ab-ac-bc
\end{align*}This system is a close sibling of the usual complex number system. Its relevance to us is in the last definition. It is the expression we want to make into a square. Verify the identity \(Q(zw)=Q(z)Q(w)\) to realize that our task can be fulfilled by setting \((a,b,c)\equiv(u,v,w)^2\). Normally, one would use fractions \(a,b,c,u,v,w\) in this number system, but we can just as well use complex parameters \(u,v,w\).

Here is the parametrization.
\begin{align*}
p&=(a+x)(b+x)(c+x),\quad p'=3(d+x)(e+x),\quad p''=6(f+x) \\
a&=u^2+2vw,\quad b=w^2+2uv,\quad c=v^2+2uw\\
d,e&=\frac13((u+v+w)^2\pm Q(u,v,w)),\quad f=\frac13(u+v+w)^2\end{align*}
Here is an example.
\begin{align*}
(u,v,w)&=(1,2,7) \\
(a,b,c)&=(1^2+2\times 2\times 7,\ 7^2+2\times 1\times 2,\ 2^2+2\times 1\times 7)=(29,53,18) \\
p&=(29+x)(53+x)(18+x)=27666+3013x+100x^2+x^3 \\
Q(u,v,w)&=1^2+2^2+7^2-1\times 2-1\times 7-2\times 7=31 \\
Q(a,b,c)&=29\times 29+53\times 53+18\times 18-29\times 53-29\times 18-53\times 18=961 \\
d,e&=\frac13({10}^2\pm 31)=\frac{131}3,23\\
p'&=3(\frac{131}3+x)(23+x)=(131+3x)(69+x)=3013+200x+3x^2\\
f&=\frac{100}3,\quad p''=6(\frac{100}3+x)=200+6x

\end{align*}
An example involving complex parameters \(u,v,w\) is best given visually and interactively.

Monday, March 14, 2016

Estimating a quarter turn in radians

Compute two sequences $\begin{matrix}a_0&\dots&a_{n-1}\\b_0&\dots&b_{n-1}\end{matrix}$ of unsigned integers with
$$\begin{align}\begin{matrix}a_0&a_{n-1}\\b_0&b_{n-1}\end{matrix} &= \begin{matrix}1&0\\0&1,\end{matrix}\\\left|\begin{matrix}a_k&a_{k+1}\\b_k&b_{k+1}\end{matrix} \right| &= 1\;\text{for all $k.$}\end{align}$$Then $$\sum\frac1{a_ka_{k+1}+b_kb_{k+1}} \approx \frac\tau4.$$

The idea is as follows: Integrate 1 from 0 to $\frac\tau4.$ A small term $\Delta\theta$ can be approximated as $\sin \Delta\theta$. Take $\sin^2 \Delta\theta$ to be the spread between two adjacent vectors $\begin{matrix}a_k\\b_k\end{matrix}$, $\begin{matrix}a_{k+1}\\b_{k+1}\end{matrix}.$ This spread is $$\frac{(a_kb_{k+1}-a_{k+1}b_k)^2}{(a_k^2+b_k^2)(a_{k+1}^2+b_{k+1}^2)} = \frac1{(a_ka_{k+1}+b_kb_{k+1})^2+1} \approx \frac1{(a_ka_{k+1}+b_kb_{k+1})^2}.$$Thus $\Delta\theta\approx\frac1{a_ka_{k+1}+b_kb_{k+1}}.$

Here's an algorithm:

#include <iostream>
#include <iomanip>
using namespace std;

long double integrate(unsigned long a0, unsigned long b0,
                      unsigned long a1, unsigned long b1) {   
    if (a0*a1+b0*b1 > 100000)
        return 1.0L/(a0*a1+b0*b1);
    else
        return integrate(a0+a1, b0+b1, a1, b1) + integrate(a0, b0, a0+a1, b0+b1);
}

int main() {
    cout << "approx " << setprecision(20) << integrate(1, 0, 0, 1) << endl;
}

The output is 1.5707963268188070548, which equals $\frac\tau4$ to 9 decimal places.


Thursday, November 26, 2015

Continuous matrices

This will be a naive discussion about functions roughly of the form $A: \mathbb{R}^2\to\mathbb{R}$ but allowing delta behaviour which I only know of informally so far. $A$ is a continuous matrix. Addition $A+B$ is done componentwise and multiplication $AB$ is carried out by integrating
$$(AB)(x,y)=\int_{-\infty}^{+\infty}A(x,z)B(z,y)dz.$$

The plot operator $P$, defined through $P_f(x,y)=\delta(x-f(y))$, creates a continuous matrix. One interesting property, when combined with the usual associativity and distributivity of matrix operations, is that
$$ P_fP_g=\int_{-\infty}^{+\infty}\delta(x-f(z))\delta(z-g(y))dz=\delta(x-f(g(y)))=P_{f\circ g}.$$ This property makes it possible to interpret an arbitrary continuous matrix as a superposition of graphs $A = \sum \alpha_iP_{f_i}$ of single variable functions $f_i$, and to interpret multiplication of two matrices $A,B$ as a weaving together of all possible compositions: $AB = \sum\alpha_i\beta_jP_{f_i\circ g_j}.$ But all this is just conceptual speculation.


Here is a new light on fourier transforms: $F(x,y)=e^{-ixy}$. The inversion formula $FFf(x)=\tau f(-x)$ can be written as $F^2=\tau\delta(x+y)$ and verified using the definition of matrix multiplication.


In simple cases of signal analysis a linear operator $T$ transforming the signal is characterized through its impulse response $h=T\delta$ in the fashion $Tx(t)=\int_{-\infty}^{+\infty}h(t-u)x(u)du$, i.e. through the convolution $Tx=h*x$. The $h*$ part can be written as a matrix. Indeed, for any functions $x,y$,
$$ x*y(t) = \int_{-\infty}^{+\infty}x(t-u)y(u)du = C_xy(t) $$ where $C_f(x,y)=f(x-y)$ in general. In this case we have $Tx=h*x=C_hx$ so that $T=C_h$ in the same sense that a finite-dimensional linear transformation is equal to its transformation matrix.


This reminds me of the familiar way to define complex multiplication:
$$\left(\begin{matrix}a\\b\end{matrix}\right)\left(\begin{matrix}c\\d\end{matrix}\right)=\left(\begin{matrix}a&-b\\b&a\end{matrix}\right)\left(\begin{matrix}c\\d\end{matrix}\right).$$ Maybe it's more common to use matrices in both steads but we see that with this formulation $zw=M_zw$ where $M_z$ is chosen in the obvious way. The similarity between $C$ and $M$ is that both are obtained by repeating data across diagonals.

Another similarity: In the same way that matrix models verify the associativity $M_uM_vM_w$ of complex number multiplication $uvw$, they verify the associativity $C_fC_gC_h$ of convolutions $f*g*h$. And the same holds for the distributive property.



Friday, April 24, 2015

The square root algorithm

I was taught that to get the square root of a number \(a\) you iterate \(x\mapsto \frac{x+\frac ax}2\) until you're happy with the result. More generally, to scale a vector \(v\) to have quadrance \(a\) you iterate \(v\mapsto \frac{1+\frac a{v\cdot v}}2v\). That's a direct analog. With negative quadrances you get chaotic behavior.

Sunday, March 1, 2015

Tetrahedra on a hyperbolic parabola

Instructed by a youtube video I folded a hyperbolic parabola. It looked like a regular tetrahedron so I wondered if there is any regular tetrahedron on the rational surface \(z=x^2-y^2\).



It should be centered at the origin and have the following vertices:\[[a,b,a^2-b^2], [-a,-b,a^2-b^2], [-b, a, -a^2+b^2], [b, -a, -a^2+b^2].\]We want all quadrances to be the same. By symmetry, only one equation is needed:\[4a^2+4b^2=(a-b)^2+(a+b)^2+4(a^2-b^2)^2\]or equivalently\[a^2+b^2=2(a^2-b^2)^2.\]

Our approach is to try to solve for one of the variables, say \(a\) in terms of \(b\). We will plug in different rational \(b\) and filter out those which give rational \(a\). A major insight is that filtering can be done by parametrization, or a change of variables if you wish. Let's start with completing the square:\[\left(a^2-\frac{4b^2+1}4\right)^2=b^2+\frac1{16}.\]Denote the left-hand side by \(c\). We can find points on the hyperbola \(c^2-b^2=\frac1{16}\) by first parametrizing the unit circle and noticing that\[c^2-b^2=\frac1{16}\iff\left(\frac bc\right)^2+\left(\frac1{4c}\right)^2=1.\]The parametrization becomes (we choose \(2t\) rather than \(1-t^2\) in the denominator)\[(b,c)=\left(\frac{1-t^2}{8t},\frac{1+t^2}{8t}\right).\]and thus the completed square can be written (we arbitrarily choose a plus sign when taking roots)\begin{align*}a^2&=\frac{\dfrac{(1-t^2)^2}{16t^2}+1}4+\frac{1+t^2}{8t}=\frac{1+14t^2+t^4+8t+8t^3}{64t^2}\\&=\frac{(1+t)^4+4t(1+t)^2}{64t^2}=\frac{(1+t)^2}{64t^2}((1+t)^2+4t).\end{align*}We now turn to the equation\[d^2=(1+t)^2+4t=(t+3)^2-8=e^2-8.\]In this case let's try a different substitution:\begin{align*}(d,e)&=(u+v,u-v)\\uv&=-2\\(d,e)&=\left(u-\frac2u,u+\frac2u\right)=\left(\frac{u^2-2}u,\frac{u^2+2}u\right)\\t&=e-3=\frac{u^2-3u+2}u=\frac{(u-1)(u-2)}u.\end{align*}Finally,\begin{align*}(a,b)&=\left(\frac{1+t}{8t}d,\frac{1-t^2}{8t}\right)=\left(\frac{\frac{u^2-2u+2}u\cdot\frac{u^2-2}u}{8\frac{(u-1)(u-2)}u},\frac{-\frac{u^2-2u+2}u\cdot\frac{u^2-4u+2}u}{8\frac{(u-1)(u-2)}u}\right)\\&=\frac{u^2-2u+2}{8u(u-1)(u-2)}(u^2-2, -u^2+4u-2).\end{align*}In particular, one possible tetrahedron, obtained when \(u=-1\), has vertices\[[a,b,a^2-b^2]=\frac1{48}[5, 35, -25],\text{ etc}.\]

Sunday, February 15, 2015

More music

Yesterday I was determined to write a song, and so I did.

 

Sunday, February 1, 2015

Theorem classification

I claim (as an experiment) that there are three kinds of theorems "If A then B". Let \(|A|\) be the number of arrangements of objects that fit the description, i.e. interpret \(A\) as a set of tuples.
  1. \(|A| = \aleph_0\) – these give exact answers
  2. \(|A| = c\) – these give approximate results, usually to arbitrary precision
  3. \(|A| > \aleph_0\text{ but }|A|\not=c\) – these are even deeper set-theoretical fantasies
If \(|A|\in\mathbb{N}\text{ or }|A| = 0\) then the theorem doesn't deserve to be called a theorem because the use of the implication can be avoided by enumerating all statements \((a_i\in A,b_i\in B)_{i=1}^n\).

A subtle issue is that my use of sets is not justified. For example, according to present set theory, there is no set of all sets, so my classification cannot handle statements like "All sets have a power set". I count all such theorems into category 3 because they are set-theoretic.