# Solving for $x$ the equation $\operatorname{\vartheta}_3\left(0,x\right)=k \qquad (k \geq 1)$

Trying to answer this recent question, it reminded me a very old problem we faced almost $$50$$ years ago.

Solve for $$x$$ the equation

$$\color{red} {\operatorname{\vartheta}_3\left(0,x\right)=k} \qquad \text{with} \qquad k \geq 1$$

Thanks to Emeritus Prof. Bois and CAS, using $$x=1-t^2$$, we have an approximate expansion (have a look at my answer in the linked question) $$\operatorname{\vartheta}_3\left(0,1-t^2\right)=\frac{\sqrt{ \pi}} t\Bigg[1-\frac 14\sum_{n=1}^\infty a_n\,t^{2n}\Bigg]$$ the first twelve coefficients being given in the linked question. So,we have $$\operatorname{\vartheta}_3\left(0,1-t^2\right)$$ given as a series to $$O(t^{25})$$.

Using the corresponding series reversion to limited order $$t=\frac{\sqrt \pi } k \Bigg[1-\frac{\pi }{4 k^2}+\frac{5 \pi ^2}{96 k^4}-\frac{\pi ^3}{128 k^6}+\frac{79 \pi ^4}{92160 k^8}-\frac{3 \pi ^5}{40960 k^{10}}+\cdots+O\left(\frac{1}{k^{26}}\right)\Bigg]$$ which gives $$x=\sum_{n=0}^{12} (-1)^n \frac 1{n!} \left(\frac{\pi}{k^2}\right)^n-\frac{829782456922339}{91413063873331200}\left(\frac{\pi}{k^2}\right)^{13}+O\left(\frac{1}{k^{28}}\right)$$ which looks to be very close to $$\color{blue}{x \sim \exp\left(-\frac \pi {k^2} \right)} \tag 1$$

Checking the norm $$\Phi_n=\int_n^\infty \Bigg[\vartheta _3\left(0,\exp\left(-\frac \pi {k^2} \right)\right)-k\Bigg]^2 \,dk$$ we have $$\Phi_1=6.39\times 10^{-4}\qquad \qquad \Phi_2=7.89\times 10^{-12}\qquad \qquad \Phi_3=2.66\times 10^{-25}$$

My questions

• What could be the coefficients $$a_n$$ ?
• Can we justify $$(1)$$ ?
• Can we improve it ?

Edit

Continuing working the approximation on the basis of Mathematica expansion of $$\operatorname{\vartheta}_3\left(0,x\right)$$, I obtained the next level approximation

$$\color{blue}{x \sim \exp\left(-a^2\frac \pi {k^2} \right)} \qquad \text{where} \qquad \color{blue}{a= 1+2 e^{-\pi k^2}}\tag 2$$ Comparing the norms for small values of $$n$$

$$\left( \begin{array}{cccc} n & \log(\Phi_{(1)})& \log(\Phi_{(2)}) & \frac{\Phi_{(1)}) }{\Phi_{(2)}) } \\ 1.0 & -3.19473 & -3.92585 & 5 \\ 1.1 & -3.73138 & -4.88028 & 14 \\ 1.2 & -4.32510 & -5.96957 & 44 \\ 1.3 & -4.97563 & -7.18137 & 161 \\ 1.4 & -5.68271 & -8.51021 & 672 \\ 1.5 & -6.44613 & -9.95444 & 3223 \\ 1.6 & -7.26572 & -11.5139 & 17707 \\ 1.7 & -8.14130 & -13.1886 & 111498 \\ 1.8 & -9.07274 & -14.9785 & 804917 \\ 1.9 & -10.0599 & -16.8834 & 6659871 \end{array} \right)$$

Details about the process (and improvement ?)

Using $$x=1-t^2$$, the equation to be solved is $$\operatorname{\vartheta}_3\left(0,1-t^2\right)=k$$ we have, using the expansion given by Mathematica

$$K=\frac k {A \sqrt \pi}=\frac{1}{t}-\frac{t}{4}-\frac{7 t^3}{96}-\frac{5 t^5}{128}-\frac{787 t^7}{30720}-\frac{763 t^9}{40960}-\frac{893209 t^{11}}{61931520}+O\left(t^{13}\right)$$

$$t=\frac{1}{K}-\frac{K}{4}-\frac{7 K^3}{96}-\frac{5 K^5}{128}-\frac{787 K^7}{30720}-\frac{763 K^9}{40960}-\frac{893209 K^{11}}{61931520}+O\left(K^{13}\right)$$ that is to say $$x=1-\frac{1}{K^2}+\frac{1}{2 K^4}-\frac{1}{6 K^6}+\frac{1}{24 K^8}-\frac{1}{120 K^{10}}+\frac{1}{720 K^{12}}-\frac{1}{5040 K^{14}}+O\left(\frac{1}{K^{16}}\right)$$ that is to say $$x \sim \exp\left(-\frac 1 {K^2} \right)=\exp\left(-A^2\frac \pi {k^2} \right)$$

But, for this level of expansion, we have $$A=1+2\sum_{n=1}^6 \exp\big[n^2 \,\pi^2\,a\big]$$ $$a=-\frac{1}{1-x}+\frac{1}{2}+\frac{1-x}{12}+\frac{1}{24} (1-x)^2+\frac{19}{720} (1-x)^3+$$ $$\frac{3}{160} (1-x)^4+\frac{863 (1-x)^5}{60480}+\frac{275 (1-x)^6}{24192}$$

In this last expression, use as an approximation $$x=\exp\left(-\frac \pi {k^2} \right)$$ to approximate the value of $$A$$. Expanding for large values of $$k$$, this give $$a=-\frac{k^2}{\pi }+O\left(\frac{1}{k^{14}}\right)$$ and then $$A\sim 1+2\sum_{n=1}^6 \exp\big[-n^2 \pi k^2\big]\simeq 1+2 e^{- \pi k^2}$$ which was the previous approximation.

But, we could keep $$a$$ as it is, replace $$x$$ by $$\exp\left(-\frac \pi {k^2} \right)$$ and just keep $$A$$ as it is.

Update

In fact, $$a$$ has been later identified as $$a=-\frac 1{1-x}+\frac 12+\sum_{n=1}^\infty G_n (1-x)^n=\frac 1{\log(x)}$$ where the $$G_n$$ are Gregory coefficients (or logarithmic numbers) which makes $$A=1+2\sum_{n=1}^\infty \exp\big[n^2 \,\pi^2\,a\big]=\vartheta _3\left(0,e^{\frac{\pi ^2}{\log (x)}}\right)$$

Numerical usage

It seems potentially interesting to a use a fixed point method based on $$x_{n+1}=\exp\Bigg[- \Big[A(x_{n-1})\Big]^2 \frac \pi {k^2}\Bigg]$$ Trying for $$k=2$$ and starting with $$x_0=\exp\left(-\frac \pi {4} \right)$$ , we have the following iterates $$\left( \begin{array}{cc} n & x_n \\ 0 & \color{red}{0.45593}812776599623677 \\ 1 & \color{red}{0.45593313}260483808317 \\ 2 & \color{red}{0.455933131729}15572437 \\ 3 & \color{red}{0.4559331317290021}9973 \\ 4 & \color{red}{0.45593313172900217281} \end{array} \right)$$ which is the solution.

Numerical checks

To check the validity of the approximations, give $$x$$ a value and compute the corresponding value of $$k$$ recompute $$x$$ according to the formulae.

$$\left( \begin{array}{ccc} x_{\text{given}} & x_{(1)} & x_{(2)}\\ 0.20 & 0.202797206493824 & 0.200144745094302 \\ 0.25 & 0.251121636226435 & 0.250025537551774 \\ 0.30 & 0.300397726522987 & 0.300003574197057 \\ 0.35 & 0.350121427002546 & 0.350000376690885 \\ 0.40 & 0.400030778288808 & 0.400000027827736 \\ 0.45 & 0.450006160875082 & 0.450000001305483 \\ 0.50 & 0.500000907841419 & 0.500000000033860 \\ 0.55 & 0.550000088981712 & 0.550000000000398 \\ 0.60 & 0.600000004983438 & 0.600000000000002 \\ 0.65 & 0.650000000125653 & 0.650000000000000 \\ 0.70 & 0.700000000000959 & 0.700000000000000 \\ 0.75 & 0.750000000000001 & 0.750000000000000 \\ 0.80 & 0.800000000000000 & 0.800000000000000 \\ 0.85 & 0.850000000000000 & 0.850000000000000 \\ 0.90 & 0.900000000000000 & 0.900000000000000 \\ 0.95 & 0.950000000000000 & 0.950000000000000 \end{array} \right)$$

Let's start with relation between complete elliptic integral of the first kind (notation as in Wolfram Mathematica EllipticK function) $$K(m) = \int_0^{\pi/2} \frac{dt}{\sqrt{1-m \sin^2 t}}$$ It can be expressed in terms of $$\vartheta_3$$ $$K(m) = \frac{\pi}{2} \vartheta_3^2(0, q)$$ and $$q$$ and $$m$$ are related by $$q = \exp \left(-\pi \frac{K(1-m)}{K(m)}\right)$$ In terms of the original question we have to solve $$K(m) = \frac{\pi}{2} k^2$$ for $$m$$ and then evaluate $$x = \exp\left(-\pi \frac{K(1-m)}{K(m)}\right) = \exp\left(-\frac{2 K(1-m)}{k^2}\right)$$.

Observe that the original approximation $$x = \exp(-\pi/k^2)$$ corresponds to plugging $$K(1-m) \approx \pi/2$$.

Using rough approximation $$K(m) \approx \frac{\pi}{2} - \frac{1}{2} \log (1-m)\\ K(1-m) \approx \frac{\pi}{2} - \frac{1}{2} \log m \approx \frac{\pi}{2} - \frac{1}{2} \log \left[1 - \exp(\pi - 2K(m))\right]$$ results into an improved formula that looks like $$x = \exp\left( -\frac{\pi - \log(1 - \exp(\pi - \pi k^2))}{k^2} \right) = \exp(-\pi/k^2) \left( 1 - \exp(\pi(1-k^2)) \right)^{1/k^2}$$ It improves $$\Phi_1$$ norm by an order of magnitude.

Anyway, in my opinion for these types of problems numerical inversion or tabular methods are better. These kind of problems are addressed in 17 chapter of Abramowitz and Stegun.

• Thank you ! I missed the relation with $K$. Cheers and (+1) for sure. By the way, this is just for the art for art's sake, Oct 3, 2021 at 13:58
• I have found a next level approximation. If you don't mind, would you accept to have a look at my edit ? Tahnks again & cheers. :-) Oct 7, 2021 at 10:23
• @ClaudeLeibovici Impressive. How did you manage to collapse the series into such rather complex form? Oct 8, 2021 at 19:53
• I shall try to edit. Oct 9, 2021 at 0:54
• I added a bunch of details. Oct 9, 2021 at 4:05