Here is Ignacio Larrosa Cañestro's solution:
The LHS is a symmetrical polynomial. Then, if x0 is a root, so is 1/x0, and x0 = 0 is never a root. Dividing by x^2, x^2 + ax + b +a/x + 1/x^2 = 0 (#1) Letting z = x + 1/x (#2) z^2 = x^2 + 1/x^2 + 2 and the equation becomes z^2 +az + (b - 2) = 0 ==> z = (-a +/- sqrt(a^2 - 4(b - 2)))/2 (#3) Then, if b > a^2/4 + 2 there aren't real solutions, because z is imaginary and then x can't be real. Solving #2 for x, x^2 - zx + 1 = 0 x = (z +/- sqrt(z^2 - 4))/2 If z is real, in order to x be real, it must be z^2 ≥ 4 ===> z ≤ -2 or z ≥ 2. In #3 we can see that the the number of solutions don't depend on the sign of a. Then we can study only the case a ≥ 0, and reflect the conclusions to a ≤ 0. Let z1 = (-a + sqrt(a^2 - 4(b - 2)))/2 z2 = (-a - sqrt(a^2 - 4(b - 2)))/2 Then, if z is real, i) z1^2 ≥ 4 and z2^2 ≥ 4 ===> 4 real solutions for (#1) ii) (z1^2 ≥ 4 and z2^2 < 4) or (z1^2 < 4 and z2^2 ≤ 4) ===> 2 real solutions for (#1) iii) z1^2 < 4 and z2^2 < 4 ===> 0 real solutions for (#1) A) z1^2 ≥ 4 a^2 + a^2 - 4(b - 2) - 2a*sqrt(a^2 - 4(b - 2)) ≥ 16 a^2 - 2(b - 2) - a*sqrt(a^2 - 4(b - 2)) ≥ 8 a^2 - 2b - 4 ≥ a*sqrt(a^2 - 4(b - 2)) ===> a^2 - 2b - 4 ≥ 0 ===> b ≤ a^2/2 - 2 AND (a^2 - 2b - 4)^2 ≥ a^2(a^2 - 4(b - 2)) <===> - 8a^2 + 4b^2 + 16b + 16 ≥ 8a^2 - 2a^2 + b^2 + 4b + 4 ≥ 2a^2 (b + 2)^2 ≥ (2a)^2 <===> b ≥ 2a - 2 OR b ≤ -2a - 2 (we are assuming that a ≥ 0) B) z2^2 ≥ 4 a^2 + a^2 - 4(b - 2) + 2a*sqrt(a^2 - 4(b - 2)) ≥ 16 a^2 - 2(b - 2) + a*sqrt(a^2 - 4(b - 2)) ≥ 8 a*sqrt(a^2 - 4(b - 2)) ≥ - a^2 + 2b + 4 ===> (-a^2 + 2b + 4)^2 ≤ a^2(a^2 - 4(b - 2)) <===> 4b^2 + 16b - 8a^2 + 16 ≤ 8a^2 - 2a^2 + b^2 + 4b + 4 ≤ 2a^2 (b + 2)^2 ≤ (2a)^2 <===> b ≤ 2a - 2 AND b ≥ -2a - 2 (we are assuming that a ≥ 0) OR - a^2 + 2b + 4 ≤ 0 ==> b ≤ a^2/2 - 2 Joining all, taking in account that the two parabolas an two straight lines intersect in (+/- 4, 6) and (0, - 2) 0 real solutions: IF |a| ≥ 4, b > a^2/4 + 2 IF - 4 < a < 0, b > -2a - 2 IF 0 ≤ a < 4, b > 2a - 2 2 real solutions: IF a ≤ -4, 2a - 2 < b < -2a - 2 IF - 4 < a < 0, 2a - 2 < b ≤ -2a - 2 IF 0 < a < 4, -2a - 2 < b ≤ 2a - 2 IF a ≥ 4, -2a - 2 < b < 2a - 2 4 real solutions: IF a ≤ -4, -2a - 2 ≤ b ≤ a^2/4 + 2 IF - 4 < a ≤ 0, b ≤ 2a - 2 IF 0 < a < 4, b ≤ -2a - 2 IF a ≥ 4, 2a - 2 ≤ b ≤ a^2/4 + 2 In the figure, there are 0 real solutions in the white area, 2 real solutions in the blue area and 4 real solutions in the red area. At the frontiers, the number of real solutions is the highest of the neighbours zones.