Given that,
x + y = 4 and xy = 2
We take the equation: x + y = 4 and on squaring both sides, we get
(x + y)2 = 42
x2 + y2 + 2xy = 16
x2 + y2 + 2(2) = 16 (Because xy = 2 is given)
x2 + y2 + 4 = 16
x2 + y2 = 16 – 4
x2 + y2 = 12
Therefore, the value of x2 + y2 is 12