Construct such function, that can't be integrated on an interval, but its square is integrable on the interval

325 Views Asked by At

Okay, so there's the text of my problem on Russian:
Построить не интегрируемую функцию на отрезке, квадрат которой интегрируем на этом отрезке.
And its translation on English:
Construct such function, that can't be integrated on an interval, but its square is integrable on the interval.
So I decided to start with the $f(x) = \frac{1}{x^p}$, that doesn't converge with $p > 1$ and does vice versa on a segment $[0,1]$ but I found nothing out, because my $p$ has to be $> 1$, and thus $p^2$ is also $> 1$.
Then I tried to do something with the square root on some negative interval(e.g. $f(x) = \frac{1}{\sqrt{5-x^2}}$ on an $[-8,-2]$ interval. By this way, it makes some sense kinda. But I want to know, is there some other functions that can't be integrated, but its square is integrable.
Well, I forgot to say, the interval is closed one.

2

There are 2 best solutions below

15
On BEST ANSWER

If you're allowed to use an unbounded interval, then $\frac1x$ on $[1,\infty)$ works. In any bounded interval, a good choice is a function that equals either $1$ or $-1$, depending whether $x$ is rational or irrational, or something like that. This was suggested in the comments by Clement C., who wrote it out as the formula $f(x)=2\mathbf{1}_{\Bbb Q}-1$.

Concerning your example, which is equivalent to integrating $\frac1{\sqrt x}$ on any interval of negative numbers, that feels like it works for the wrong reason somehow. We'd like to see $f(x)$ defined, but not integrable, as opposed to not being integrable because it's not even defined.

What I'm not finding right now is an example of a continuous function on a bounded interval that is not integrable, whose square is integrable on that bounded interval. If such an example cannot be produced, there must be a reason.....

0
On

$$\int^\infty_1 \frac1{x^{2/3}}dx$$ diverges by p-test.

$$\int^\infty_1 \frac1{x^{4/3}}dx$$ converges by p-test.