Considering this function:
$f(x)=\begin{cases} 2x\sin\left(\frac{1}{x}\right)-\cos\left(\frac{1}{x}\right), x\neq 0 \\ 0,\ x=0 \end{cases}$
I know that one antiderivative is
$F(x)=\begin{cases} x^2\sin\left(\frac{1}{x}\right) ;x\neq 0 \\ 0,\ ;x=0 \end{cases}$
One of the condition to be Riemann integrable for a function is to be continuous on a open interval $(a,b)$ and bounded on the closed interval $[a,b]$.
In this case I can say that $f$ is continuous in $(0,+\infty)$ and bounded in $[0,+\infty)$ so there exists the integral function
$G(x)=\int_0^x f(t) dt$
That is defined just for $x>0$
My question is can I use the integral function $G(x)$ to get $F(x)$ ? In other words is it true that $G(x)=F(x) \forall x \in \mathbb{R}$?
I mean the function is not continuous on $(-\infty, +\infty)$ so nothing tells me that it is surely Riemann integrable on all $\mathbb{R}$ right?
Therefore if I use $G(x)$ what do I actually get? Do I get $F(x)$ but just defined for $x>0$?
Am I missing something?
Thanks in advice for your help
$f$ is not bounded on $[0, \infty)$ but for each $x > 0$ it is bounded on $[0, x]$. Hence $$ G(x) = \int_0^x f(t) dt = F(x) - F(0) = F(x). $$ But this works also for $x < 0$, so $G = F$ on $\mathbb{R}$.