# Constructing a continuous version of the function equal to $n$ on the segment $[n,n+1/n^3)$ with $n\geq 1$.

My difficulty is the title problem. In the problem that is asked, I am attempting to show that there exists a positive continuous function $f$ on $\mathbb{R}$ so that $f$ is Lebesgue integrable on $\mathbb{R}$, but yet $\limsup_{x\rightarrow\infty} f(x) = \infty$.

The hint (title) tells me how I should construct my function.

I'm stuck because I'm not sure how to make $f$ continuous. I calculated my segment for values of $n=1,2,3$ and know that:

$f(1) = 1$ on $[1,2)$, $f(2) = 2$ on $[2, 17/8)$, and $f(3) = 3$ on $[3,82/27)$.

It's clear that the function's gaps get larger and larger as $n$ grows, and I'm not sure how to remedy this to make $f$ continuous. Hints/ideas would be greatly appreciated!

Thanks, Dom

-

You have a problem at $2$ which can be rectified-just lower the upper limit of where the function is $1$ a bit. The basic idea is to take the function down to zero fast enough outside the intervals of the hint. So you could say $$f(x) = \begin {cases} 2 & 2 \le x \lt \frac {17}8 \\ 2-100(x-\frac {17}8) & \frac {17}8 \le x \lt \frac {17}8+\frac 1{50} \\0 & \frac {17}8+\frac 1{50} \le x \lt 3-\frac 1{100} \\100(x-(3-\frac 1{100}))&3-\frac 1{100} \le x \lt 3\end {cases}$$ Intuitively, each hump only contributes an area of $\frac 1{n^2}$ and we know the sum of those is finite. You need to specify a rule so the area contributed by the transitions is also finite. I just used $\frac 1{50}$ and $\frac 1{100}$ as examples.
@CameronBuie: good point-I missed that. But the section at $0$ can be shifted up by a proper $\epsilon$ to repair it. Again, we just need $\epsilon$ to fall fast enough that the flats contribute finite area. – Ross Millikan Nov 13 '12 at 1:46