To add the expressions (x^2 + x + 1) and (x^2 - x + 1), we simply combine like terms.
The terms x^2 and x^2 remain unchanged because they have the same variable and exponent.
For the terms with x, we add (+x) and (-x) to get 0x.
For the constant terms 1 and 1, we add them together to get 2.
Putting it all together, the sum of (x^2 + x + 1) and (x^2 - x + 1) is:
2x^2 + 0x + 2
Simplifying further, we can remove the 0x term:
2x^2 + 2
