It is a well-known fact that if $f(t)\geq0$ for $t\geq0$, then $\int_{t}^{\infty}f(s)\mathrm{d}s\geq0$ for $t\geq0$ provided it exists. I am looking for a counter example of the reverse statement. How can we constract an oscillating continuous function such that $\int_{t}^{\infty}f(s)\mathrm{d}s\geq0$ for $t\geq0$ provided it exists?
Constructing an oscillating function with a nonnegative integral
61 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
I found a quite satisfying function: $$f(s)=e^{k \frac{\sin(s)}{s+1}}-1$$.
When you plot the graph of it, I think it is obvious enough(for a large enough $k$) to see the requirements are met.
Well, I would like to tell you how I came up with this function.
Initially, $\frac{\sin s}{s}$ might be a good candidate. Indeed, I suspect that this may also satisfy the requirements.
To make the integral be positive, then I looked for a function which produces large number when the argument is positive and small for negative arguments. That’s what $e^x-1$ does!
Then, the composition of these two functions, with the magnifying constant, is exactly what you want.
I think this continuous function is what you really want, instead of a piecewise function.
Let $A,B>0$ and $r\in(0,1)$ such that $rA\geq{}B$. Suppose that $f(t)\geq0$ for $t\in\cup_{k=0}^{\infty}[2k,1+2k]$, and $f(t)\leq0$ for $t\in\cup_{k=0}^{\infty}[1+2k,2+2k]$. Suppose further that \begin{equation} \begin{aligned}[] \int_{0+2k}^{1+2k}f(s)\mathrm{d}s={}&r^{k}A\quad\text{for}\ k=0,1,\cdots,\\ \int_{1+2k}^{2+2k}f(s)\mathrm{d}s={}&-r^{k}B\quad\text{for}\ k=0,1,\cdots. \end{aligned}\label{eq1}\tag{1} \end{equation} We will show that $F(t):=\int_{t}^{\infty}f(s)\mathrm{d}s\geq0$ for $t\geq0$.
Now, we give an explicit definition of a function satisfying the properties in \eqref{eq1} with $A=1$, $r=\frac{1}{2}$ and $B=rA$. Define $f(t)=2(-1)^{\lfloor{}t\rfloor}\bigl(\frac{1}{2}\bigr)^{\lfloor\frac{t+1}{2}\rfloor}(1-|2\{t+1\}-1|)$ for $t\geq0$, where $\lfloor\cdot\rfloor$ and $\{\cdot\}$ denote the integer and the fractional parts, respectively. Here is a graphic of the function defined above.
Another example is the following $g(t):=\frac{\sin(t\pi)}{2^{\lfloor\frac{t+1}{2}\rfloor}}$. See the next figure.
Thanks to saulspatz for correcting the first picture.