$f \geq 0$ continuous, $\lim_{x \to \infty} f(x)$ exists, $\int_{0}^{\infty}f(x)dx< \infty$, Prove: $\int_{0}^{\infty}f^2(x)dx< \infty$ Something that bothers me with the following question: $f: [0, \infty] \to \mathbb{R}$,$f \geq 0$,  $\lim_{x \to \infty} f(x)$ exists and finite, and  $\int_{0}^{\infty}f(x)dx$ converges, I need to show that $\int_{0}^{\infty}f^2(x)dx$
I separated  the integral in the following way: $\int_{0}^{1}f^2(x)dx$+$\int_{1}^{\infty}f^2(x)dx$, while for the second one we know that $\lim_{x \to \infty}\frac{f^2(x)}{f(x)}$ so they converges together, but what happens in the first range, does my $\lim_{x \to 0}f(x)$ has to be finite? Do you have an example for an integral between $0$ and $\infty$ which converges and the $\lim_{x \to 0}$ is not finite?
What should I do in my case?
Thanks!

To answer your questions regarding the behaviour at $0$ first. Note that $f:[0;\infty[ \ \to \mathbb{R}$, hence $f$ is well-defined and continuous at $0$ - according to the assumptions you state. In particular this means that $\lim_{x\to 0}f(x) = f(0)$, so there is really no issue at $x=0$; your function is well-defined at this end of the interval. Had this not been the case then you would have had to consider what might go wrong here (the function $f(x) = x^{-1/2}$ could be an instructional case to consider when integrating).
I am not sure I follow your reasoning in the case when $x\to \infty$, but I think it might be a good idea to try and deduce what the possible values of $\lim_{x\to \infty}f(x)$ could be, if the integral $\int_0^{\infty}f(x)dx$ is suppose to converge, and then maybe use $0<f(x)^2\leq f(x)$ under the right circumstances...
