Let $f:\mathbb R\longrightarrow\mathbb R$ be a function with $$f(x)=\frac{1}{3}\int_x^{x+3} e^{-t^2}dt$$ and consider $g(x)=x^nf(x)$ where $n\in\mathbb Z$.
I have to discuss the convergence of the integral $$\int_{-\infty}^{+\infty}g(x)dx$$ at the varying of $n\in\mathbb Z$.
Any idea? We have an integral of an "integral function", and I'm a bit confused!
Thanks in advance.
Clearly, $f\in \mathcal C^1(\mathbb R, \mathbb R)$.
If $x>0$, then for $t\in [x,x+3]$ we have $e^{-t^2}\le e^{-x^2}$. In the same spirit, if $x<-6$, then for $t\in [x,x+3]$ we have $e^{-t^2}\le e^{-(x+3)^2}$. Thus, we obtain $$f(x)\le e^{-x^2},\quad x>0,$$ $$f(x)\le e^{-(x+3)^2},\quad x<-6.$$ We will say that $$\bar f(x)=\begin{cases}e^{-x^2},&x>0,\\ f(x),&x\in[-6,0],\\e^{-(x+3)^2},&x<-6.\end{cases}$$ It's evident that $0<f\le \bar f$.
Another useful property of $f$ is that it's never zero, and $f(0)\ge e^{-9}$. As a consequence, for $n\le -1$ $g(n, x)$ is not integrable, because in the neighbourhood of zero $g(n,x)\sim \mathcal O(x^n)$; now we are left with non-negative $n$.
We study $\int_\mathbb R |g(n,x)|dx$. By comparison criterion, it's sufficient to prove that the following integral exists: $$\int_\mathbb R |x|^n \bar f(x)dx.$$ We split it: $$\int_\mathbb R |x|^n \bar f(x)dx=\int_{-\infty}^{-6}|x|^ne^{-(x+3)^2}dx + \int_{0}^{ \infty}|x|^ne^{- x ^2}dx+\int_{-6}^{0}|x|^nf(x)dx.$$
First and second terms in this sum exist because the exponent there decreases on infinity faster than any polynomial (gaussian random variables have all moments, as another approach). The last term exists, because it's an integration over a compact of a continuous function. Therefore, for $n\ge 0$ $\int_\mathbb R |x|^n \bar f(x)dx<\infty$, it yields that for $n\ge 0$ $\int_\mathbb R |x|^n f(x)dx<\infty$, or in other words, for $n\ge 0$ the function $g(n,x)$ is integrable.