Find an example to a function $f$ so $f>0$, $\lim_{x\to\infty} f(x)$ does not exist and $\int\limits_{1}^{\infty} f(x) dx<\infty$

53 Views Asked by At

An example I instantly came up with is:

If $x\in \mathbb{Z}$ I say that $f(x)=1$

If $x\notin \mathbb{Z}$ I say that $f(x)=\frac{1}{x^2}$

Now, I am pretty sure that this example is correct. However, first I wondered if there is a simpler example. Second, we were taught that if a function $g$ is different than $f$ in a FINITE number of points, then $\int\limits_{a}^{b} f(x) dx=\int\limits_{a}^{b} g(x) dx$ (So the integral CAN'T be improper).

I was trying to say that $\int\limits_{1}^{\infty} f(x) dx=\lim_{M\to\infty} \int\limits_{1}^{M} f(x) $, and that for all $M\in \mathbb{R}$ we have a finite number of points where we change the value of $g(x)=\frac{1}{x^2}$, which equals $\lfloor M \rfloor -1$.

This way, I am not quite sure that I use the theorem properly, but unsure if there is a problem. I only use it that way for proper integrals, I think, but again not sure.

Any input will be appreciated.

3

There are 3 best solutions below

0
On

Yes. By your definition of $f$, $f$ differs from $g$ at finitely many points on the interval $[1, M]$ whence $$ \int_1^M f(x)\, dx=\int_1^M g(x)\, dx $$ for each $M>1$. Now let $M\to \infty$ to deduce the result.

0
On

$$f(x)=\sum_{n\geq 1}\exp\left[-n^4(x-n)^2\right] $$ does the job. For any $m\in\mathbb{N}^+$ we have $f(m)\geq 1$, but $$ \int_{1}^{+\infty}\exp\left[-n^4(x-n)^2\right]\,dx<\int_{\mathbb{R}}e^{-n^4 x^2}\,dx=\frac{C}{n^2} $$ so $f(x)\in L^1(\mathbb{R}^+)$. In order to prove that $\lim_{x\to +\infty}f(x)$ does not exist it is enough to consider the behaviour of $f(x)$ at the elements of $\frac{1}{2}+\mathbb{N}$, in order to deduce $\lim_{m\to +\infty}f\left(\frac{1}{2}+m\right)=0$.

0
On

If you want a continuous example, imagine a function that's either 0 or has triangular peaks occurring a $x\in\mathbb{Z}$ with width $1/x^2$ and height 1.