# Residue involving Lambert function: $\underset{z=\frac{2}{\pi}W(\frac{\pi}{2})}{\text{Res}}\dfrac{1}{(e^{-\pi x}-x^2)^n}$

## Context

I was tring to find a way to evaluate the infinite tetration of $$i$$ defined as: $${}^{\infty}i:=i^{i^{i^{.^{.^{.}}}}}$$

## 1° attempt

Considering $$z=i^{i^{i^{.^{.^{.}}}}}$$ we can notice that $$z=i^z$$, solving this equation we have that: $$z=\dfrac{2i}{\pi}W\left(-\dfrac{\pi i }{2}\right)$$ Where $$W(x)$$ is the Lambert function.

## 2° attempt

I tried to solve it by separating the absolute value and the argument: $$z=\rho e^{i\theta}=x+iy$$ $$x+iy=i^{x+iy}\\ \rho e^{i\theta}=e^{\frac{\pi}{2} i(x+iy)}\\ \rho e^{i\theta}=e^{\frac{\pi}{2} ix-\frac{\pi}{2} y}\\ \rho=e^{-\frac{\pi}{2} y}\qquad \theta=\dfrac{\pi}{2} x$$ I tried to graphically look at their representation considering $$\rho=\sqrt{x^2+y^2}$$ and $$\theta=\arctan\left(\dfrac{y}{x}\right)$$

Now I have this system: $$\begin{cases}\sqrt{x^2+y^2}=e^{-\frac{\pi}{2} y}\\\arctan\left(\dfrac{y}{x}\right)=\dfrac{\pi}{2} x\end{cases}\quad\Rightarrow\quad\begin{cases}x^2+y^2=e^{-\pi y}\\y=\tan\left(\dfrac{\pi x}{2}\right)x\end{cases}$$ I tried to calculate the inverse function that appears in the first equation: $$x=\sqrt{e^{-\pi y}-y^2}$$ and after several steps I found that I had to calculate the following residue: $$\underset{x=\frac{2}{\pi}W\left(\frac{\pi}{2}\right)}{\text{Res}}\dfrac{1}{\left(e^{-\pi x}-x^2\right)^n}\qquad\text{for }n\in\mathbb{N}^{+}$$

## Aspect of interest

Is that both functions are: In addition to both being even functions, it turns out that although these two functions are not periodic, they intersect infinitely with tangents that are always perpendicular:

## Question

How can I calculate the closed form of this residue?

$$\color{blue}{w_n:=\underset{x=\frac{2}{\pi}W\left(\frac{\pi}{2}\right)}{\text{Res}}\dfrac{1}{\left(e^{-\pi x}-x^2\right)^n}\qquad\text{for }n\in\mathbb{N}^{+}}$$

Where $$W(z)$$ is the Lambert function.

Considerig $$\color{red}{k:=W\left(\frac{\pi}{2}\right)}$$ for brevity, the first cases are:

• $$w_1=-\left(\dfrac{\pi}{k(k+1)}\right)^1\cdot\dfrac{1}{4}$$
• $$w_2=+\left(\dfrac{\pi}{k(k+1)}\right)^3\cdot\dfrac{2k^2-1}{32}$$
• $$w_3=-\left(\dfrac{\pi}{k(k+1)}\right)^5\cdot\dfrac{8k^4-4k^3-12k^2+3}{512}$$
• $$w_4=+\left(\dfrac{\pi}{k(k+1)}\right)^7\cdot\dfrac{48k^6-64k^5-132k^4+40k^3+90k^2-15}{12288}$$
• $$w_5=-\left(\dfrac{\pi}{k(k+1)}\right)^9\cdot\dfrac{384k^8-928k^7-1448k^6+1424k^5+1980k^4-420k^2-840k^2+105}{393216}$$

So in general I think the general solution has this form: $$\color{blue}{w_n=(-1)^n\left(\dfrac{\pi}{k(k+1)}\right)^{2n-1}\cdot\dfrac{P_{n}(k)}{2^{3n-1}\cdot(n-1)!}}$$ Where $$P_{n}(x)$$ is a degree $$(2n-2)$$ polynomial with the following properties:

1. $$P_n(-1)=(2n-3)!!\qquad$$ ($$x!!$$ is the double factorial)
2. The term of degree $$0$$ is $$(-1)^{n-1}\cdot (2n-3)!!$$
3. The term of degree $$1$$ is zero.
4. The term of degree $$n$$ is $$(2n-2)!!=2^{n-1}(n-1)!$$

The first polynomials I was able to compute are:

• $$P_{1}(x)=1$$
• $$P_{2}(x)=2x^2-1$$
• $$P_{3}(x)=8x^4-4x^3-12x^2+3$$
• $$P_{4}(x)=48x^6-64x^5-132x^4+40x^3+90x^2-15$$
• $$P_{5}(x)=384x^8-928x^7-1448x^6+1424 x^5+1980x^4-420x^3-840x^2+105$$
• $$P_{6}(x)=3840x^{10}-14208x^9-15488 x^8+37424 x^7+36880x^6-26544 x^5-31080x^4+5040x^3+9450x^2-945$$
• $$P_{7}(x)=46080 x^{12}-237312 x^{11}-138624 x^{10}+903424x^9+567408 x^8-1116480x^7-901040x^6+497952 x^5+529200 x^4-69300 x^3-124740x^2+ 10395$$
• $$P_{8}(x)=645120x^{14}-4349952x^{13}-118016x^{12}+21436160 x^{11}+4877280x^{10}-39785600 x^9-20113072x^8+30796704 x^7 + 22251600x^6-9868320x^5-9854460x^4+1081080x^3+1891890 x^2 - 135135$$
• $$P_{9}(x)=10321920 x^{16}- 87330816 x^{15}+ 50932224 x^{14}+ 512583680 x^{13}- 135690880 x^{12}- 1302740160 x^{11}- 221455936 x^{10}+ 1534016384 x^9+ 699496560 x^8- 845079840 x^7 - 569451960 x^6+ 209729520 x^5+200540340 x^4- 18918900 x^3- 32432400 x^2+2027025$$

Etc...

I put the coefficients from $$P_1(x)$$ to $$P_{13}(x)$$ in this triangular pattern to better visualize the values:

$$\begin{array}{rrrrrrrrrrrrcllllllllllll} &&&&&&&&&&&&_1\\ \hline &&&&&&&&&&&_2&_0&_{\color{red}{-1}}\\ \hline &&&&&&&&&&_8&_{\color{red}{-4}}&_{\color{red}{-12}}&_0&_3\\ \hline &&&&&&&&&_{48}&_{\color{red}{-64}}&_{\color{red}{-132}}&_{40}&_{90}&_0&_{\color{red}{-15}}\\ \hline &&&&&&&&_{384}&_{\color{red}{-928}}&_{\color{red}{-1448}}&_{1424}&_{1980}&_{\color{red}{-420}}&_{\color{red}{-840}}&_0&_{105}\\ \hline &&&&&&&_{3840}&_{\color{red}{-14208}}&_{\color{red}{-15488}}&_{37424}&_{36880}&_{\color{red}{-26544}}&_{\color{red}{-31080}}&_{5040}&_{9450}&_0&_{\color{red}{-945}}\\ \hline &&&&&&_{46080}&_{\color{red}{-237312}}&_{\color{red}{-138624}}&_{903424}&_{567408}&_{\color{red}{-1116480}}&_{\color{red}{-901040}}&_{497952}&_{529200}&_{\color{red}{-69300}}&_{\color{red}{-124740}}&_0&_{10395}\\ \hline &&&&&_{645120}&_{\color{red}{-4349952}}&_{\color{red}{-118016}}&_{21436160}&_{4877280}&_{\color{red}{-39785600}}&_{\color{red}{-20113072}}&_{30796704}&_{22251600}&_{\color{red}{-9868320}}&_{\color{red}{-9854460}}&_{1081080}&_{1891890}&_0&_{\color{red}{-135135}}\\ \hline &&&&_{10321920}&_{\color{red}{-87330816}}&_{50932224}&_{512583680}&_{\color{red}{-135690880}}&_{\color{red}{-1302740160}}&_{\color{red}{-221455936}}&_{1534016384}&_{699496560}&_{\color{red}{-845079840}}&_{\color{red}{-569451960}}&_{209729520}&_{200540340}&_{\color{red}{-18918900}}&_{\color{red}{-32432400}}&_0&_{2027025}\\ \hline &&&_{185794560}&_{\color{red}{-1911767040}}&_{2380548096}&_{12435495936}&_{\color{red}{-11230101760}}&_{\color{red}{-40444523520}}&_{10605697600}&_{67185673856}&_{11246571936}&_{\color{red}{-56339106560}}&_{\color{red}{-24293530800}}&_{23789010960}&_{15281426160}&_{\color{red}{-4797833040}}&_{\color{red}{-4443238800}}&_{367567200}&_{620269650}&_0&_{\color{red}{-34459425}}\\ \hline &&_{3715891200}&_{\color{red}{-45403176960}}&_{88809394176}&_{304618168320}&_{\color{red}{-542481679360}}&_{\color{red}{-1196513206784}}&_{1056393994880}&_{2677512110336}&_{\color{red}{-555243289280}}&_{\color{red}{-3204955762240}}&_{\color{red}{-568295633664}}&_{2050613136000}&_{855124189920}&_{\color{red}{-696743087040}}&_{\color{red}{-432280648800}}&_{118062584640}&_{106686379800}&_{\color{red}{-7856748900}}&_{\color{red}{-13094581500}}&_0&_{654729075}\\ \hline &_{81749606400}&_{\color{red}{-1163994071040}}&_{3157404549120}&_{7404607168512}&_{\color{red}{-22961450293248}}&_{\color{red}{-33019002361856}}&_{63005932451840}&_{97343743979776}&_{\color{red}{-75013307410688}}&_{\color{red}{-161351897989888}}&_{23949914036224}&_{147655256436480}&_{27950317851456}&_{\color{red}{-75531748131840}}&_{\color{red}{-30823056744480}}&_{21371092142400}&_{12914289788400}&_{\color{red}{-3117557963520}}&_{\color{red}{-2762956696500}}&_{183324141000}&_{302484832650}&_0&_{\color{red}{-13749310575}}\\ \hline _{1961990553600}&_{\color{red}{-32062337187840}}&_{112598807740416}& _{171315761872896}&_{\color{red}{-929295126183936}}&_{\color{red}{-785427471704064}}&_{3224048625086464}&_{3108838134571008}&_{\color{red}{-5607501784821504}}&_{\color{red}{-7203781137012736}}&_{4632255496628736}&_{9229708405761024}&_{\color{red}{-892152626613248}}&_{\color{red}{-6733346574864000}}&_{\color{red}{-1350185114678400}}&_{2848465773753600}&_{1145257280687520}&_{\color{red}{-688389482420640}}&_{\color{red}{-407477187117000}}&_{88068917336400}&_{76831147493100}&_{\color{red}{-4638100767300}}&_{\color{red}{-7589619437400}}&_0&_{316234143225} \end{array}$$

I highlighted the negative numbers with red, at the beginning I thought it changed sign every $$2$$ but going beyond $$P_9(x)$$ you see that this is not the case

• Your results are very correct and (+1). Now, to find the $P_n(x)$ is not very obvious Dec 1, 2023 at 13:18
• You can also evaluate $\frac1{(n-1)!}\left.\frac{d^{n-1}}{dx^{n-1}}\left(\frac{x-x_0}{e^{-\pi x}-x^2}\right)^n\right|_{x_0},x_0=\frac2\pi W(\frac\pi2)$. These likely are the series coefficients of the inverse of $e^{-\pi x}-x^2$ at $x=x_0$. If you did this to try and invert $e^{-\pi x}-x^2$, then there likely are easier series than this one. Would this be wanted? Jan 20 at 15:24