If \( A = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \), \( P = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} \) and \( X = A P A^T \), then \( A^T X^{50} A = \)
The value of \[ \int_0^{2} \sqrt{\frac{x(x^2+x+1)}{(x+1)(x^4+x^2+1)}} \, dx \] is