Compute difficult integral $\int \frac{dx}{2 + x + \sqrt{1 - x^2}}$ To solve the integral
$$I = \int \frac{dx}{2 + x + \sqrt{1 - x^2}}$$
I have tried several things, such as $t = \arcsin x$, because $\cos(\arcsin x) = \sqrt{1 - x^2}$. If I am not wrong, we can conclude with this variable change
$$
I = \int \frac{\cos t\,dt}{2 + \sin t + \cos t}
$$
but if it were correct, how could I go on?

Using @Bernard solution
$$y=\frac{2(1-u^2)}{(1+u^2)\bigl(u^2+2u+3\bigr)}$$ using partial fractions
$$y=-\frac{1+i}{2(u-i)}-\frac{1-i}{2 (u+ i)}+\frac{\sqrt{2}+2 i}{2 \left(\sqrt{2} u+\sqrt{2}-2 i\right)}+\frac{\sqrt{2}-2 i}{2 \left(\sqrt{2} u+\sqrt{2}+2 i\right)}$$
$$\int y\,du=\left(-\frac{1}{2}-\frac{i}{2}\right) \log (-2 u+2 i)\left(-\frac{1}{2}+\frac{i}{2}\right) \log (2 u+2 i)+$$
$$\frac{\left(\sqrt{2}+2 i\right) \log \left(\sqrt{2} u+\sqrt{2}-2 i\right)}{2
   \sqrt{2}}+\frac{\left(\sqrt{2}-2 i\right) \log \left(\sqrt{2} u+\sqrt{2}+2 i\right)}{2
   \sqrt{2}}$$
Now, recombining everything
$$\int y\,du=\tan ^{-1}(u)-\sqrt{2} \tan ^{-1}\left(\frac{u+1}{\sqrt{2}}\right)+\frac 12 \log \left(\frac{u^2+2 u+3}{u^2+1}\right)$$
