# What is the integral from 0 to 4 of lnx dx?

May 1, 2015

For ${\int}_{0}^{4} \ln x \cdot \mathrm{dx}$, it converges by a sum of $4 \ln 4 - 4$.

Let's introduce the idea of improper integrals. Remember that integrals are based on the sums of the individual terms as shown in the Sigma notation below:

${\int}_{a}^{b} f \left(x\right) \mathrm{dx} = {\lim}_{n \to \infty} {\sum}_{i = 0}^{n} f \left({x}_{i}\right) \Delta {x}_{i}$, for $\Delta x = \frac{b - a}{n}$,
(From http://www.math.wvu.edu/~hjlai/Teaching/Tip-Pdf/Tip1-29.pdf)

where $a$ is the first term, $b$ is the last term, and $n$ is the number of "parts." Think of it as going from a to b by splitting individual rectangles of area and adding them up.

According to the function $\ln x$, if you insert the first term $0$ for x, you get no solution since the line on the graph below continues going down to $- \infty$, making $x \le 0$ undefined:
graph{lnx [-7.87, 12.13, -4.13, 5.875]}
Using the Type 2 definition of improper integrals, let's instead make $0$ as a $t$ limit variable for the integral as $t \to 0$ from the right (${0}^{+}$):

(1) ${\lim}_{t \to {0}^{+}} \left[{\int}_{t}^{4} \ln x \cdot \mathrm{dx}\right]$

To integrate $\ln x$, integration by parts comes in handy if you set it as $1 \cdot \ln x$ using the equation:

(2) $\int u v ' = u v - \int v u '$ (the prime indicates the derivative).

Let $u = \ln x$, and $v ' = 1 \cdot \mathrm{dx}$. By differentiating the $u$ and integrating the $v '$,

$u ' = \frac{1}{x} \cdot \mathrm{dx}$ and $v = x$.

Substituting the $u$ and $v$ variables for Equation 2,

$\int \left(\ln x \cdot 1\right) \mathrm{dx} = x \ln x - \int 1 \cdot \mathrm{dx}$.

This allows us to easily integrate $\ln x$, only now we need to evaluate its definite integral from $t \to 4$:

(3) int_t^4lnx*dx=[lnx(x)~|_t^4-int_t^4 1*dx=(4ln4-tlnt)-(4-t)

Now we can do the math using Eqs. 1 and 3 and split the limit:

${\lim}_{t \to {0}^{+}} \left[{\int}_{t}^{4} \ln x \cdot \mathrm{dx}\right] = {\lim}_{t \to {0}^{+}} \left[4 \ln 4 - t \ln t - 4 + t\right]$

=${\lim}_{t \to {0}^{+}} \left(- t \ln t\right) + {\lim}_{t \to {0}^{+}} \left(4 \ln 4 - 4 + t\right)$

=${\lim}_{t \to {0}^{+}} \left(- t \ln t\right) + 4 \ln 4 - 4$

Notice though that ${\lim}_{t \to {0}^{+}} \left(- t \ln t\right)$ gives us a $- 0 \cdot \infty$ indeterminate form.
Rewriting it would allow us to use l'Hôpital's Rule to find the limit:

${\lim}_{t \to {0}^{+}} \left(- \ln \frac{t}{\frac{1}{t}}\right) \implies - \frac{\infty}{\infty} \implies$indeterminate form. So by LHR,
${\lim}_{t \to {0}^{+}} \left(- \ln \frac{t}{\frac{1}{t}}\right) = {\lim}_{t \to {0}^{+}} \left(\frac{- \frac{1}{\cancel{t}}}{- \frac{1}{t} ^ \cancel{2}}\right) = {\lim}_{t \to {0}^{+}} \left(t\right) = 0$

Thus, ${\int}_{0}^{4} \ln x \cdot \mathrm{dx} = 4 \ln 4 - 4$.

Hopefully it makes sense with such a long text!