4
$\begingroup$

Update: \begin{align*} |I_n-J_n| = (\pi-S_n)\sum_{k=0}^n |\frac{a_kp_k(\ln\pi)}{\ln^{k+1}\pi}| \end{align*} and \begin{align*} |I_n| = \sum_{k=0}^n | \frac{a_k\pi p_k(\ln\pi)}{\ln^{k+1}\pi} -\sum_{k=0}^n\frac{a_kk!}{\ln^{k+1}\pi}| \leq |\sum_{k=0}^n \frac{a_k\pi p_k(\ln\pi)}{\ln^{k+1}\pi} | + |\sum_{k=0}^n\frac{a_kk!}{\ln^{k+1}\pi}|\\ \implies - |\sum_{k=0}^n \frac{a_k\pi p_k(\ln\pi)}{\ln^{k+1}\pi} | \leq |\sum_{k=0}^n\frac{a_kk!}{\ln^{k+1}\pi}| -|I_n| \\\implies |I_n-J_n| = (S_n-\pi)\sum_{k=0}^n -|\frac{a_kp_k(\ln\pi)}{\ln^{k+1}\pi}|\\ \leq (S_n-\pi)\left(|\sum_{k=0}^n\frac{a_kk!}{\ln^{k+1}\pi}|-|I_n|\right) \end{align*} where I believe the $a_k$'s are the coeffcients of the shifted legendre polynomials. I believe $a_k<k!$ for every non negative $k$ because since $I_n= \sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)} ( \pi p_k(\ln\pi) - k! )$ goes to $0$ as $n$ grows larger, that means that $( \pi p_k(\ln\pi) - k! )$ goes to $0$ (in a factorial rate) faster than $a_k$'s goes to infinity, as $n$ grows larger.

Question

I asked this in another forum but hoping someone will help me here.

For some positive integer $n$, define $I_n$ as \begin{align} I_n&=\int_0^1 \frac{(x-x^2)^n}{n!} \pi^x\ln^n\pi dx \\ \end{align} this integral has the following form \begin{align*} I_n&=\sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)} ( \pi p_k(\ln\pi) - k! ) \tag{1} \end{align*} where $a_k$ are integers and $p_k(\ln\pi)$ are polynomials with degree $k$ evaluated at $\ln\pi$.

This integral is positive and will always converge, and $\lim_{n\to\infty}I_n=0$. Notice that $\pi$ is present in expression $(1)$. (I'm not talking about $\pi$ inside the $\ln$ but rather the factor the multiplies $p_k$). What will happen if we change this $\pi$ to an approximation of it? Consider the expression, \begin{align*} J_n&=\sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)} ( S_n p_k(\ln\pi) - k! ) \end{align*} where $S_n$ is a truncated series such that $\lim_{n\to\infty}S_n=\pi$. For example, consider the truncated BBP formula \begin{align*} S_{n}=\sum_{k=0}^{f(n)}\left( \frac{4}{16^k(8k+1)} -\frac{2}{16^k(8k+4)} -\frac{1}{16^k(8k+5)} -\frac{1}{16^k(8k+6)}\right) \end{align*} where $f(n)$ is some function in $n$ such that the following must be true \begin{align*} \lim_{n\to\infty} \frac{16^{f(n)}e^{8f(n)}}{n!}=0. \tag{2} \end{align*}

I noticed that if we choose a bad $f(n)$ such as $f(n)=n$, our $S_n$ will approximate $\pi$ very slowly, and $J_n$ will diverge to infinity or negative infinity as $n$ grows larger. For example, with $f(100)=100$ we must only iterate the BBP formula $100$ times giving a bad approximation to $\pi$ which results in the large difference between $I_{100}=7.7472...\cdot 10^{-241}$ and $J_{100}=-3.2990\cdot 10^{84}$.

However, if we choose $f(n)=\lfloor n(\ln n)^{0.99}\rfloor$ the limit $(2)$ will be true (I used SageMath to evaluate this), and it gives a much better approximation. For example, now $f(100)=453$, and iterating the BBP formula $453$ times, gives a better approximation for $\pi$ and now $J_{100}=7.7472...\cdot10^{-241}$ has $75$ correct digits when comparing with $I_{100}$.

With this $f(n)=\lfloor n(\ln n)^{0.99}\rfloor$ will the truncated BBP formula always produce an approximation of $\pi$ good enough so that $\lim_{n\to\infty}J_n=0$ ? And how close it is from $I_n$ ? In the end of this post there is an upper bound for $I_n$. I need an upper bound for $J_n$. If this $f(n)$ is not good enough, there exists a $f(n)$ respecting $(2)$ that will make $J_n$ always converge when $n$ goes to infinity?

Example: Consider $n=2$ \begin{align} I_2&= (12 (-1 + π) - 6 (1 + π) \log(π) + (-1 + π) \log^2(π))/(\log^3(π)) \approx 0.0396. \end{align} To find $J_2$ we must find $S_2$: \begin{align*} S_{2}=\sum_{k=0}^{f(2)}\left( \frac{4}{16^k(8k+1)} -\frac{2}{16^k(8k+4)} -\frac{1}{16^k(8k+5)} -\frac{1}{16^k(8k+6)}\right) \end{align*} where $f(2)=1$, which gives the following approximation for $\pi$: $S_2=102913/32760.$ Therefore we have, \begin{align} J_2&= (12 (-1 + 102913/32760) - 6 (1 + 102913/32760) \log(π) + (-1 + 102913/32760) \log^2(π))/(\log^3(π)) \approx 0.0388. \end{align}

More information:

For some $b>0$, \begin{align*} \int_0^1 x^n b^x dx = \int_0^1 x^n e^{\ln(b) x} dx = \frac{1}{\ln^{n+1}(b)} \int_0^{\ln(b)} x^n e^x dx. \end{align*} Let's change $x^n$ for a polynomial $P_n(x)=\sum_{k=0}^n a_kx^k$, \begin{align*} \int_0^1 P_n(x) b^x dx = \sum_{k=0}^n \frac{a_k}{\ln^{k+1}(b)} \int_0^{\ln(b)} x^k e^x dx \end{align*} where $\int x^ke^xdx$ has the shape $e^xp_k(x)$ where $p_k(x)$ is a polynomial with degree $k$ and has integer coefficients. The independent coefficient is $k!$. Integrating from $0$ to $\ln b$ we have $\int_0^{\ln b} x^ke^xdx=e^{\ln b} p_k(\ln b)-e^0p_k(0) = bp_k(\ln b)-k!$. Take $b=\pi$. Thus, \begin{align*} I_n&=\int_0^1 P_n(x) \pi^x dx = \sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)} \int_0^{\ln(\pi)} x^k e^x dx\\ &=\sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)} ( \pi p_k(\ln\pi) - k! ). \end{align*} Denote the above integral by $I_n$, where $P_n(x)$ is the following polynomial \begin{align*} P_n(x)=\frac{d^n}{dx^n} \frac{(x-x^2)^n}{n!}. \end{align*} We can integrate by parts $n$ times $I_n$ using the following rule \begin{align*} \int_a^b \frac{d^n}{dx^n}f(x)g(x)dx=(-1)^n\int_a^b f(x)\frac{d^n}{dx^n}g(x)dx \end{align*} if $f(a)g(a)=f(b)g(b)=0.$

\begin{align*} \int_0^1 \frac{d^n}{dx^n} \frac{(x-x^2)^n}{n!} \pi^x dx &=(-1)^n \int_0^1 \frac{(x-x^2)^n}{n!} \frac{d^n}{dx^n} \pi^xdx \\ &=(-1)^n\int_0^1 \frac{(x-x^2)^n}{n!} \pi^x\ln^n\pi dx. \end{align*} Thus, \begin{align*} |I_n|&=\int_0^1 \frac{(x-x^2)^n}{n!} \pi^x\ln^n\pi dx \\ &\leq\frac{1}{n!}\int_0^1 [max(x-x^2)]^n \pi^x \ln^n\pi dx \\ &=\frac{1}{n!} (1/4)^n \ln^n\pi \int_0^1\pi^xdx \\ &= \frac{1}{n!} (1/4)^n \ln^n\pi \frac{\pi-1}{\ln\pi}. \end{align*}

$\endgroup$
6
  • $\begingroup$ Can you link to the other forum where you asked about this? And put a link there to your question here? $\endgroup$ Commented Oct 3, 2023 at 3:05
  • $\begingroup$ For each nonnegative integer $n$ we have $$I_n-J_n=\sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)} ( \pi p_k(\ln\pi) - k! )-\sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)} ( S_n p_k(\ln\pi) - k! )=$$ $$(\pi-S_n)\sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)}p_k(\ln\pi).$$ Thus I think to answer your questions we have to estimate the latter value, so we need to have upper bounds for $|a_k|$'s and $|p_k(x)|$'s, at $x=\ln\pi$. Can you provide these bounds? $\endgroup$ Commented Oct 5, 2023 at 4:48
  • 1
    $\begingroup$ @AlexRavsky I think the $a_k$'s are the coefficients of the shifted legendre polynomials. en.wikipedia.org/wiki/… $\endgroup$
    – Pinteco
    Commented Oct 5, 2023 at 7:47
  • $\begingroup$ I guess some signs "$=$" in the update should be replaced by "$\le$", and "$\pi-S_n$" by "$|\pi-S_n|$". $\endgroup$ Commented Oct 5, 2023 at 10:34
  • 1
    $\begingroup$ @GerryMyerson I posted here math.stackexchange.com/questions/4778123/… $\endgroup$
    – Pinteco
    Commented Oct 6, 2023 at 4:06

1 Answer 1

2
+150
$\begingroup$

For each nonnegative integer $n$ we have $$I_n-J_n=\sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)} ( \pi p_k(\ln\pi) - k! )-\sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)} ( S_n p_k(\ln\pi) - k! )=$$ $$(\pi-S_n)\sum_{k=0}^n \frac{a_k}{\ln^{k+1}(\pi)}p_k(\ln\pi).$$

As far as I see, $P_n(x)$ from the question equals $\widetilde P_n(x)$ from the Wikipedia article. Next, as I see, $e^xp_k(x)=\int_{0}^{x} y^ke^y dy+p_k(0)$ (by the way, in the question is written that $p_k(0)=k!$, whereas Mathcad calculations suggest that $p_k(0)=(-1)^kk!$; for instance, I obtained $\int x^3e^x dx=(x^3-3x^2-6x-6)e^x+C$ and $\int x^4e^x dx=(x^4-4x^3+12x^2-24x+24)e^x+C$).

Thus we have $$\sum_{k=0}^n \frac{a_k}{\ln^{k+1} \pi}p_k(\ln\pi)=$$ $$\sum_{k=0}^n \frac{a_k}{\ln^{k+1} \pi}e^{-\ln\pi}\left(\int_{0}^{\ln\pi} y^ke^y dy+p_k(0)\right)=$$ $$e^{-\ln\pi}\sum_{k=0}^n \frac{a_k}{\ln^{k+1} \pi}\int_{0}^{\ln\pi} y^ke^y dy+e^{-\ln\pi}\sum_{k=0}^n \frac{a_k}{\ln^{k+1} \pi}p_k(0)=$$ $$\frac 1\pi I_n+\frac 1\pi\sum_{k=0}^n \frac{a_k}{\ln^{k+1} \pi}p_k(0).$$

Then $$I_n-J_n=\left(1-\frac{S_n}{\pi}\right)\left(I_n+\sum_{k=0}^n \frac{a_k}{\ln^{k+1} \pi}p_k(0)\right).$$

Thus we have to bound the absolute value of $T_n=\sum_{k=0}^n \frac{a_k}{\ln^{k+1} \pi}p_k(0)$. I assume that $p_k(0)=(-1)^kk!$. Then $$T_n= (-1)^n\sum_{k=0}^n \frac 1{\ln^{k+1} \pi}\cdot {n\choose k}{n+k\choose k}k!=$$ $$(-1)^n\sum_{k=0}^n \frac 1{\ln^{k+1} \pi}\cdot \frac{n!}{(n-k)!k!}\cdot\frac{(n+k)!}{n!k!}\cdot k!=$$ $$(-1)^n\sum_{k=0}^n \frac 1{\ln^{k+1} \pi}\cdot \frac{(n+k)!}{(n-k)!k!}.$$

A rather rough estimation is $(n+k)!\le (2n)!$ for each nonegative integer $k\le n$. Thus

$$|T_n|\le \sum_{k=0}^n \frac 1{\ln^{k+1} \pi}\cdot \frac{(2n)!}{(n-k)!k!}=$$ $$\frac{(2n)!}{n!}\sum_{k=0}^n \frac 1{\ln^{k+1} \pi}\cdot \frac{n!}{(n-k)!k!}=\frac{(2n)!}{n!\ln\pi}\left(1+\frac 1{\ln\pi}\right)^n.$$

Unfortunately, I expect that we cannot compensate the growth even of the last summand $(-1)^n\frac 1{\ln^{n+1} \pi}\cdot \frac{(2n)!}{0!n!}$ for $T_n$ of this bound by suitable choice of $f(n)$. Indeed, approximating $|S_n-\pi|$ by the last summand $$\frac{4}{16^k(8k+1)} -\frac{2}{16^k(8k+4)} -\frac{1}{16^k(8k+5)} -\frac{1}{16^k(8k+6)}$$ in the sum for $S_n$, we obtain that $$|S_n-\pi|\approx \frac{120k^2+151k+47}{(8k+1)(8k+4)(8k+5)(8k+6)}\approx \frac{15}{64}16^{-k}k^{-2},$$ where $k=f(n)$. This value should compensate the value $$\frac 1{\ln^{n+1} \pi}\cdot \frac{(2n)!}{0!n!}.$$ Neglecting the factors of the smaller growth, we obtain that $16^{f(n)}\ge\approx \frac{(2n)!}{n!}$. But then $$\lim_{n\to\infty} \frac{16^{f(n)}e^{8f(n)}}{n!}\ge\approx e^{8f(n)}\frac{(2n!)}{n!^2}=\lim_{n\to\infty} e^{8f(n)}{2n\choose n}=\infty,$$ which violates $(2)$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .