Expanding the given expression, we get:
(n^2 - 1)*(n^4 + n^2 + 1) - (n^2 - 1)^3= n^6 + n^4 + n^2 - n^4 - n^2 - 1 - (n^6 - 3n^4 + 3n^2 - 1)= n^6 + n^4 + n^2 - n^4 - n^2 - 1 - n^6 + 3n^4 - 3n^2 + 1= n^6 + n^4 + n^2 - n^4 - n^2 - 1 - n^6 + 3n^4 - 3n^2 + 1= -n^4 - 3n^2= -(n^4 + 3n^2)
Expanding the given expression, we get:
(n^2 - 1)*(n^4 + n^2 + 1) - (n^2 - 1)^3
= n^6 + n^4 + n^2 - n^4 - n^2 - 1 - (n^6 - 3n^4 + 3n^2 - 1)
= n^6 + n^4 + n^2 - n^4 - n^2 - 1 - n^6 + 3n^4 - 3n^2 + 1
= n^6 + n^4 + n^2 - n^4 - n^2 - 1 - n^6 + 3n^4 - 3n^2 + 1
= -n^4 - 3n^2
= -(n^4 + 3n^2)