What are a and b if the roots of equation x^2+ax+b=0 are integers and a+b=12?

1 Answer | Add Yours

justaguide's profile pic

justaguide | College Teacher | (Level 2) Distinguished Educator

Posted on

The roots of the equation x^2 + ax + b = 0 are `x1 = (-a + sqrt(a^2 - 4b))/2` and `x2 = (-a - sqrt(a^2 - 4b))/2`

a + b = 12 and as the roots are integers `a^2 - 4b = (12 - b)^2 - 4b` has to be a square.

`(12 - b)^2 - 4b = (12 - b - 2*sqrt b)(12 - b + 2*sqrt b)`

`-2*sqrt b = 2*sqrt b`

=> `4*sqrt b = 0`

=> b = 0

a = 12

The required values of a and b are 12 and 0 respectively.

We’ve answered 318,916 questions. We can answer yours, too.

Ask a question