Let \( m \) and \( n \) be the numbers of real roots of the quadratic equations \( x^2 - 12x + [x] + 31 = 0 \) and \( x^2 - 5|x+2| - 4 = 0 \), respectively, where \( [x] \) denotes the greatest integer less than or equal to \( x \). Then \( m^2 + mn + n^2 \) is equal to ___________.
When solving equations involving greatest integer functions or absolute values, analyze the problem by breaking it into appropriate cases based on the conditions of the functions.
Let's solve the problem step by step.
First Equation: \( x^2 - 12x + \lfloor x \rfloor + 31 = 0 \)
We are given the quadratic equation: \[ x^2 - 12x + \lfloor x \rfloor + 31 = 0 \] Here, \( \lfloor x \rfloor \) represents the greatest integer less than or equal to \( x \). This makes the equation non-trivial because the greatest integer function is involved, and we need to consider different intervals for \( x \) based on its integer value.
Case 1: \( \lfloor x \rfloor = 0 \)
If \( x \) is in the range \( [0, 1) \), then \( \lfloor x \rfloor = 0 \). The equation becomes: \[ x^2 - 12x + 31 = 0. \] Solving the quadratic equation \( x^2 - 12x + 31 = 0 \) using the quadratic formula: \[ x = \frac{-(-12) \pm \sqrt{(-12)^2 - 4(1)(31)}}{2(1)} = \frac{12 \pm \sqrt{144 - 124}}{2} = \frac{12 \pm \sqrt{20}}{2}. \] Simplifying: \[ x = \frac{12 \pm 2\sqrt{5}}{2} = 6 \pm \sqrt{5}. \] We get two roots: \[ x_1 = 6 + \sqrt{5} \approx 8.236, \quad x_2 = 6 - \sqrt{5} \approx 3.764. \] Since \( x \in [0, 1) \), neither of these roots are within this interval, so there are no real roots for this case.
Case 2: \( \lfloor x \rfloor = 1 \)
For \( x \in [1, 2) \), \( \lfloor x \rfloor = 1 \). The equation becomes: \[ x^2 - 12x + 1 + 31 = 0 \quad \Rightarrow \quad x^2 - 12x + 32 = 0. \] Solving this quadratic equation: \[ x = \frac{-(-12) \pm \sqrt{(-12)^2 - 4(1)(32)}}{2(1)} = \frac{12 \pm \sqrt{144 - 128}}{2} = \frac{12 \pm \sqrt{16}}{2}. \] Simplifying: \[ x = \frac{12 \pm 4}{2} = 8 \text{ or } 4. \] Both roots, 8 and 4, are outside the interval \( [1, 2) \), so there are no real roots for this case either.
Case 3: \( \lfloor x \rfloor = 2 \)
For \( x \in [2, 3) \), \( \lfloor x \rfloor = 2 \). The equation becomes: \[ x^2 - 12x + 2 + 31 = 0 \quad \Rightarrow \quad x^2 - 12x + 33 = 0. \] Solving this quadratic equation: \[ x = \frac{-(-12) \pm \sqrt{(-12)^2 - 4(1)(33)}}{2(1)} = \frac{12 \pm \sqrt{144 - 132}}{2} = \frac{12 \pm \sqrt{12}}{2} = \frac{12 \pm 2\sqrt{3}}{2}. \] Simplifying: \[ x = 6 \pm \sqrt{3}. \] Thus, the roots are: \[ x_1 = 6 + \sqrt{3} \approx 7.732, \quad x_2 = 6 - \sqrt{3} \approx 4.268. \] Both roots are outside the interval \( [2, 3) \), so there are no real roots for this case.
Case 4: \( \lfloor x \rfloor = 3 \)
For \( x \in [3, 4) \), \( \lfloor x \rfloor = 3 \). The equation becomes: \[ x^2 - 12x + 3 + 31 = 0 \quad \Rightarrow \quad x^2 - 12x + 34 = 0. \] Solving this quadratic equation: \[ x = \frac{-(-12) \pm \sqrt{(-12)^2 - 4(1)(34)}}{2(1)} = \frac{12 \pm \sqrt{144 - 136}}{2} = \frac{12 \pm \sqrt{8}}{2} = \frac{12 \pm 2\sqrt{2}}{2}. \] Simplifying: \[ x = 6 \pm \sqrt{2}. \] Thus, the roots are: \[ x_1 = 6 + \sqrt{2} \approx 7.414, \quad x_2 = 6 - \sqrt{2} \approx 4.586. \] Both roots are outside the interval \( [3, 4) \), so there are no real roots for this case.
Second Equation: \( x^2 - 5|x + 2| - 4 = 0 \)
Now, we solve the second quadratic equation \( x^2 - 5|x + 2| - 4 = 0 \).
Case 1: \( x + 2 \geq 0 \) (i.e., \( x \geq -2 \))
In this case, \( |x + 2| = x + 2 \). The equation becomes: \[ x^2 - 5(x + 2) - 4 = 0 \quad \Rightarrow \quad x^2 - 5x - 10 - 4 = 0 \quad \Rightarrow \quad x^2 - 5x - 14 = 0. \] Solving this quadratic equation: \[ x = \frac{-(-5) \pm \sqrt{(-5)^2 - 4(1)(-14)}}{2(1)} = \frac{5 \pm \sqrt{25 + 56}}{2} = \frac{5 \pm \sqrt{81}}{2} = \frac{5 \pm 9}{2}. \] Thus, the roots are: \[ x_1 = \frac{5 + 9}{2} = 7, \quad x_2 = \frac{5 - 9}{2} = -2. \] Both roots are valid since \( x \geq -2 \).
Case 2: \( x + 2 < 0 \) (i.e., \( x < -2 \))
In this case, \( |x + 2| = -(x + 2) \). The equation becomes: \[ x^2 - 5(-x - 2) - 4 = 0 \quad \Rightarrow \quad x^2 + 5x + 10 - 4 = 0 \quad \Rightarrow \quad x^2 + 5x + 6 = 0. \] Solving this quadratic equation: \[ x = \frac{-5 \pm \sqrt{5^2 - 4(1)(6)}}{2(1)} = \frac{-5 \pm \sqrt{25 - 24}}{2} = \frac{-5 \pm \sqrt{1}}{2} = \frac{-5 \pm 1}{2}. \] Thus, the roots are: \[ x_1 = \frac{-5 + 1}{2} = -2, \quad x_2 = \frac{-5 - 1}{2} = -3. \] The root \( x = -2 \) is not valid because it does not satisfy \( x < -2 \), but \( x = -3 \) is valid.
Final Calculation: \( m^2 + mn + n^2 \)
- From the first equation, we determined that there are no real roots. - From the second equation, we have 3 roots: \( x = 7 \), \( x = -2 \), and \( x = -3 \). So \( n = 3 \). Finally, the value of \( m^2 + mn + n^2 \) is: \[ m^2 + mn + n^2 = 0 + 0 \cdot 3 + 3^2 = 9. \] Thus, the answer is: \[ \boxed{9}. \]