Another integral $\int \frac{3 x^2+2 x+1}{ \left(x^3+x^2+x+2\right) \sqrt{1+\sqrt{x^3+x^2+x+2}}} \, dx$ Here is an indefinite integral that is similar to an integral I wanna propose for a contest. Apart from 
using CAS, do you see any very easy way of calculating it?
$$\int \frac{1+2x +3 x^2}{\left(2+x+x^2+x^3\right) \sqrt{1+\sqrt{2+x+x^2+x^3}}} \, dx$$
EDIT: It's a part from the generalization 
$$\int \frac{1+2x +3 x^2+\cdots n x^{n-1}}{\left(2+x+x^2+\cdots+ x^n\right) \sqrt{1\pm\sqrt{2+x+x^2+\cdots +x^n}}} \, dx$$
Supplementary question: How would you calculate the following integral using the generalization above? Would you prefer another way?
$$\int_0^{1/2} \frac{1}{\left(x^2-3 x+2\right)\sqrt{\sqrt{\frac{x-2}{x-1}}+1} } \, dx$$
As a note, the generalization like the one you see above and slightly modified versions can be wisely used for calculating very hard integrals.

Let $\sinh^4(t)=x^3+x^2+x+2$. Then $\cosh(t)=\sqrt{1+\sqrt{x^3+x^2+x+2}}$ and
$$
\begin{align}
&\int\frac{3x^2+2x+1}{\left(x^3+x^2+x+2\right)\sqrt{1+\sqrt{x^3+x^2+x+2}}} \,\mathrm{d}x\\
&=\int\frac{\mathrm{d}\sinh^4(t)}{\sinh^4(t)\cosh(t)}\\
&=4\int\frac{\mathrm{d}t}{\sinh(t)}\\
&=4\int\frac{\mathrm{d}\cosh(t)}{\cosh^2(t)-1}\\
&=2\int\left(\frac1{\cosh(t)-1}-\frac1{\cosh(t)+1}\right)\mathrm{d}\cosh(t)\\[2pt]
&=2\log\left(\frac{\cosh(t)-1}{\cosh(t)+1}\right)+C\\[6pt]
&=-4\operatorname{arccoth}(\cosh(t))+C\\[6pt]
&=-4\operatorname{arccoth}\left(\sqrt{1+\sqrt{x^3+x^2+x+2}}\right)+C
\end{align}
$$
