How come does integral of $\ln^2 x$ from $0$ to $4$ , converges? Would someone please help my understanding how come integral of $\ln^2 x$  from $0$ to $4$,  converges?
Thank you
 A: First you should identify the reason why the integral does not exist in the "ordinary" way.  In this case it is the fact that the interval of integration includes the point $x=0$, where the integrand $f(x)=(\ln x)^2$ is not defined.  An improper integral of this type is defined as follows:
$$\int_0^4 (\ln x)^2\,dx=\lim_{a\downarrow0}\int_a^4 (\ln x)^2\,dx\ ,$$
provided the limit exists.  Now the integral on the right hand side can be evaluated using integration by parts (try it) and you get
$$\int_a^4 (\ln x)^2\,dx=C-a(\ln a)^2+2a\ln a-2a\ ,$$
where $C$ is a constant you can figure out for yourself.  You can prove by means of L'Hopital's rule that if $r$ is any positive number then
$$x^r\ln x\to0\quad\hbox{as}\ x\downarrow0\ ,$$
and so
$$\int_a^4 (\ln x)^2\,dx=C-(a^{1/2}\ln a)^2+2a\ln a-2a\to C\ .$$
Therefore the integral from $0$ to $4$ is the $C$ which you calculated above.
A: ADDED to update. Let $f(x)=\ln^2 x$. We could just use the function $g(x)=x^{-1/2}$ and use the Limit Comparison Test for improper integrals
$$\begin{equation*}
\lim_{x\to\infty}\frac{f(x)}{g(x)}=\lim_{x\to 0^+}\frac{\ln ^{2}x}{x^{-1/2}}= 0,
\end{equation*}$$
to conclude that your integral converges.

The given integral is an improper integral of the second kind with a singularity at $x=0$. We can start by splitting the interval of integration into two intervals
$$
\begin{equation*}
I=\int_{0}^{4}\ln ^{2}x\,dx=\int_{0}^{1}\ln ^{2}x\,dx+\int_{1}^{4}\ln
^{2}x\,dx=I_{1}+I_{2}.
\end{equation*}
$$
$I_2$ is a proper integral. We do not need evaluating $I_1$. If we use the substitution $y=1/x$, this integral becomes an improper integral of the first kind
$$
\begin{equation*}
I_{1}=\int_{0}^{1}\ln ^{2}x\,dx=\int_{1}^{\infty }\frac{\ln ^{2}y}{y^{2}}
\,dy=\int_{1}^{\infty }f(y)\,dy,\qquad f(y)=\frac{\ln ^{2}y}{y^{2}}.
\end{equation*}
$$
Now we can apply the limit comparison test with the convergent integral 
\begin{equation*}
\int_{1}^{\infty }g(y)\,dy=\int_{1}^{\infty }y^{-3/2}\,dy,\qquad g(y)=y^{-3/2}=y^{-p},\quad p=3/2>1,
\end{equation*}
to conclude that $I_1$ is convergent because
$$\begin{equation*}
\lim_{y\to\infty}\frac{f(y)}{g(y)}=\lim_{y\to\infty}\frac{\ln ^{2}y}{\sqrt{y}}= 0,
\end{equation*}$$
as can be seen by applying L'Hôpital's rule twice.
A: Consider the indefinite integral
$$\int dx \, \log^2{x} = x \log^2{x} - 2 \int dx \log{x} = x \log^2{x} - 2 (x \log{x} - x) + C$$
Consider then the limit as $x \to 0$; each term goes to zero (save for the constant $C$, which is a non factor in definite integrals).  
A: By a couple of applications of L'Hospital's Rule, we can show that 
$\lim_{x\to 0^+}\frac{\ln^2 x}{x^{1/2}}=0$.
Thus there is a positive $b$ such that if $0\lt x\le b$ then $0\le \ln^2 x\le x^{-1/2}$.
It is a standard fact that $\int_0^b x^{-1/2} \,dx$ converges. Thus by Comparison $\int_0^b \ln^2 x\,dx$ converges. And of course $\int_b^4\ln^2 x\,dx$ converges, so the improper integral $\int_0^4\ln^2 x\,dx$ converges. 
Remark: The function $\ln^2 x$ "blows up" as $x$ approaches $0$ from the right. However, it blows up slowly, more slowly than $x^{-1/2}$. And we know that $x^{-1/2}$ blows up slowly enough near $0$ that (for example) $\int_0^1 x^{-1/2}\,dx$ converges. 
