5

Q. Evaluate $$\int \dfrac{x^2 + x}{e^x + x + 1} \,\mathrm dx.$$

I was reading this question, and the integral got me interested. I have tried all the integral methods I know, but it isn’t helping much with this problem. This started making me wonder whether this has a closed form.

Wolfram Alpha says that the series expansion of the integral at $x=0$ is $$\frac{x^2}{4} - \frac{x^4}{32} + \frac{x^5}{60} - \frac{x^6}{96} + \frac{x^7}{140} - \frac{5x^8}{1024} + O(x^9) + C.$$

So, basically I have two questions:

Q1. Does this integration have a closed form?

I have read that Risch Algorithm helps to determine whether a definite integral has a closed form or not. But as Wikipedia says

“The complete description of the Risch algorithm takes over 100 pages.”

I really don’t know anything about Risch Algorithm except its name. But my efforts and Wolframalpha’s answers are telling me that it doesn’t. If it doesn’t, how do I prove that it doesn’t exist?

Q2. How did WolframAlpha arrive at the series expansion at $x=0$?

Or a better question would be: Would it be possible to arrive at the same answer by hand?

Thank you for taking your time in reading this question. Any comments will be appreciated.

Ѕᴀᴀᴅ
  • 35,369
  • 2
    Answer for Q2 is true, but so painful. You know series expansion of $1+x+e^x$ so you can do long division. But long division until $x^8$ term? At least I do not want to do that with my hand. – Myungheon Lee Mar 28 '25 at 06:39
  • Related: https://math.stackexchange.com/questions/155/how-can-you-prove-that-a-function-has-no-closed-form-integral – Hans Lundmark Mar 28 '25 at 07:14
  • 3
    Also $\int \frac{x(x+1) dx}{(e^{x}+1+x)^2} $ is do able. – Z Ahmed Mar 28 '25 at 07:58

1 Answers1

7

If I had to do it, I would start with the reciprocal of the integrand $$\frac{e^x+x+1}{x^2+x}=\frac {2+2x+\sum_{n=2}^p \frac {x^n}{n! } }{x^2+x }$$ Now, long division and then the reciprocal by long division again.

This makes the integrand to be $$\frac{x}{2}-\frac{x^3}{8}+\frac{x^4}{12}-\frac{x^5}{16}+\frac{x^6}{20}-\frac{5 x^7}{128}+\frac{41 x^8}{1344}-\frac{55 x^9}{2304}+\frac{121 x^{10}}{6480}+O\left(x^{11}\right)$$ and then termwise integration.

The question is the convergence and the accuracy. It is just a disaster.

Edit

Being tricky, what I would do is to consider $$\frac {x^2+x}{e^x+a}=\sum_{n=0}^\infty (-1)^{n+1}\,x(x+1)\,e^{-(n+1)x}\,a^n$$ and make $a=x+1$.

So we face $$\sum_{n=0}^\infty (-1)^{n}\int\,x\,(x+1)^{n+1}\,e^{-(n+1)x}\,dx$$

$$J_n=\int\,x\,(x+1)^{n+1}\,e^{-(n+1)x}\,dx$$ $$J_n=\int\,(x+1)^{n+2}\,e^{-(n+1)x}\,dx-\int\,(x+1)^{n+1}\,e^{-(n+1)x}\,dx$$ and now, use the incomplete gamma function of the exponential integral function

$$K_k=\int (x+1)^{n+k}\,e^{-(n+1)x}\,dx$$ $$K_k=-\frac {e^{n+1} }{(n+1)^{k+n+1} }\,\Gamma (k+n+1,(n+1) (x+1))$$ $$K_k=-e^{n+1} (x+1)^{k+n+1} E_{-(k+n)}((n+1)(x+1))$$