<s>[INST] What to do next with this indefinite integral? I'd like to evaluate the following indefinite integral:
$$\displaystyle\int \frac{dx}{(3+x^2)(\sqrt{1+x})}$$
I started by letting $y^2=1+x$ and, after simplifying, got here:
$$ 2\int\frac{dy}{y^4-2y^2+4}$$
I'm not sure what to do next. Does anyone have any advice?
 [/INST] The factorization you need is
\begin{align}
y^4-2y^2+4&=y^4+4y^2+4-6y^2\\[4px]
&=(y^2+2)^2-(\sqrt{3}\,y)^2\\[4px]
&=(y^2-\sqrt{3}\,y+2)(y^2+\sqrt{3}\,y+2)
\end{align}
Then, with partial fractions,
$$
\frac{1}{(y^2-\sqrt{3}\,y+2)(y^2+\sqrt{3}\,y+2)}=
\frac{Ay+B}{y^2-\sqrt{3}\,y+2}+
\frac{Cy+D}{y^2+\sqrt{3}\,y+2}
$$
and the integral becomes (almost) elementary.
</s>