How many different constants is it right to use in these cases of integration?
$1) \int \frac{1}{x} dx= \begin{cases} \log(x)+c_1, x>0\\\log(-x)+c_2 x<0 \end{cases}$
Since the domain it's not an interval, so the constants can be different, right?
$2)\int \mid x \mid dx=\begin{cases} \frac{x^2}{2}+c_1, x\geq0 \\ -\frac{x^2}{2}+c_2 x<0 \end{cases}=\begin{cases} \frac{x^2}{2}+c_1, x\geq0 \\ -\frac{x^2}{2}+c_1 x<0 \end{cases}$
In this case I must impose $c_1=c_2$ right? Otherwise the function is not even continuous in $0$.
Are these correct?
Thanks for your help