# Integral $\int_1^\infty\frac{dx}{1+2^x+3^x}$

Can the integral $$\int_1^\infty\dfrac{dx}{1+2^x+3^x}$$ be given in closed form?

This question arises naturally when I considered doing integrals. What makes an integral hard? Well, the integrand, of course. So why is it hard to integrate some integrands? For starters, I need to say that there are definite and indefinite integrals and that might affect the difficulty of the integral, but in both cases the situation seems the same.

Let's say $f(x)$ is the (elementary) integrand. For starters, consider short expressions for $f(x)$. That makes sense, because logically long expressions are harder to integrate on average. So, we consider elementary functions $f(x)$ with a short expression.

If $f(x)$ is mainly a product of simple functions, in other words, if $f(x)$ contains more products then sums then by using integration by parts it is clear that the integral of $f(x)$ is more likely to be 'solvable'. Similarly, if $f(x)$ contains more products than compositions, it is easier in general. So, in order of difficulty:

$$\text{products}<\text{compositions}<\text{sums}$$

The argument: there is only one formula for sums when it comes to integrals or derivatives and that is the trivial $\int a(x) + b(x) dx = \int a(x) dx + \int b(x) dx$ or $(a(x)+b(x))' = (a(x))' + (b(x))'$. However, the formula for products and compositions are more powerful and lead more to success.

As an example, I will give three integrals of about the same notational length. They are similar but the argument above seems to make a point. Which of the functions below do you consider easier to integrate?

$$\color{Red}{\sin(x) (e^x + \cos(x))},\,\, \color{Blue}{e^{\sin(x)} \cos(x)}\, \text{or}\color{Green}{\dfrac{1+\cos(x)}{e^x+\sin(x)}}?$$

Or maybe some examples from MSE itself? Consider the list of integrals below.

$$\int_1^\infty\dfrac{\operatorname{arccot}\left(1+\frac{2\pi}{\operatorname{arcoth}x-\operatorname{arccsc}x}\right)}{\sqrt{x^2-1}}\,dx$$

This value is known to agree with a closed form for the first $9000$ digits, yet no satisfactory proof has been given. All the following integrals, though, have closed forms:

$$\int_{-1}^1\frac1x\sqrt{\dfrac{1+x}{1-x}}\ln\left(\frac{2\,x^2+2\,x+1}{2\,x^2-2\,x+1}\right) \, dx$$

$$\int_0^1\dfrac{\ln\left(x+\sqrt2\right)}{\sqrt{2-x}\,\sqrt{1-x}\,\sqrt{\vphantom{1}x}}\,dx$$

$$\int_0^1\log\log\left(\dfrac{1}{x}+\sqrt{\frac{1}{x^2}-1}\right)\, dx$$

$$\int_0^\infty\dfrac{\ln\left(1+x+\sqrt{x^2+2\,x}\right)\,\ln\left(1+\sqrt{x^2+2\,x+2}\right)}{x^2+2x+1}\,dx$$

$$\int_0^1\dfrac{dx}{\sqrt{1-x}\ \sqrt[4]x\ \sqrt[4]{2-x\,\sqrt3}}$$

$$\int_0^{\frac{\ln^22}4}\,\dfrac{\arccos\frac{\exp\sqrt x}{\sqrt2}}{1-\exp\sqrt{4\,x}}\,dx$$

So, why is the first one so much more difficult or impossible?

Note that the first integral contains more additions while the others have more compositions and products. Those compositions and products lead to possible ways to attack the problem with substitutions, pattern recognitions, integration by parts and rewritting them as (not too complicated) infinite sums.

Many deceivingly simple looking integrals are of the form $\displaystyle\int f\left(\frac{1}{a(x)+b(x)}\right)g(x)\,dx$, where $a$ and $b$ are not both polynomials and $f$ is not the exponential, sine or cosine. It is also hard to see how to use contour integrals to deal with integrands that contain a lot of sums, in particular when $\int_1^{\infty}f(x)\,dx$ does not equal an integer.

There have been complains about a lack of motivation for posting integrals on MSE, so hereby I did show my motivation.

As for showing how far I got, I must admit I am nowhere. I do not know how to start with this integral since all the methods I know well do not seem to help or at least I do not see it.

This particular integral definitely looks simple. What changes when we try to evaluate it?

To start with, a simple substitution like $u=e^x, du=e^xdx$ goes like this:

$$\int\frac{dx}{1+2^x+3^x}=\int\frac {e^xdx}{e^x+e^{x(\ln 2+1)}+e^{x(\ln 3+1)}}=\int\frac{du}{u+u^{\ln 2+1}+u^{\ln 3+1}}$$

Already we have left the carefree world of simple functions behind, and this new function does not look easy... Perhaps a different approach would help:

$$3^x+2^x=(3^{\frac x2}+2^{\frac x2})^2-\sqrt{6^x}$$

No, that looks even worse.

This is part of the difficulty with integrals of this type; the common transformations that we are familiar with often fail to line up with certain problems that we would like to solve.

Since $1+2^x+3^x$ is strictly positive for $x\in\Bbb R$, we could try a substitution like $\cosh u=1+2^x+3^x,\sinh udu=(2^x\ln 2+3^x\ln 3)dx,$ but this fails to produce a viable substitution as well since we would be left with

$$\int\frac {\sinh u}{(2^x\ln 2+3^x\ln 3)\cosh u}du$$

as $\cosh u=1+2^x+3^x$ is not nicely soluble for $x,$ nor does any other obvious transformation present itself for placement as $f(u)=2^x\ln 2+3^x\ln 3$.

So indefinite integration by substitution is out (at least as far as the possibilities I am aware of), and integration by parts does not appear to yield any useful results. What about comparisons with definite integrals? What options are available here?

If the value of the integrals $\int\frac 1{1+3^x+3^x}dx=\int\frac 1{1+2\cdot 3^x}dx$ and $\int\frac 1{1+3^{\frac x2}+3^x}dx$ were known, this might be easier as we might be able to limit the possibilities...

In order to have a solvable integral, it is imperative that the denominator be factored fully, or at least to the point where partial fractions can take over and each part can be solved individually. The choice of $\int\frac 1{1+3^{\frac x2}+3^x}dx$ is one that is "near" to the original, and also happens to be cyclotomic, so that all the linear (complex) factors are well-known, and thus partial fractions is "easily" applicable.

In general, let $p_n(x)$ be the $n$th cyclotomic polynomial, and let $q_n(x)$ be the polynomial such that $p_n(x)\cdot q_n(x)=x^n-1.$ (For example, $p_3(2^x)=1+2^x+2^{2x}=1+2^x+4^x$, and $q_3(2^x)=2^x-1$.) Then the integral $\int\frac 1{p_n(\alpha^x)}dx$ can be expressed as

$$\int\frac{q_n(\alpha^x)}{\alpha^{nx}-1}dx=\int\frac{\sum\limits_{i=0}^{\deg(q)+1}a_i\alpha^{ix}}{\alpha^{nx}-1}dx=\sum_{i=0}^{\deg(q)+1}a_i\int\frac{\alpha^{ix}}{\alpha^{nx}-1}dx$$

With a substitution like $u=\alpha^x, du=(\ln\alpha)\alpha^xdx$ this becomes

$$\frac 1{\ln\alpha}\sum_{i=0}^{\deg(q)+1}a_i\int\frac{u^{i-1}}{u^n-1}du\tag 1$$

which is almost a direct translation to an integral with a cyclotomic polynomial; in fact, $(1)$ becomes

$$\frac 1{\ln\alpha}\int\frac{q_n(u)}{u(u^n-1)}du=\frac 1{\ln\alpha}\int\frac{q_n(u)}{u(u-1)\sum_{i=0}^{n-1}u^i}du=\frac1{\ln\alpha}\int\frac 1{up_n(u)}du\tag 2$$

After all that, we know that one of the integrals of interest above, namely, $\int\frac 1{1+3^{\frac x2}+3^x}dx$ can be written with transformation $u=(\sqrt 3)^x$ as

$$\frac2{\ln 3}\int\frac 1{u(u^2+u+1)}du\to\\x-\frac 1{\ln 3}\ln(3^x+3^{\frac x2}+1)-\frac 2{\sqrt 3\ln 3}\arctan\left(\frac 1{\sqrt 3}(2\cdot 3^{\frac x2}+1)\right)+c\tag 3$$

$$\int\frac 1{1+2\cdot 3^x}dx=x-\ln(2\cdot 3^x+1))+c\tag 4$$

Taking integration limits as $x\in[1,+\inf)$ from the question, we get the following values:

$$(3)|_1^\infty=-1+\frac{-\sqrt 3 \pi+2 \sqrt 3 \arctan(2+\frac 1{\sqrt 3})+3 \ln(4+\sqrt 3)}{\ln 27}\approx 0.2003338$$ $$(4)|_1^\infty=\frac{\ln\frac 76}{\ln 3}\approx 0.140314$$

This is only mildly useful as an upper and lower bound. While the value of the posted integral is definitely between these bounds, this is not a very accurate result and could certainly do with some improvement. Note that other integrals that fall outside these bounds (or do not supply sufficient information to be specified as bounds) include $\int\frac 1{1+2^{x+1}}dx,\int\frac 1{4^x+2^x+1}dx,\int\frac 1{4^x+1}dx,\int\frac 1{3^x+1}dx$.

Fortunately, the choice to integrate $\int\frac 1{3^x+3^{\frac x2}+1}dx$ suggests a route to solve the integral completely:

• Find a monotonic sequence of rationals $x_n=\frac ab$ whose limit is $\log_3 2$
• Find the value of $$I_n=\int\frac1{3^x+3^{x_n\cdot x}+1}dx$$ (this will be a three-term polynomial of some degree that will be factorable, possibly nicely depending on the sequence $x_n$ used)
• Find the limit $\lim_{n\to\infty}I_n$

This is not to say that these steps will be easy or computable in reasonable time frames...

$\int_1^\infty\dfrac{dx}{1+2^x+3^x}$

$=\int_1^\infty\dfrac{3^{-x}}{1+3^{-x}(1+2^x)}dx$

$=\int_1^\infty3^{-x}\sum\limits_{n=0}^\infty(-1)^n3^{-nx}(1+2^x)^n~dx$

$=\int_1^\infty\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n(-1)^nC_k^n2^{kx}3^{-(n+1)x}dx$

$=\left[\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^nn!2^{kx}3^{-(n+1)x}}{k!(n-k)!(k\ln2-(n+1)\ln3)}\right]_1^\infty$

$=\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^nn!2^k}{3^{n+1}k!(n-k)!((n+1)\ln3-k\ln2)}$

$=\sum\limits_{k=0}^\infty\sum\limits_{n=k}^\infty\dfrac{(-1)^nn!2^k}{3^{n+1}k!(n-k)!((n+1)\ln3-k\ln2)}$

$=\sum\limits_{k=0}^\infty\sum\limits_{n=0}^\infty\dfrac{(-1)^{n+k}(n+k)!2^k}{3^{n+k+1}k!n!((n+k+1)\ln3-k\ln2)}$

Which relates to Srivastava-Daoust Function

If you accept a limit in your closed form then Wolfram Alpha and Mathematica 8.0.1 seem to give a consistent form that progresses with the value of $$c \rightarrow \infty$$ in the limit.

The idea is to move away from logarithms as transcendental numbers (which Mathematica is unable to solve) and instead approximate the logarithms as rational numbers with the limiting fractions:

$$\log(n)=\lim\limits_{c \rightarrow \infty} \frac{\text{Round}[c \log (n)]}{c}$$

so that:

$$n^{x}=\lim\limits_{c \rightarrow \infty} {\left(e^{\frac{\text{Round}[c \log (n)]}{c}}\right)^{x}}$$

which gives the approximation to the indefinite integral:

$$\int \dfrac{dx}{1+2^x+3^x} = \lim\limits_{c \rightarrow \infty} \int \frac{1} {\left(e^{\frac{\text{Round}[c \log (1)]}{c}}\right)^{x}+\left(e^{\frac{\text{Round}[c \log (2)]}{c}}\right)^{x}+\left(e^{\frac{\text{Round}[c \log (3)]}{c}}\right)^{x}} \tag {*}$$ which Mathematica can solve.

Exploring the indefinite integral in $$(*)$$ with Mathematica 8.0.1 for values of $$c=2$$ to $$c=32$$:

Clear[s, x, t, k, Part1, Part2, c, answer, int];
k = 3;
Part1 = 1/Sum[(E^(Round[Log[n]*c]/c))^(x), {n, 1, k}]
Monitor[TableForm[Table[Integrate[Part1, x], {c, 2, 32}]], c]


In Wolfram Alpha the integral for $$c=4$$ and $$k=3$$ can be computed with the one-liner:

Integrate[1/Sum[(E^(Round[Log[n]*4]/4))^(x), {n, 1, 3}],x]

A screen dump for the one-liner from Wolfram Alpha for Alternate form of the integral, begins:

The first few lines of the output of Mathematica looks like this:

{
{1/(1 + E^(2 x/3) + E^x),
RootSum[1 + #1^2 + #1^3 &, (x - 3 Log[E^(x/3) - #1])/(3 + #1^2) &]},
{1/(1 + E^(3 x/4) + E^x),
RootSum[1 + #1^3 + #1^4 &, (x - 4 Log[E^(x/4) - #1])/(4 + #1^3) &]},
{1/(1 + E^(3 x/5) + E^x),
RootSum[1 + #1^3 + #1^5 &, (x - 5 Log[E^(x/5) - #1])/(
5 + 2 #1^3) &]},
{1/(1 + E^(2 x/3) + E^(7 x/6)),
RootSum[1 + #1^4 + #1^7 &, (x - 6 Log[E^(x/6) - #1])/(
7 + 3 #1^4) &]},
{1/(1 + E^(5 x/7) + E^(8 x/7)),
RootSum[1 + #1^5 + #1^8 &, (x - 7 Log[E^(x/7) - #1])/(8 + 3 #1^5) &]}
}


which involves a RootSum.

Wrapping the RootSum[ ] with the Normal[ ] command:

Normal[RootSum[ 1 + #1^5 + #1^8 &, (s - 7 Log[E^(s/7) - #1])/(8 + 3 #1^5) &]]

gives an output that begins:

((s - 7 Log[E^(s/7) - Root[1 + #1^5 + #1^8 &, 1]])/( 8 + 3 Root[1 + #1^5 + #1^8 &, 1]^5)) +...

where Root[1 + #1^5 + #1^8 &, 1] means the first root of the polynomial: $$1+x^5+x^8$$ which seems to follow the pattern of 5 and 8 in the powers in: 1/(1 + E^(5 x/7) + E^(8 x/7)) in the beginning of the same row in the Mathematica output.

Epilogue:
So were we to for example approximate logarithms by limiting fractions in the Dirichlet Eta function:

$$\zeta(s) = \frac{\eta(s)}{\left(1-2^{1-s}\right)}$$

including: $$2^{1-s}=\lim\limits_{c \rightarrow \infty} {\left(e^{\frac{\text{Round}[c \log (2)]}{c}}\right)^{1-s}}$$

we would after integration by parts find that the indefinite integral is of the form:

$$\int \frac{1}{\frac{\eta(s)}{\left(1-2^{1-s}\right)}}ds \approx \text{Mathematica expression involving RootSum[ ], polynomial roots,... etc.}$$

So one might as well study the algebra of the equation:

$$1 - 2^{-s} + 3^{-s} - 4^{-s} + ... (-1)^{(n+1)}n^{-s} = 0$$

For $$s$$ not close to a pole: $$\int \frac{1}{1+\frac{1}{2^s}+\frac{1}{3^s}} \, ds = s-\sum _{n=2}^{\infty} \left(\sum _{k=1}^n \frac{(-1)^n \binom{n-1}{k-1} \left(-\left(3^{k-1} 2^{n-k}\right)^{-s}\right)}{\log \left(3^{k-1} 2^{n-k}\right)}\right)$$

Associated Mathematica program to compare values:

(*start*)Clear[s, nn, n, k];
nn = 500;
s = 1;
a = %;
lower = N[
s - Sum[Sum[(-1)^n*
Binomial[n - 1,
k - 1]*(-((2^(-k + n) 3^(-1 + k))^-s/
Log[2^(-k + n) 3^(-1 + k)])), {k, 1, n}], {n, 2, nn}]]
s = 2;
b = %;
upper = N[
s - Sum[Sum[(-1)^n*
Binomial[n - 1,
k - 1]*(-((2^(-k + n) 3^(-1 + k))^-s/
Log[2^(-k + n) 3^(-1 + k)])), {k, 1, n}], {n, 2, nn}]]

upper - lower

NIntegrate[1/(1 + 1/2^s + 1/3^s), {s, a, b}]
(*end*)