I'm currently reviewing for a Calculus II final and I've come across a problem in which I am required to determine whether a statement is true or false, and if false, provide a counterexample. The statement is this:
Let $f\left( x\right)$ be a continuous function defined on $\left( -\infty ,\infty \right)$. If $\int _{-\infty }^{\infty }f\left( x\right) dx$ diverges, then $\int _{0}^{\infty }f\left( x\right) dx$ also diverges.
My initial reasoning is that this statement is true. Suppose the integral converges on $\left( 0,\infty \right)$. Then there must be a discontinuity on $\left( -\infty ,0\right)$ for the second part of the statement to be false. But the first part of the statement clearly states that the function is continuous on $\mathbb{R}$, so this cannot be the case. I cannot conceive of any counterexample to the statement. Does anyone know of any possible counterexample?
Counterexample:
\begin{equation} f(x)=\begin{cases} 1 & \text{ for } x<0\\ 1-x &\text{ for }0\le x<1\\0&\text{ for } x\ge1 \end{cases} \end{equation}