\(P=\frac{\left(x^{10}-x^8\right)+\left(x^6-x^4\right)+\left(x^2-1\right)}{\left(x^2\right)^2-1}\)
\(=\frac{x^8\left(x^2-1\right)+x^4\left(x^2-1\right)+\left(x^2-1\right)}{\left(x^2-1\right)\left(x^2+1\right)}\)
\(=\frac{\left(x^2-1\right)\left(x^8+x^4+1\right)}{\left(x^2-1\right)\left(x^2+1\right)}=\frac{x^8+x^4+1}{x^2+1}\)