Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are the roots of $x^2-6x+\lfloor x \rfloor+7=0$, where $\lfloor x \rfloor$ is the greatest integer function?

Is there some way to solve the equation without graphing?

share|cite|improve this question
A possible strategy is to solve $x^2-6x+n+7=0$ for all integers $n$, and find out when a solution $x_0$ (this will be a function of $n$, something square-root-ish) satisfies $n\leqslant x_0<n+1$. The problem reduces to $2$ polynomial inequalities of degree $2$ in the variable $n$. There will be some casework, though. – barto Jun 7 '14 at 9:37
Would inspection be acceptable ? – Claude Leibovici Jun 7 '14 at 9:37
@ClaudeLeibovici yes. – shaurya gupta Jun 7 '14 at 9:44
@barto $x_0$ would be a function of $n$ and $n$ itself is a function of $x$, so $x_0$ is a function of $x$...Would that give us the answer? – shaurya gupta Jun 7 '14 at 9:47
Can I recommend you $\lfloor x\rfloor$ (\lfloor x \rfloor) ? – Yves Daoust Jun 8 '14 at 10:05
up vote 5 down vote accepted

$x-1 < [x] \le x$, so $x^2-5x+6<0$ while $x^2-5x+7\ge 0$, which furthur reduces to $2<x<3$. We know $[x]=2$, so $x^2-6x+9=0$ and $x=3$. But this contradicts $x<3$ and hence no solution.

share|cite|improve this answer
@shauryagupta, no, there is no solution, as I mentioned at the end. – Magician Jun 7 '14 at 10:13

Given that $[x]=x+\epsilon$ for some $\epsilon$ in range $[0\ 1[$, you should study the parametric equation $$x^2-5x+\epsilon+7=0.$$

Its discriminant is $25-4\epsilon-28$, always negative for the allowed $\epsilon$.

share|cite|improve this answer
Yep, just two complex. – Yves Daoust Jun 7 '14 at 10:12

The equation is equivalent to


Suppose $a\leq x<a+1$, $a\in Z$

Then $[x]=a$ and

$x=3-\sqrt{2-a}\geq\\\geq 3-(2-a)=a+1$


$x=3+\sqrt{2-a}\geq a+1$

This is a contradiction and, hence there are no real solutions.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.