TITLE: Antiderivative of an odd function
QUESTION [5 upvotes]: Is the antiderivative of an odd function even?

The answer given by the book is yes.
However, I found a counterexample defined in $\mathbb{R}\setminus \{0\}$:
$$f(x)=\begin{cases}\ln |x|+1& x<0\\\ln |x|&x>0\end{cases}$$
Its derivative is $\frac 1x$, which is an odd function.  

Question: is my counterexample right?

REPLY [5 votes]: I think that $f$ should be defined on an interval $I$ which contains $0$ and is symmetric to $0$. If $F$ is an antiderivative of $f$ on $I$, then there is a constant $c$ such that 
$$F(x)=\int_0^x f(t) dt+c.$$
If you now calculate $F(-x)$ with the substitution $s=-t$ you will get $F(-x)=F(x).$
Try it !