I am facing problem while solving the integrals $$I=\int e^{\ln(x)}dx$$ and
$$I_1=\int e^{\ln(|x|)}dx$$
In the case of $I_1$, $|x|$ will come in the place of $e$ and $e$ will go in the place of $|x|$. Therefore the above integral will be
$$I_1=\int |x| dx$$
Now the result of the above integral will be $\frac{x^{2}\operatorname{sgn}(x)}{2}+C$. (As per the solution of Wolfram Alpha).
But here is also one another doubt. Because we define
$$\mathrm{sgn}(x)= \begin{cases} -1 \hspace{5mm} \mathrm{if} \, \, x < 0 \\ 0 \hspace{8.8mm} \mathrm{if} \, \, x = 0 \\ 1 \hspace{9mm} \mathrm{if} \, \, x > 0 \end{cases}$$
Now how is $x=0$ possible? Then $\ln|x|$ will be undefined. Therefore, I don't think the solution of $I_1$ i.e. $\frac{x^{2}\operatorname{sgn}(x)}{2}$ is correct. Also, in case of $I$ I am very much confused. Because in case of $I$ , $x$ will come in the place of $e$ only when $x>0$ and not $x<0$. Please help me out.
For the first integral,
$$\int e^{\ln(x)}\ dx=\int x\ dx=\frac{x^2}2+C,\quad x\ne0.$$
$\ln(x)$ is still defined for $x<0$, it's just complex. Even so, when you take $e^{\ln(x)}$, you will always get a real number except when $x=0$. However, $\lim_{x\to0}e^{\ln(x)}=0$, so you can fill in this point without issue. If you work within the extended real numbers, you can define $\ln0=-\infty$ with $a^{-\infty}=0$ for all $a>1$. Wolfram likes to use directed infinities, so I wouldn't be surprised if that's what's happening.
For the second integral,
$$\int e^{\ln\lvert x\rvert}\ dx=\int\lvert x\rvert\ dx=\int\operatorname{sgn}(x)x\ dx,\quad x\ne0.$$
We can use integration by parts here
$$\int\operatorname{sgn}(x) x\ dx=\frac12\int\operatorname{sgn}(x)\ d(x^2)=\frac12\left(\operatorname{sgn}(x)x^2-\int x^2\ d(\operatorname{sgn}(x))\right)$$
Remember that $x\ne0$, and for $x\ne0$, $d(\operatorname{sgn}(x))=0\ dx$ regardless of how you define $\operatorname{sgn}$, so we are left with
$$\int e^{\ln\lvert x\rvert}\ dx=\frac{x^2\operatorname{sgn}(x)}2+C,\quad x\ne0$$
As before, we can fill in the gap in $e^{\ln\lvert x\rvert}$ or do something with the extended real/complex numbers to get $e^{\ln\lvert 0\rvert}=0$, and in this case the antiderivative is defined at $0$ as well.