Integrating $\int\ln^e(x)dx$, constant wrong?

I am practicing to integrate with the incomplete gamma function. As such, I want to integrate $$\int\ln^e(x)dx$$ I use the following substitutions $$u=\ln(x)\implies \int u^e e^u du$$ $$v=-u\implies \int(-v)^e e^{-v}\cdot -dv$$ Now, we can convert this to a gamma function $$\int(-v)^e e^{-v}\cdot -dv = - \int(-1)^e v^e e^{-v} dv= -(-1)^e\int v^{(1+e)-1} e^{-v} dv = -(-1)^e\cdot -\Gamma(1+e, -\ln(x))$$ which simplifies to $$(-1)^e\cdot \Gamma(1+e, -\ln(x)) +C$$ This is wrong though, and wolfram alpha gives me an answer of $${\color{red}{(-1)^{-e}}}\cdot \Gamma(1+e, -\ln(x)) +C$$

Something clearly went wrong here (and here, for that matter since I somehow also have a missing negative from the power?) and I'm not exactly sure what went wrong.

I conjecture that perhaps splitting $$(-v)^e = (-1)^e v^e$$ was incorrect since the interior is negative, but I am not sure what to do otherwise with such a term.

Can anyone enlighten me as to what my mistake is and how I would properly integrate this function?

Thanks

Edit: Okay, differentiating the results seem to provide interesting results. Differentiating my own result on wolfram alpha gives $$(-1)^e (-\ln(x))^e$$ which equals the initial function if i combine the powers, while the negative power does not work. I find this odd.

I again conjecture that since the inner parts of the power functions are negative, I violated this rule when integrating and violating the rule again here reverts it. I'm still not sure what to do with the original integral though.

• @Ramanujan No i am not sure (and yes, v is any real number since the primitive should work for reals). I have conjectured in my post, that this is the part where i may have made a mistake, but I cannot justify anything or find any workaround. Any ideas? Commented Jan 6, 2023 at 16:08
• Perhaps consider only $x>1$ so that $\ln(x)>0$ ... otherwise, you will need to tell us how to define $(\ln x)^e$ when $\ln x < 0$ and $e$ is irrational. Wolfram assumes (unless you tell it otherwise) that you are using complex variables. Commented Jan 6, 2023 at 16:52
• @GEdgar Hmm how would I approach this integral assuming complex variables then? Commented Jan 6, 2023 at 17:20

Let $$0. Then you find

\begin{aligned} \int_y^x (\ln(s))^e ds&=\int_{\ln(y)}^{\ln(x)}s^ee^sds\\ &=(-1)^{-e}\int_{\ln(y)}^{\ln(x)}(-s)^ee^sds\\ &=(-1)^{-e}(-1)\int_{\ln(y)}^{\ln(x)}(-s)^ee^s(-1)ds\\ &=(-1)^{-e}(-1)\int_{-\ln(y)}^{-\ln(x)}s^ee^{-s}ds\\ &=(-1)^{-e}\int_{-\ln(x)}^{-\ln(y)}s^ee^{-s}ds. \end{aligned}

You find $$-\log(y)\rightarrow \infty$$ for $$y\rightarrow 0$$, such that

$$\int_0^x(\ln(s))^e ds=(-1)^{-e}\int_{-\log(x)}^{\infty}s^ee^{-s}ds=(-1)^{-e}\Gamma(1+e,-\ln(x)).$$

• Wait so what was wrong in my process? Was is it because i split the -1 from the -s? Commented Jan 6, 2023 at 17:57
• You multiply with $1=(-1)^{-e}(-1)^e$ and take $(-1)^e$ into the integral, such that $s^e(-1)^e=(-s)^e$. Commented Jan 6, 2023 at 17:58
• But to be honest, I am confused myself, now. It seems there is something going on with this multiplication of $(-1)^e$. What seems to go "wrong" in your proof, is that you cannot substitute s with $-s$, because $s^e e^s$ takes values in $\mathbb{C}$ for $s<0$. Maybe we should look up integration by substitution for complex numbers. There might show up some correction value. Commented Jan 6, 2023 at 18:17
• Yea I think the mistake I made was splitting the exponent which is not really defined for complex numbers unless I define a branch cut which I don't really do. I'll see to this more carefully in a few hours and see if I can fix my work based on your answer and some other stuff Commented Jan 6, 2023 at 18:19
• Yea it seems the part I got wrong with was trying to split (-s)^n into (-1)^n and s^n, which forces me to need to define a branch cut. Technically my answer is also right if we define the right branch cuts, but using the default -pi to pi one your answer should be right. Thanks! Commented Jan 7, 2023 at 22:27