Algerba question from Greg's question bank

image

how do we that two in the first part of the solution? I don’t get how a^2 + (1/a^2) becomes

a^4 + 2 + (1/a^4)

Note that (x + y)^2 = x^2 + 2xy + y^2.
In this case, we have x = a^2 and y = \frac{1}{a^2}. So, putting that back up,

\left(a^2 + \frac{1}{a^2}\right)^2 = (a^2)^2+(2\times a^2 \times \frac{1}{a^2})+ \left(\frac{1}{a^2}\right)^2

This is a^4 + 2 + \frac{1}{a^4}.