Question about integrals and restricted values of variables

Hello, I am new to Mathematica, and I have run into something unexpected with the following integral:

Straightforward enough, but when I re-write the integral as

I see this unexpected bit at the end of the step-by-step solution:

Why has the 2*log(e^x) term dissapeared instead of simplifying to 2*x? Is Mathamatica making assumptions about the restricted values of x, or am I just missing something?

Mathematica is quite correct.

Thank you! That’s what I get for doing math at midnight instead of going to bed and trying the next day.