# Compute inverse series for implicit equation $b=-\log(1-e^{-x})/x$

In financial mathematics, the inverse series of: $$b(x) = -\frac{\log(1-e^{-x})}{x}$$ is needed in order to perform fast calculation on swaptions for G2++ calibration model. (see this post for further references).

The unique positive solution for equation $$e^{-x}+e^{-bx}=1$$ implicitly defines $$x$$ as a function of $$b$$. There is no possible explicit solution for $$x(b)$$, unless when $$b \in {0,1/4, 1/3, 1/2, 1,2,3,4}$$, as it becomes Galois solvable.

Nevertheless, it is always possible to express $$b(x)$$ as above such that the inverse series $$x(b)$$ would provide a solution.

I managed to expand x(b) up to order 5 as follows:

$$x(b) = +\log(2) - \frac{\log(2)}{2}(b-1) + \left(\frac{1}{4} \log(2)+\frac{1}{8} \log(2)^2\right) (b-1)^2 - \left(\frac{1}{8} \log(2)+\frac{3}{16} \log(2)^2\right) (b-1)^3 + \left(\frac{1}{16} \log(2)+\frac{3}{16} \log(2)^2 + \frac{1}{32} \log(2)^3-\frac{1}{192} \log(2)^4\right) (b-1)^4 - \left(\frac{1}{32} \log(2)+\frac{5}{32} \log(2)^2 + \frac{5}{64} \log(2)^3-\frac{5}{384} \log(2)^4\right) (b-1)^5 + o\left((b-1)^5\right)$$

However, that is not nearly enough for practical applications since the convergence is really slow.

So here is my question. Can we find a general formula for the $$n^{th}$$ term? Alternatively, is there any other faster converging Series that could be derived in this case?

To be a bit more precise, I am absolutely convinced that the coefficients of the expansion are rational polynomials in $$\log(2)$$, i.e. $$a_n = P_n(\log(2))$$. And I am looking for a recursive or explicit formulation of these polynomials. Or alternatively any other Series type (Chebyshev?) the convergence of which would be faster.

Thanks a lot for your help!

• "There is no possible explicit solution for x(b), unless when $b\in\{0, 1, 2, 3, 4\}$". This doesn't seem true. For instance, the $b=1/2$ can be solved analytically exactly like the $b=2$ one. And surely one can determine is a value of $b$ for which $x=37$ is a solution. I am not even sure if your concept of "explicit solution" can be formalized enough to give a meaningful answer. – Federico Poloni Aug 29 '16 at 10:54
• Also, in practical applications I suggest solving the equation numerically with something like Newton's method. I have met people in finance who insist on having "closed-form solutions" for everything, but I think it is a misconception that arises from being familiar with maximum-likelihood problems, where either there is a closed-form solution or iterative algorithms are painfully slow. For some families of problems, numerical approximation works very well in practice, and is faster and more accurate than closed-form solutions. – Federico Poloni Aug 29 '16 at 11:09
• it seems your $(b-1)^5$ term has the wrong overall sign (should be $-$ instead of $+$) – Carlo Beenakker Aug 29 '16 at 11:14
• Oh Yes you are right! Thank you so much. I just edited the question and flip it back to -. Thank you. – handelskai Aug 29 '16 at 11:50
• I'm wondering if the solns of $z = x + t x^n$ as sketched in the pdf "Discriminating deltas, depressed equations, and generalized Catalan numbers" (tcjpn.wordpress.com/2012/06/13/…) might be of help, along the lines of Robert's arguments. See also the MSE-Q "Taylor series of the inverse of $x^4 + x$" (math.stackexchange.com/questions/683372/…) and my comments there related to convergence. – Tom Copeland Aug 30 '16 at 7:17

Writing $e^{-x} = t$, your equation is $t + t^b = 1$. I'll assume $0 < b < 1$ (for the case $b > 1$, write $s = t^b$ and the equation becomes $s + s^{1/b} = 1$).

Now the slightly more general equation $t + \epsilon t^b = 1$ has a nice series solution

$$t = 1 - \sum_{n=1}^\infty \left( \prod_{j=0}^{n-2} (j-nb)\right) \frac{\epsilon^n}{n!}$$ With our assumption $0 < b < 1$, at $\epsilon = 1$ the series should converge to a solution for your equation.

• This is a very nice series indeed. For the case $\epsilon=1$, I made the following command with PARI/GP to test the convergence when $b=1/2$. In that case $t$ should converge towards the golden ratio: Here is what I get: ? b=1/2 %1 = 1/2 ? a(n,b)=prod(j=0,n-2, (j-n*b), 1) ? S = sum(n=1,30,a(n,b)/n!)-(sqrt(5)-1)/2 %2 = -3.783252679863109113091168556 E-12. Such that 30 terms are sufficient to obtain 1e-10 precision. This is quite remarkable. Could you give some explanation on how you derived this series? Thank you! – handelskai Aug 30 '16 at 2:13
• It comes from the Lagrange Inversion Formula. – Robert Israel Aug 30 '16 at 5:10
• Graphically, the soln for $t$ for $t+t^b=1$ is the slope of the tangent line $y=t(x+1)-1$ (through the point(x=-1,y=-1)) to the curve $y = (b-1)(x/b)^{b/(b-1)}$ for $x$ and $b > 0$. – Tom Copeland Aug 31 '16 at 5:28
• @handelska, perhaps you mean that $2-t$ gives the golden ratio $1.618$ for $t+t^{1/2}=1$ with $t$ approx. $.382$. – Tom Copeland Aug 31 '16 at 6:27
• $1+t$ gives the golden mean for $t$ the soln of $t+t^2=1$. See Appendix A of "Series expansion of generalized Fresnel integrals" by Mathar for more on the coefficients (arxiv.org/pdf/1211.3963v1.pdf). – Tom Copeland Aug 31 '16 at 19:55

Taylor series are popular only because they are taught in calculus, but usually are quite bad for practical numerical approximation like you want here.

Look for Padé approximants, Chebyshev series, or minimax approximations. Also, you should probably specify in which interval you want the approximation to be accurate.

• Thanks for your interest in my problem. In this case I am really looking for an explicit closed form solution of the n th term. The problem at hand suffers from the fact that numerical approximation dramatically slow down the algorithm, since they have to be numerically integrated in a second step. The reason why an explicit Taylor series is needed here is because we want to control accuracy of the results to an arbitrary precision. That is why for practical reasons, we are not looking for a numerical approximation here... – handelskai Aug 29 '16 at 12:05
• @handelskai You can integrate Chebyshev series and minimax approximants just as well as Taylor series; they are all polynomials in the end. In any case, maybe you should ask about the actual problem including the integral. – Federico Poloni Aug 29 '16 at 12:16
• Do you mean that in the case at hand, it would be more efficient to express $x(b)$ as linear combination of Chebychev polynomials rather than the classical Taylor expansion? – handelskai Aug 29 '16 at 12:24
• You can find the integral in Brigo & Mercurio pp.158 equation 4.31. Nevertheless you will find that for the sake of tractability I considered the utmost simplest case here. – handelskai Aug 29 '16 at 12:32
• @handelskai Yes, truncated Chebyshev series typically converge faster than Taylor series. And minimax polynomial, by definition, minimize $||f(x)-p(x)||_\infty$ over an interval, so they are optimal in a different sense. – Federico Poloni Aug 29 '16 at 19:02

here is the series up to order 15, extension to higher order is no big deal using Mathematica or Maple or the like (which will also give you the numerical coefficients symbolically, I omit these expressions here since they are so lengthy):

$$x(b)=0.693147-0.346574 (b-1)+0.233343 (b-1)^2-0.176728 (b-1)^3+0.142611 (b-1)^4-0.119744 (b-1)^5+0.103319 (b-1)^6-0.0909353 (b-1)^7+0.0812552 (b-1)^8-0.0734749 (b-1)^9+0.0670814 (b-1)^{10}-0.0617317 (b-1)^{11} +0.0571879 (b - 1)^{12} - 0.0532792 (b - 1)^{13} + 0.0498804 (b - 1)^{14} - 0.0468971 (b - 1)^{15}+ O(b-1)^{16}$$

the coefficient of $(b-1)^n$ is a polynomial $P_n(u)$ in $u=\log 2$ with rational coefficients, for example

$$P_{10}(u)=\frac{31 u^{10}}{14515200}-\frac{79 u^9}{1548288}+\frac{23 u^8}{229376}+\frac{u^7}{256}-\frac{973 u^6}{49152}-\frac{105 u^5}{8192}+\frac{455 u^4}{4096}+\frac{105 u^3}{1024}+\frac{45 u^2}{2048}+\frac{u}{1024}$$

$$P_9(u)=\frac{17 u^8}{143360}-\frac{21 u^7}{10240}+\frac{203 u^6}{30720}+\frac{105 u^5}{4096}-\frac{21 u^4}{256}-\frac{63 u^3}{512}-\frac{9 u^2}{256}-\frac{u}{512}$$

• Thanks a lot for your interest in the question. As you might have read from above, I am not interested in a numerical approximation. You can convince yourself that the approximation above is still quite weak since $x(2) = -\log(\frac{sqrt(5)-1}{2})=0.4812118$, pluging into the equation above even 200 terms would not suffice to obtain 10e-3 accuracy. I am absolutely convinced that the coefficients of the expansion are rational polynomials in $log(2)$, i e $a_n = P_n(log(2))$. I am looking for a recursive or explicit formulation of these polynomials. – handelskai Aug 29 '16 at 12:12
• Seems like you obtained symbolic expressions using Mathematica or Maple. Could you right down these expressions for coefficients 6 and 7? I am curious to see if they are still rational polynomials in log (2)... – handelskai Aug 29 '16 at 13:23
• added the coefficient of orders 9 and 10, they are indeed all polynomials in $\log 2$ with rational coefficients – Carlo Beenakker Aug 29 '16 at 13:34
• O yes! Thank you so much. Obviously powers of 2 also seem to play a significant role in these expressions. I wonder if one could come up with a recursive formula for these polynomials. ... – handelskai Aug 29 '16 at 13:44