Let m and n be the numbers of real roots of the quadratic equations x2−12x+[x]+31=0 and x2−5∣x+2∣−4=0 respectively, where [x] denotes the greatest integer ≤x. Then m2+mn+n2 is equal to ______.
Answer: 9
Solution
For n, solve x2−5∣x+2∣−4=0. If x≥−2: x2−5x−14=0⇒(x−7)(x+2)=0⇒x=7,−2, both admissible. If x<−2: x2+5x+6=0⇒(x+2)(x+3)=0⇒x=−3 (admissible; x=−2 is a boundary already counted). Thus n=3 with roots −3,−2,7.
For m, write x2−12x+31=−[x], i.e. (x−6)2−5=−[x]. Since (x−6)2−5≥−5, a root needs [x]≤5. Testing the intervals where the parabola is low enough: on [4,5) it gives (x−6)2=1⇒x=5,7 (both excluded); on [5,6) it gives (x−6)2=0⇒x=6 (excluded); on [6,7) it needs (x−6)2=−1 (impossible); elsewhere (x−6)2−5>−[x]. No interval yields a valid root, so m=0.