<s>[INST] $ \int \frac{1}{2+\sqrt{x+1}+\sqrt{3-x}} \cdot d x $ I am trying to evaluate this antiderivative $$
\int \frac{1}{2+\sqrt{x+1}+\sqrt{3-x}} \cdot d x
$$
What i have done:
$$
\begin{split}
I
 &= \int \frac{1}{2+\sqrt{x+1}+\sqrt{3-x}} \cdot d x \\
 &= \int \frac{2+\sqrt{x+1}-\sqrt{3-x}}{4+x+1+4 \sqrt{x+1}-3+x} \cdot d x\\
 &= \int \frac{2+\sqrt{x+1}-\sqrt{3-x}}{2+2 x+4 \sqrt{x+1}} \cdot d x\\&=\int \frac{1}{1+x+2 \sqrt{x+1}} \cdot d x\\
 &\quad +\int \frac{\sqrt{x+1}}{2(1+x)+4 \sqrt{x+1}}\cdot d x \\
 &\quad -\int\frac{\sqrt{3-x}}{2(1+x)+4 \sqrt{x+1}} \cdot d x
\end{split}
$$
From this last line i can evaluate the first two antiderivatives but the last one $$\int\frac{\sqrt{3-x}}{2(1+x)+4 \sqrt{x+1}} \cdot dx$$ seems a bit hard for me two evaluate, i don't find the good substitution. I am opened to any suggestion. Thanks in advance!
 [/INST] Solution without trigonometry:
Let $u=\sqrt{x+1}$ and $v=\sqrt{3-x}$, then $u^2+v^2=4$ and $u^2-v^2=2x-2$, so $udu+vdv=0$ and $dx=udu-vdv=2udu=-2vdv$.
\begin{align*}\int\frac{dx}{2+u+v}&=\int\frac{(u+v-2)dx}{(u+v)^2-4}=
\int\frac{(u+v-2)dx}{2uv}=\int\left(\frac{dx}{2v}+\frac{dx}{2u}-\frac{dx}{uv}\right)\\&=\int\left(-dv+du-\frac{dx}{uv}\right)=-v+u-\int\frac{du}{v}+\int\frac{dv}{u}\\&=-v+u-\int\frac{(u^2+v^2)du}{4v}+\int\frac{(u^2+v^2)dv}{4u}\\&=-v+u+\int\frac{v(udv-vdu)}{4v}+\int\frac{u(udv-vdu)}{4u}\\&=-v+u+\frac12\int(udv-vdu)=-v+u+2\int\frac{udv-vdu}{u^2+v^2}\\&=-v+u+2\int\frac{u^2d(v/u)}{u^2+v^2}=-v+u+2\arctan(v/u)+C.\end{align*}
</s>