#### Question

If x, y \in Z such that

x^2+y^2 =4

x^3+y^3 = 8

Find the value of 2x+y

Question

If x, y \in Z such that

x^2+y^2 =4

x^3+y^3 = 8

Find the value of 2x+y

x^3+y^3 = (x+y)(x^2-xy+y^2)

Then,

8 = (x+y)(4-xy)

(1)

Since

x^2+y^2 =(x+y)^2-2xy=4

(2)

Let

m = x+y

(3)

n = xy

(4)

Then

4m -mn -8 = 0 \\ m^2-2n-4 = 0

n = \dfrac{4m-8}{m}

m^2-2\cdot \dfrac{4m-8}{m} - 4 = 0

m^3-12m+16 = 0

m = 2

m^3-12m+16

=m^3-8-12m+24

=(m-2)(m^2+2m+4)-12(m-2)

=(m-2)(m^2+m-8)=0

Therefore,

m is the only integer root for the cubic equation.

Then,

n = \dfrac{4m-8}{m}

=\dfrac{4*2-8}{2} = 0

therefore, x=0,y=2 or x=2, y=0

2x+y = 2 or 4.