SERVING THE QUANTITATIVE FINANCE COMMUNITY

Cuchulainn
Posts: 62369
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: exp(5) = $e^5$

Compute the derivative of $e^{e^{e^{x}}}$. at x = 0.01. It comes from book that says AD is better. Calculus and FD is a nightmare.

Cuchulainn
Posts: 62369
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: exp(5) = $e^5$

Solve the current problem as a least squares Genetic Algorithm optimisation  problem using floating-point genes.

$min (e^5 - x)^2$

ExSan
Posts: 4554
Joined: April 12th, 2003, 10:40 am

### Re: exp(5) = $e^5$

Compute $e^{\pi}$ to 2 decimal places with pencil and paper. (Gelfond's constant)
A follow-on from Exsan's post and ansatz (big conjecture but in the right direction) is whether $\pi$ and $e$ are algebraically independent? i.e. is there a polynomial relation
$a_{n}\pi^{n} + a_{n-1}\pi^{n-1} + ... + a_{0}\pi^{0} = e^5$
or
$a_{n}e^{n} + a_{n-1}e^{n-1} + ... + a_{0}e^{0} = \pi$
where $a_{j} , j = 0,..,n$ are algebraic numbers?
what a puzzle !

Cuchulainn
Posts: 62369
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: exp(5) = $e^5$

Compute $e^{\pi}$ to 2 decimal places with pencil and paper. (Gelfond's constant)
A follow-on from Exsan's post and ansatz (big conjecture but in the right direction) is whether $\pi$ and $e$ are algebraically independent? i.e. is there a polynomial relation
$a_{n}\pi^{n} + a_{n-1}\pi^{n-1} + ... + a_{0}\pi^{0} = e^5$
or
$a_{n}e^{n} + a_{n-1}e^{n-1} + ... + a_{0}e^{0} = \pi$
where $a_{j} , j = 0,..,n$ are algebraic numbers?
what a puzzle !
Have you solved it yet?

ExSan
Posts: 4554
Joined: April 12th, 2003, 10:40 am

### Re: exp(5) = $e^5$

Compute $e^{\pi}$ to 2 decimal places with pencil and paper. (Gelfond's constant)
A follow-on from Exsan's post and ansatz (big conjecture but in the right direction) is whether $\pi$ and $e$ are algebraically independent? i.e. is there a polynomial relation
$a_{n}\pi^{n} + a_{n-1}\pi^{n-1} + ... + a_{0}\pi^{0} = e^5$
or
$a_{n}e^{n} + a_{n-1}e^{n-1} + ... + a_{0}e^{0} = \pi$
where $a_{j} , j = 0,..,n$ are algebraic numbers?
what a puzzle !
Have you solved it yet?
I have no idea how to do it. This is very interesting problem to work on

Cuchulainn
Posts: 62369
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: exp(5) = $e^5$

Wed Dec 05, 2018 1:11 pm

Let's take a step backwards.

Gradient descent methods as we know and love them are nothing more than Euler's (ugh) method applied to ODEs (aka gradient system):

$dx/dt = - grad f(x) = -\nabla f(x)$ where $f$ is the function to be minimised.

The local minima of $f$ are the critical points of this ODE system. (Poincaré-Lyapunov-Bendixson theory).

I have tried it on a number of benchmark unconstrained optimisation problem and solved using C++ boost::odeint without any of the infamous learning rate fudges.

We use more robust ODE solvers than Euler which means that we don't get the well-documented issues with GD methods.

For the evergreen $e^5$ we have ODE $dx/dt = -\nabla(x-e^5)^2 = -2(x - e^5)$. We get x = 148.413 for any initial value of the ODE.

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: exp(5) = $e^5$

Algebraic independence of known constants
Although both $\pi$ and $e$ are known to be transcendental, it is not known whether the set of both of them is algebraically independent over $\mathbb {Q}$. In fact, it is not even known if $\pi +e$ is irrational. Nesterenko proved in 1996 that:
the numbers $π$, $e^{\pi}$, and $\Gamma(1/4)$ are algebraically independent over $\mathbb {Q}$.
the numbers $π$, $e^{\pi\sqrt{3}}$, and $\Gamma(1/3)$ are algebraically independent over $\mathbb {Q}$.
for all positive integers $n$, the numbers $π$, $e^{\pi\sqrt{n}}$ are algebraically independent over $\mathbb {Q}$.

ExSan
Posts: 4554
Joined: April 12th, 2003, 10:40 am

### Re: exp(5) = $e^5$

Wed Dec 05, 2018 1:11 pm

Let's take a step backwards.

Gradient descent methods as we know and love them are nothing more than Euler's (ugh) method applied to ODEs (aka gradient system):

$dx/dt = - grad f(x) = -\nabla f(x)$ where $f$ is the function to be minimised.

The local minima of $f$ are the critical points of this ODE system. (Poincaré-Lyapunov-Bendixson theory).

I have tried it on a number of benchmark unconstrained optimisation problem and solved using C++ boost::odeint without any of the infamous learning rate fudges.

We use more robust ODE solvers than Euler which means that we don't get the well-documented issues with GD methods.

For the evergreen $e^5$ we have ODE $dx/dt = -\nabla(x-e^5)^2 = -2(x - e^5)$. We get x = 148.413 for any initial value of the ODE.
Maestro !

Cuchulainn
Posts: 62369
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: exp(5) = $e^5$

Does the ODE

$du/dt = e^{u^2/2}$ have a soluion in which interval?

(e.g. as a first shot across boughs, maybe a symbolic solution in Maple?)

FaridMoussaoui
Posts: 507
Joined: June 20th, 2008, 10:05 am
Location: Genève, Genf, Ginevra, Geneva

### Re: exp(5) = $e^5$

Mathematica said $u(t) = \sqrt{2} ~ InverseErf (\sqrt{\frac{2}{\pi}} ( t + C))$ where InverseErf is the inverse error function.

ppauper
Posts: 70239
Joined: November 15th, 2001, 1:29 pm

### Re: exp(5) = $e^5$

Does the ODE

$du/dt = e^{u^2/2}$ have a soluion in which interval?

(e.g. as a first shot across boughs, maybe a symbolic solution in Maple?)
bow not bough? ship's bow

it's first order separable
$du/dt = e^{u^2/2}$

$e^{-u^2/2}du=dt$
integrate both sides
$\sqrt{\pi/2}\,\textrm{erf}\left(u/\sqrt{2}\right)=t+C$

as to the domain, you know $-1\le \textrm{erf}(x)\le 1$
so if you have an initial condition $u_{0}$ at $t_{0}$,
$\sqrt{\pi/2}\,\textrm{erf}\left(u/\sqrt{2}\right)-\sqrt{\pi/2}\,\textrm{erf}\left(u_{0}/\sqrt{2}\right)=t-t_{0}$
$t=t_{0}+\sqrt{\pi/2}\,\textrm{erf}\left(u/\sqrt{2}\right)-\sqrt{\pi/2}\,\textrm{erf}\left(u_{0}/\sqrt{2}\right)$
so the solution is valid for $t$ in the range
$t_{0}-\sqrt{\pi/2}-\sqrt{\pi/2}\,\textrm{erf}\left(u_{0}/\sqrt{2}\right)\le t \le t_{0}+\sqrt{\pi/2}-\sqrt{\pi/2}\,\textrm{erf}\left(u_{0}/\sqrt{2}\right)$
or in terms of $\textrm{erfc}(x)=1-\textrm{erf}(x)$ which is between 0 and 2
$t_{0}-\sqrt{\pi/2}\,\textrm{erfc}\left(-u_{0}/\sqrt{2}\right)\le t \le t_{0}+\sqrt{\pi/2}\,\textrm{erfc}\left(u_{0}/\sqrt{2}\right)$

a very rough limit would be to replace erfc by 2,
$t_{0}-\sqrt{2\pi}\le t\le t_{0}+\sqrt{2\pi}$

ExSan
Posts: 4554
Joined: April 12th, 2003, 10:40 am

### Re: exp(5) = $e^5$

Does the ODE

$du/dt = e^{u^2/2}$ have a soluion in which interval?

(e.g. as a first shot across boughs, maybe a symbolic solution in Maple?)
bow not bough? ship's bow

it's first order separable
$du/dt = e^{u^2/2}$

$e^{-u^2/2}du=dt$
integrate both sides
$\sqrt{\pi/2}\,\textrm{erf}\left(u/\sqrt{2}\right)=t+C$

as to the domain, you know $-1\le \textrm{erf}(x)\le 1$
so if you have an initial condition $u_{0}$ at $t_{0}$,
$\sqrt{\pi/2}\,\textrm{erf}\left(u/\sqrt{2}\right)-\sqrt{\pi/2}\,\textrm{erf}\left(u_{0}/\sqrt{2}\right)=t-t_{0}$
$t=t_{0}+\sqrt{\pi/2}\,\textrm{erf}\left(u/\sqrt{2}\right)-\sqrt{\pi/2}\,\textrm{erf}\left(u_{0}/\sqrt{2}\right)$
so the solution is valid for $t$ in the range
$t_{0}-\sqrt{\pi/2}-\sqrt{\pi/2}\,\textrm{erf}\left(u_{0}/\sqrt{2}\right)\le t \le t_{0}+\sqrt{\pi/2}-\sqrt{\pi/2}\,\textrm{erf}\left(u_{0}/\sqrt{2}\right)$
or in terms of $\textrm{erfc}(x)=1-\textrm{erf}(x)$ which is between 0 and 2
$t_{0}-\sqrt{\pi/2}\,\textrm{erfc}\left(-u_{0}/\sqrt{2}\right)\le t \le t_{0}+\sqrt{\pi/2}\,\textrm{erfc}\left(u_{0}/\sqrt{2}\right)$

a very rough limit would be to replace erfc by 2,
$t_{0}-\sqrt{2\pi}\le t\le t_{0}+\sqrt{2\pi}$
good!!!

katastrofa
Posts: 9318
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

### Re: exp(5) = $e^5$

Cuchulainn
Posts: 62369
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: exp(5) = $e^5$

How fast can it compute $e^5$?

katastrofa
Posts: 9318
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

### Re: exp(5) = $e^5$

I cannot test it now, but it looks charming, doesn't it?
The article is old, so we were wondering with a couple of guys here if such methods haven't been implemented in modern compilers (e.g. --ffast-math flat in gcc). If no, the concept is worth soft-max bros' attention.