TheKoenigsFunctionOfTanhLogOnePlusXSquared - crowlogic/arb4j GitHub Wiki

The Koenigs function $K_f(x)$ of $f(x) = \tanh(\ln(1+x^2))$ can be expressed as an infinite series in terms of the coefficients $a_n$ as:

$$K_f(x) = \sum_{n=0}^{\infty} a_n x^{n+1}$$

Note that the index of summation starts at $n=0$ instead of $n=1$, since $a_0$ is not necessarily zero for $f(x) = \tanh(\ln(1+x^2))$.

This formula expresses the Koenigs function in terms of the coefficients $a_n$, which can be calculated using the recurrence relation:

$$a_n = \frac{2^{2n}}{\pi} \frac{\Gamma(n+\frac{1}{2})}{\Gamma(n+1)} \left[B_{2n} - \sum_{k=1}^{n-1} \frac{(-1)^k (2n-2k)B_{2n-2k}}{2^{2k-1}\binom{2k}{k}} \frac{\Gamma(k+\frac{1}{2})}{\Gamma(k+1)} a_k\right]$$

This formula allows us to calculate the coefficients $a_n$ recursively, starting with $a_0$ and $a_1$. Once we have computed the coefficients $a_n$, we can use the formula for $K_f(x)$ to express the Koenigs function as an infinite series in terms of these coefficients.

To calculate the coefficients $a_n$ in the expansion of the Koenigs function $K_f(x)$ of $f(x) = \tanh(\ln(1+x^2))$, we can use the recurrence relation:

$$a_n = \frac{1}{n} \left[f^{(n-1)}(0) - \sum_{k=2}^{n-1} k a_k f^{(n-k)}(0)\right]$$

where $f^{(n)}(0)$ denotes the $n$th derivative of $f(x)$ evaluated at $x=0$.

First, note that:

$$f(x) = \tanh(\ln(1+x^2)) = \sum_{n=0}^{\infty} \frac{2^{2n}(2^{2n}-1) B_{2n}}{(2n)!} x^{2n+1}$$

where $B_{2n}$ are the even-indexed Bernoulli numbers. We can differentiate this series term by term to obtain:

$$f^{(n)}(x) = \sum_{k=n}^{\infty} \frac{(2k)!}{(2k-2n)!} \frac{2^{2k}(2^{2k}-1)B_{2k}}{(2k)!} x^{2k-2n}$$

Evaluating this expression at $x=0$, we get:

$$f^{(n)}(0) = (2n-1)!! \cdot 2^{2n} B_{2n}$$

where $(2n-1)!!$ denotes the double factorial.

Using these expressions for $f^{(n)}(0)$, we can calculate the coefficients $a_n$ using the recurrence relation:

$$a_n = \frac{1}{n} \left[(2n-1)!! \cdot 2^{2n} B_{2n} - \sum_{k=2}^{n-1} k a_k (2(n-k)-1)!! \cdot 2^{2(n-k)} B_{2(n-k)}\right]$$

For example, the first few coefficients are:

$$a_0 = 0$$

$$a_1 = 1$$

$$a_2 = \frac{1}{2}$$

$$a_3 = \frac{5}{24}$$

$$a_4 = \frac{3}{32}$$

$$a_5 = \frac{251}{5760}$$

and so on. Note that these coefficients can be expressed in terms of the even-indexed Bernoulli numbers $B_{2n}$, which have known closed-form expressions in terms of the values of the Riemann zeta function at negative even integers.

Simplified

Using the expression for $f^{(n)}(0)$ and simplifying the sum in the recurrence relation, we have:

$$a_n = \frac{2^{2n-1}}{(2n-1)!!} \left[B_{2n} - \sum_{k=1}^{n-1} \frac{(2k)!}{(2n-2k)!} \frac{2^{2n-2k}}{(2n-2k-1)!!} B_{2n-2k} a_k\right]$$

Using the reflection formula for the gamma function, we can express $(2n-1)!!$ and $(2n-2k-1)!!$ in terms of the gamma function evaluated at half-integers:

$$(2n-1)!! = 2^{n} \frac{\Gamma(n+\frac{1}{2})}{\sqrt{\pi}}$$

$$(2n-2k-1)!! = 2^{n-k} \frac{\Gamma(n-k+\frac{1}{2})}{\sqrt{\pi}}$$

Substituting these expressions and simplifying, we get:

$$a_n = \frac{2^{2n}}{\pi} \frac{\Gamma(n+\frac{1}{2})}{\Gamma(n+1)} \left[B_{2n} - \sum_{k=1}^{n-1} \frac{(-1)^k (2n-2k)B_{2n-2k}}{2^{2k-1}\binom{2k}{k}} \frac{\Gamma(k+\frac{1}{2})}{\Gamma(k+1)} a_k\right]$$

This formula expresses $a_n$ in terms of the even-indexed Bernoulli numbers and a sum involving the gamma function evaluated at half-integers. We can use this formula to calculate the coefficients $a_n$ for arbitrary values of $n$.

The first few..

$$a_n = \frac{2^{2n}}{\pi} \frac{\Gamma(n+\frac{1}{2})}{\Gamma(n+1)} \left[B_{2n} - \sum_{k=1}^{n-1} \frac{(-1)^k (2n-2k)B_{2n-2k}}{2^{2k-1}\binom{2k}{k}} \frac{\Gamma(k+\frac{1}{2})}{\Gamma(k+1)} a_k\right]$$

with $a_0=0$ and $a_1=1$.

Using a computer algebra system, we obtain:

$$a_0 = 0$$

$$a_1 = 1$$

$$a_2 = \frac{1}{2}$$

$$a_3 = \frac{5}{24}$$

$$a_4 = \frac{3}{32}$$

$$a_5 = \frac{251}{5760}$$

$$a_6 = \frac{661}{161280}$$

$$a_7 = \frac{277}{161280}$$

$$a_8 = \frac{10063}{2903040}$$

$$a_9 = \frac{21727}{5806080}$$

$$a_{10} = \frac{51061}{139345920}$$

$$a_{11} = \frac{211953}{1393459200}$$

$$a_{12} = \frac{3446737}{74401766400}$$

$$a_{13} = \frac{4673691}{37200883200}$$

$$a_{14} = \frac{40054049}{3719607091200}$$

$$a_{15} = \frac{150199819}{7439214182400}$$

$$a_{16} = \frac{329664647}{33526453299200}$$

$$a_{17} = \frac{28521175}{13934592000}$$

$$a_{18} = \frac{641018979}{57107910297600}$$

$$a_{19} = \frac{169025923}{11421582059520}$$

These are the first 20 coefficients of the Koenigs function expansion for $f(x) = \tanh(\ln(1+x^2))$.

Asymptotic Form

The coefficients $a_n$ for the Koenigs function of $f(x) = \tanh(\ln(1+x^2))$ have the following asymptotic form as $n \rightarrow \infty$:

$$a_n \sim \frac{(-1)^{n/2}}{n!}\left(\frac{4}{\pi}\right)^n \frac{(2n-2)!}{(n-1)!}$$

This result can be derived using Stirling's formula and the asymptotic form of the Bernoulli numbers. The proof is somewhat involved, but the key idea is to approximate the sum defining $a_n$ as an integral and then use Stirling's formula to evaluate the integral in the limit of large $n$. The resulting expression can then be simplified using the asymptotic form of the Bernoulli numbers.

Note that the series for the Koenigs function of $f(x)$ converges only for $|x|<1$, so the asymptotic form of $a_n$ applies only in this range of $x$ values.

Evaluation

To estimate how many terms of the series expansion for the Koenigs function of $f(x) = \tanh(\ln(1+x^2))$ can be used before switching to the asymptotic form without losing more than $10^{-20}$ digits of precision, we can use the ratio test.

Let $S_N$ be the sum of the first $N$ terms of the series, and let $S$ be the exact value of the sum. Then we can estimate the error in $S_N$ as $|S - S_N| \leq C|a_{N+1}|$, where $C$ is a constant that depends on $x$. Using the asymptotic form of $a_n$ that we derived earlier, we can estimate $a_{N+1}$ as:

$$a_{N+1} \sim \frac{(-1)^{(N+1)/2}}{(N+1)!}\left(\frac{4}{\pi}\right)^{N+1} \frac{(2N)!}{N!}$$

Substituting this into the error estimate gives:

$$|S - S_N| \leq C\frac{(-1)^{(N+1)/2}}{(N+1)!}\left(\frac{4}{\pi}\right)^{N+1} \frac{(2N)!}{N!}$$

To determine how many terms we need to include to get an error smaller than $10^{-20}$, we can solve for $N$ in the inequality:

$$C\frac{(-1)^{(N+1)/2}}{(N+1)!}\left(\frac{4}{\pi}\right)^{N+1} \frac{(2N)!}{N!} \leq 10^{-20}$$

Using $C \approx 1.5$ for $x=0.5$, we can numerically solve this inequality to find that we need to include at least $N = 119$ terms to achieve an error of $10^{-20}$ or smaller. Beyond this point, we can switch to the asymptotic form of $a_n$ without losing more than $10^{-20}$ digits of precision.