# How to solve $3\lfloor x \rfloor - \lfloor x^{2} \rfloor = 2\{x\}$?

I am trying to solve the following question involving floor/greatest integer functions.

$$3\lfloor x \rfloor - \lfloor x^{2} \rfloor = 2\{x\}$$ with the notations $$\lfloor x \rfloor$$ denoting the greatest integer less than or equal to $$x$$ and $$\{x\}$$ to mean the fractional part of $$x$$.

I used the following property for floor functions.

$$n\leq x$$ if and only if $$n \leq \lfloor x \rfloor$$ where $$n\in \mathbb{Z}$$

Let $$p=\lfloor x^{2} \rfloor$$, then

$$p\leq \lfloor x^{2} \rfloor < p+1$$

$$\rightarrow p \leq x^{2} < p+1$$

$$\rightarrow \sqrt{p} \leq x < \sqrt{p+1}$$ , since $$\sqrt{p} \in \mathbb{Z}$$

$$\rightarrow \sqrt{p} \leq \lfloor x \rfloor < \sqrt{p+1}$$ We then have $$\sqrt{p} = \lfloor x \rfloor$$

Since $$\{x\}=x-\lfloor x \rfloor,$$

$$3\lfloor x \rfloor - \lfloor x^{2} \rfloor - 2\{x\}= 3\lfloor x \rfloor - \lfloor x^{2} \rfloor - 2(x-\lfloor x \rfloor)= 5\lfloor x \rfloor - \lfloor x^{2} \rfloor - 2x=0$$

Substituting $$p$$, $$\sqrt{p}$$ for $$\lfloor x^{2} \rfloor$$ and $$\lfloor x \rfloor$$ respectively, and also letting $$x= \sqrt{p},$$ we get $$p = 3\sqrt{p}$$ solving for $$p$$ gives $$p=0, 9$$, and hence $$x=0, 3$$

The problem is that according to the solution for the problem, $$x$$ also equals to $$\frac{3}{2}$$ for $$\{x\}=\frac{1}{2}$$ since $$2\{x\}\in \mathbb{Z}$$. However, by definition for $$\{x\}$$, $$0 \leq \{x\} < 1$$, then $$0 \leq 2\{x\} < 2$$. How can $$\{x\}=\frac{1}{2}$$ and how do I use this to obtain $$x=\frac{3}{2}$$. I am not sure what I am missing. IF I made any mistakes in my reasoning. Can someone point it out to me please. Thank you in advance.

• It's not true that $\sqrt{p}\in\mathbb{Z}$ Say $x=1.5$ Then $p=\lfloor 2.25\rfloor = 2,$ and $\sqrt{p}=\sqrt{2}$ May 10, 2020 at 0:35
• @saulspatz thank you for pointing that out.
– Seth
May 10, 2020 at 0:45

Let $$x = n + r$$ where $$n = [x]$$ and $$r = \{x\}$$.

Then we have $$3n - [n^2 + 2nr + r^2]=2r$$

$$3n - n^2 - [2nr + r^2] = 2r$$

and.... oh, hey, the LHS is an integer the RHS being $$2\{x\}$$ means $$\{x\} = 0$$ or $$0.5$$.

Two options $$x$$ is an integer and $$x = [x] = n$$ and $$r=\{x\} = 0$$ and we have

$$3n-n^2=0$$ and $$n^2 = 3n$$ and $$n= 0$$ or $$n = 3$$.

So $$x = 0$$ and $$x=3$$ are two solutions.

(Check: $$x=0\implies 3[x] - [x^2] = 3*0 - 0 = 0 = \{0\}$$. Check. And $$x = 3\implies 3[x]-[x^2] = 3- [3^2] = 3*3-9 = 0=\{3\}$$. Check.

And if $$x = n + \frac 12$$ and $$r = \frac 12$$ then

$$3n - n^2 - [2n\frac 12 + \frac 14] = 2\frac 12$$

$$3n - n^2 - [n + \frac 14] = 1$$

$$3n -n^2 - n = 1$$

$$n^2 - 2n + 1 =0$$ so $$(n-1)^2 = 0$$ and $$n = 1$$.

$$x = 1+\frac 12 = 1\frac 12$$.

(Check: If $$x = 1.5$$ then $$3[x] - [x^2] = 3[1.5] - [1.5^2] = 3*1 - [2.25]=3-2=1 = 2*\frac 12 = 2\{1.5\}$$. Check.)

Write $$\{x\}=x-\lfloor x\rfloor$$. Then we have $$5\lfloor x\rfloor - \lfloor x^2\rfloor = 2x$$Since the LHS is an integer, the RHS must be as well. There are two cases: $$x$$ is an integer, or $$x$$ is a half-integer.

• $$x$$ an integer. Drop the brackets: $$5x-x^2=2x;\qquad x=0,3$$
• $$x$$ is a half-integer. Write $$x=y+1/2$$. Then $$x^2 = y^2+y+1/4$$, and again we can drop the brackets: $$5y-(y^2+y)=2y+1; \qquad y=1, x=3/2$$
• may I ask how you arrive at $x$ is a half integer. I mean can't $x$ be anything else in between $0$ and $1$?
– Seth
May 10, 2020 at 0:46
• After we substitute $\{x\}=x-\lfloor x\rfloor$, both sides are integers. Then if $2x$ is an integer, $x$ is either an integer or a half-integer. May 10, 2020 at 0:47
• I think my issue is the following: from $0 \leq \{x\} < 1$, we get $0 \leq 2\{x\} < 2$. So how do I determine where else $\{x\}$ could be.
– Seth
May 10, 2020 at 0:56
• Clearly the LHS is an integer. Then $2\{x\}$ is an integer as well. This means either $2\{x\}=0$, i.e. $x$ is an integer, or $2\{x\}=1$, i.e. $x$ is a half-integer. May 10, 2020 at 1:00
• I think I see it now, Since $3\lfloor x \rfloor - \lfloor x^{2} \rfloor\in \mathbb{Z}$ and $0 \leq \{x\} < 1$ then, $\frac{3\lfloor x \rfloor - \lfloor x^{2} \rfloor }{2} = \{x\}$ implies that $\frac{3\lfloor x \rfloor - \lfloor x^{2} \rfloor }{2} \leq \{x\}<1$ which forces $\{x\}=\frac{1}{2}$
– Seth
May 10, 2020 at 1:05

$$\mathrm{3}\lfloor{x}\rfloor−\lfloor{x}^{\mathrm{2}} \rfloor=\mathrm{2}\left\{{x}\right\} \\$$ $$\mathrm{3}\lfloor{x}\rfloor−\lfloor{x}^{\mathrm{2}} \rfloor=\left\{\mathrm{0},\mathrm{1}\right\} \\$$ $$\centerdot \\$$ $$\lfloor{x}\rfloor=\mathrm{0}\Rightarrow\lfloor{x}^{\mathrm{2}} \rfloor=\mathrm{0} \\$$ $$\lfloor{x}\rfloor=\mathrm{1}\Rightarrow\lfloor{x}^{\mathrm{2}} \rfloor=\left\{\mathrm{2},\mathrm{3}\right\} \\$$ $$\lfloor{x}\rfloor=\mathrm{2}\Rightarrow\lfloor{x}^{\mathrm{2}} \rfloor=\left\{\mathrm{5},\mathrm{6}\right\} \\$$ $$\lfloor{x}\rfloor=\mathrm{3}\Rightarrow\lfloor{x}^{\mathrm{2}} \rfloor=\mathrm{9} \\$$ $$\centerdot \\$$ $$\mathrm{3}\lfloor{x}\rfloor−\lfloor{x}^{\mathrm{2}} \rfloor=\mathrm{2}\left({x}−\left[{x}\right]\right) \\$$ $${x}=\frac{\mathrm{5}\lfloor{x}\rfloor−\lfloor{x}^{\mathrm{2}} \rfloor}{\mathrm{2}} \\$$ $${x}=\left\{\mathrm{0},\frac{\mathrm{3}}{\mathrm{2}},\mathrm{3}\right\} \\$$