Evaluate $$\int\frac{1}{x^{2}+3|x|+2}dx$$
Recently I came across some questions from Integrals of Modulus Functions of some users in MSE and I want a clarity in this integral.
My Thoughts
Let's assume $I=\int\frac{1}{x^{2}+3|x|+2}dx$
$\implies I=\int\frac{1}{|x|^{2}+3|x|+2}dx$
$\implies I=\int\frac{1}{(|x|+2)(|x|+1)}dx$
$\implies I=\int\frac{(|x|+2)-(|x|+1)}{(|x|+2)(|x|+1)}dx$
$\implies I=\int\frac{1}{|x|+1}dx-\int\frac{1}{|x|+2}dx$
My Doubt
Can I integrate the last result separately for $x\geq 0$ and $x<0$ ? Finally there will be $2$ results of this integral. One result will be for $x\geq 0$ and the other one will be for $x<0$. Wolfram Alpha is giving the result in terms of signum function.
I am confused whether My Thoughts are correct or I have to follow the Wolfram Alpha's answer.
Please help me out.