# Can the second integral of $x^x$ be expressed in terms of the first integral and standard mathatical functions?

Note: by elementary I also mean functions like $$\operatorname{Li}(x)$$ and $$\operatorname{Erfi}(x)$$.

Edit: This is not a duplicate. I am not asking if the integral of $$x^x$$ is elementary. Im asking if the second integral of $$x^x$$ can be expressed in terms the first + normal mathematical functions. I know the first integral of $$x^x$$ is not elementary. Please stop directing me to those resources.

I decided one day to experiment with inventing a new special function, $$\DeclareMathOperator{Ti}{Ti}\Ti_2(x)$$ (Tetrational Integral), defined as $$\DeclareMathOperator{Ti}{Ti} \Ti_2(x)=\int_0^x t^tdt.$$ With this new function, any function of the form $$f(x)^{f(x)}f'(x)$$ can be integrated as $$\Ti_2(f(x))$$. In addition, $$e^{W(\ln(x))}$$ can be trivially integrated, as it is the inverse function of $$x^x$$.

I have tried finding $$\int \Ti_2(x)dx.$$ But performing integration by parts requires finding $$\int x^{x+1}dx = \int x\cdot x^xdx,$$ which expands infinitely. By performing an integration by substitution and put $$u = \ln(x)$$, (expanding $$x\cdot x^x$$ to $$xe^{x\ln(x)}$$).

I get $$\int \Ti_2(x)dx= \int e^{u^2}e^{ue^u}du,$$ but I have had no progress after that. It will most likely involve $$\operatorname{Erfi}(x)$$ due to the presence of the $$e^{u^2}$$ part, I also know this can be reduced to $$x^2x^{x-1}$$ which I recall making some more actual progress with, but not a whole bunch. And i don't remember a tone of specifics on that right now.

Is it even possible to integrate this in terms of elementary functions (plus common special functions of a single variable like $$\operatorname{Li}(x)$$) and $$\Ti_2$$ itself?

Can someone give me a proof that it is not or is? If not are there any known functions whatsoever this can be done in terms of? (Hyper-geometric functions for example).

Finally, as related question can $$\Ti_2(x)$$ itself (not of its integral) be expressed in terms of generalized hyper-geometric functions or other related functions?

• @Anixx You should probably have read this question more carefully before dismissing it as a duplicate. This is a very different question than the ones you have linked. The author isn't asking if $\int x^xdx$ is elementary. Commented Nov 4, 2022 at 4:45
• @Annix Please read the question more carefully. This isn't about the integral of $x^x$. This is about defining $\int x^x dx$ as a new special function, Ti2(x) and asking if this new function's antiderivative can be expressed in terms of elementary functions, common non elementary functions and Ti2 itself. In other words it is if the second integral of x^x can be expressed in terms of the first integral + normal mathematical functions Commented Nov 5, 2022 at 22:28
• I'm going to give you an upvote just out of pity and frustration that people keep misunderstanding your question. It's not even the case that your question is unclear; I'm not sure why others are misinterpreting it... Commented Nov 6, 2022 at 2:11
• @phi-rate The same symbols can mean different things in different contexts. Commented Nov 10, 2022 at 2:04
• Didn't this question used to have a bounty? Did a moderator remove your bounty because they didn't understand your question? If so, that's unfortunate... Commented Nov 17, 2022 at 7:39

This is probably not a satisfactory answer, and possibly an abuse of notation. If this does not work, just downvote it and I will delete later.

As per https://math.eretrandre.org/tetrationforum/attachment.php?aid=788 we shall define $$\operatorname{Sphd}(\alpha;x)=\int_0^xt^{\alpha t}\text{ d}t$$ the paper treats $$\alpha$$ as a constant. I won't (which is another abuse of notation but w/e).

Consider your function $$Ti_2(x)=\operatorname{Sphd}(1;x)$$ We seek to find $$\int\operatorname{Sphd}(1;x)\text{ d}x$$ Using integration by parts, we have \begin{align} \int\underbrace{\operatorname{Sphd}(1;x)}_u\cdot \underbrace{1}_v\text{ d}x&=\underbrace{\operatorname{Sphd}(1;x)}_u\cdot \underbrace{x}_{\int v} - \int \underbrace{x^{x}}_{u'}\cdot \underbrace{x}_{\int v}\text{ d}x\\ &=x\operatorname{Sphd}(1;x) - \int x^{\left(1+\frac1x\right)x}\text{ d}x\\ &=x\operatorname{Sphd}(1;x) - \operatorname{Sphd}\left(1+\frac1x;x\right)+C \end{align}

• This technically works, but i was thinking functions of a single variable. But it is an interesting question if $\int Sphd(u, x) dx$ can be expressed in terms of just Ti2(x) or in other words Sphd(1; x). Commented Nov 5, 2022 at 22:50
• I am not going to accept this answer, but feel free to leave it up for future reference if you want. I dont think this works though and kinda feels like cheating Commented Nov 12, 2022 at 19:28
• Why would $$\operatorname{Sphd}(1+\dfrac1x;x)=\int_{t=0}^xt^{(1+\frac1x)t}\,dt$$ be an antiderivative of $x^{x+1}$? If we differentiate the left hand side w.r.t $x$ the partial derivative of $\operatorname{Sphd}$ w.r.t $\alpha$ also appears (by the chain rule). Commented Nov 15, 2022 at 9:15
• Please try to avoid answering duplicate questions. Commented Nov 16, 2022 at 18:00
• @XanderHenderson ...what? the question is asking for $\iint x^xdxdx$ not $\int x^xdx$ lol please read more carefully Commented Nov 16, 2022 at 18:11

Your function, as a primitive, is tested here with gamma regularized $$Q(a,z)$$:

$$\int x^x dx=-\sum_{n=1}^\infty \frac{Q(n,-n\ln(x))}{(-n)^n}$$ Therefore, we use Wolfram Alpha double integral notation, this $$Q(n,-n\ln(x))$$integral, post integration summand simplification, and $$x>0$$: $$\int \int x^x dxdx=\int \sum_{n=1}^\infty \frac{(-1)^{n+1}Q(n,-n\ln(x))}{n^n} dx=\sum_{n=1}^\infty \left((-1)^{n+1}\frac{xQ(n,-n\ln(x))}{n^n}+\frac{(-1)^nQ(n,-(n+1)\ln(x))}{(n+1)^n}\right)=\boxed{x\int x^x dx+\int x^{x+1}dx}$$

From the sum representation above, you likely cannot put $$\int x^x dx=-\sum\limits_{n=1}^\infty \frac{Q(n,-n\ln(x))}{(-n)^n}\text{ in terms of }\int x^{x+1}dx=\sum\limits_{n=1}^\infty\frac{Q(n,-(n+1)\ln(x))}{(-n-1)^n}$$

As for the gamma regularized series, $$\sum_{n=1}^\infty \frac{(-1)^n Q(n,-(n+a)\ln(x))}{(n+a)^n}= \sum_{n=1}^\infty \sum_{m=0}^{n-1}\frac{(-1)^n e^{(n+a)x}(-(n+a)x)^m}{(n+a)^nm!}= \sum_{n=1}^\infty \frac{(-1)^n}{(n+a)^n}-\sum_{n=1}^\infty \sum_{m=0}^\infty\frac{\ln^n(x)((n+a)\ln(x))^m}{(m+n)m!\Gamma(n)}$$

the $$((n+a)\ln(x))^m$$ implies tetration in the sum. To be a hypergeometric function, there would be no tetration in the sum. Since hypergeometric functions encompass many special functions, like li$$(x)$$ and erfi$$(x)$$, your integral cannot be put in terms of those either.

• This is a great answer, do you have a formal proof it can't be done however? Commented Nov 16, 2022 at 1:18
• @Colonizor48 There is a proof that $\int x^x dx$ is nonelementary. There is also no closed form known for it, unless you consider the lesser known “Sphd” function, but this is a case of “make a function for the integral”. Commented Nov 16, 2022 at 1:48
• I am aware the integral of x^x is nonelementry. I meant if there is a proof that the second integral is not expressible in terms of the first. Commented Nov 16, 2022 at 2:15
• Please try to avoid answering duplicate questions. Commented Nov 16, 2022 at 18:00
• @Xander Henderson, this is not a duplicate. Commented Nov 16, 2022 at 20:38