What happens to $\ln(0)$ for the $\int_0^1 \ln(x) dx$? Say I am integrating $e^x$ from $0$ to $1$.
This would be $e^1 - e^0 \Rightarrow 2.7... - 1 = 1.71...$
Now say I am integrating $\ln(x)$ from $0$ to $1$
This would be $x\ln(x) - x \Rightarrow (1) \cdot \ln(1) - 1 - \ln(0)$
Since $\ln(1) = 0$ and $\ln(0) = -\infty$
We have $-1 -(-\infty) = -1 + \infty$
My calculator outputs $-1$ nonetheless. What happened to infinity?
 A: You've hit the nail in the coffin; $\log$, as a function, is not defined at $x = 0$. So,$\log(0)$ doesn't make sense on the real line. In reality, when we write:
$$\int_{0}^{1} \log(x) \ dx$$
what we really mean is:
$$\lim_{c \to 0^+} \int_{c}^{1} \log(x) \ dx$$
where $1>c > 0$. Since $\log$ is continuous, the integral $\int_{c}^{1} \log(x) \ dx$ is well-defined. Now, what you do is to just realize that:
$$\int_{c}^{1} \log(x) \ dx = [x\log(x)-x]_{c}^{1} = [-1 -c\log(c)+c]$$
Taking the limit as $c \to 0$, we find that $-1+c \to -1$. Now, the question is if something extravagant happens with $-c\log(c)$. You can certainly do a rigorous proof that, in fact:
$$\lim_{c \to 0} c \log(c) = 0$$
Observe that $\log(c) \to -\infty$ as $c \to 0$ and $c \to 0$ (obviously!) as $c \to 0$. The idea here, however, is that $\log$ actually goes to $-\infty$ much much slower than $c$ goes to $0$. So, the product actually becomes much smaller than it could ever really grow.
As for what's going on with your calculator; I can't really answer that at all. My hunch is that your calculator is just doing a series of approximations using some in-built numerical methods. It's just that the approximations are so good that it manages to get $-1$ to within an extremely small error and just spits that out. But I'm not entirely certain that this is how it works.
A: Well this is why the exact statements of definitions and theorems are important. Since $\ln x$ is not defined for $x=0$, we are really dealing with an improper (Riemann) integral, and so what we are actually dealing with is
$$\int_0^1\ln x~\mathrm{d}x=\lim_{a\to0^+}\int_a^1\ln x~\mathrm{d}x.$$
Now if $a\in(0,1)$, then we can just compute the integral as expected, and get that
$$\int_a^1\ln x~\mathrm{d}x=\biggl[x\ln x-x\biggr]_a^1=-1-a\ln a+a.$$
Now we want to let $a\to0^+$, and to do so we use that
$$\lim_{a\to0^+}a\ln a=0$$
(I'll leave this limit as an exercise to you). Using this, we have that
$$\int_0^1\ln x~\mathrm{d}x=\lim_{a\to0^+}\left(-1-a\ln a+a\right)=-1,$$
just like your calculator told you!
A: $$\begin{align}
\int_0^1 \ln(x)~dx&=\lim_{b\to0^+}\int_b^1 \ln(x)dx\\
\\
&=1\cdot\ln(1)-\lim_{b\to0^+}x\ln(x)-\lim_{b\to0^+}\int_b^1x~d\ln(x)\\
\\
&=-\lim_{b\to0^+}\int_b^1x\cdot\frac{1}xdx=-1\end{align}$$
A: You made a mistake. You need from function $x\ln(x) - x$ evaluated at $1$ subtract the same function evaluated at $0$.
Evaluated at $1$ is $1\cdot \ln 1 -1=-1$
At zero we have $0\cdot \ln 0 -0$. We cannot evaluate this directly but in limit it is zero.
So, $-1-0=-1$. This is the answer.
Or, we can rewrite the antiderivative as $\ln(x^x) - x$. This function can be evaluated at zero, assuming $0^0=1$, and we get the same result without the limit.
