Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Prove that $\forall x\in\Bbb R:\lfloor x^2\rfloor-\lfloor rx\rfloor\ge-1\iff|r|\le2$.

+1
−1

Prove that the inequality $\lfloor x^2\rfloor-\lfloor rx\rfloor\ge-1$ holds true for all real numbers $x$ if and only if $|r|\le2$.

My (proposed) solution, which took me around 2 hours:

First, we reframe the inequality to $\lfloor x^2\rfloor-\lfloor rx\rfloor+1\ge0$.Suppose $r=a$ satisfies the inequality for all real numbers $x$. Consequently, it also does for all real numbers $-x$: $$\lfloor(-x)^2\rfloor-\lfloor a(-x)\rfloor+1\ge0$$ $$\lfloor x^2\rfloor-\lfloor (-a)x\rfloor+1\ge0$$ And we get that $r=-a$ satisfies the condition if and only if $r=a$ does too. Then, we only need to consider cases where $r\ge0$.

Furthermore, let us consider cases where $r\gt2$. The inequality holds for all $x$, so we test it for $0\lt x=\frac2r\lt1$. $$\lfloor x^2\rfloor-\lfloor2\rfloor+1\ge0$$ $$0-2+1\ge0$$, contradiction. We are left with $r\in[0,2]$.

Another observation. If $a\ge0$ and $r=a$ fulfills the condition, $$\lfloor x^2\rfloor-\lfloor rx\rfloor+1\ge0$$ For $x\ge0$, we find that $r\lt a$ also fulfills the condition. All three terms are positive when $x\lt0$, and therefore for $a\ge0$, all $r\lt a$ fulfill the condition if $r=a$ does. Therefore, all that's left to do is to prove the case for $r=2$, and we are done.

Notice that $\lfloor a+b\rfloor-1\le\lfloor a\rfloor+\lfloor b\rfloor$, and $(x-1)^2\ge0\implies\lfloor x^2-2x+1\rfloor=\lfloor x^2-2x\rfloor+1\ge0$. Combining the two, $$0\le\lfloor x^2-2x\rfloor-1+2\le\lfloor x^2\rfloor+\lfloor-2x\rfloor+2$$. And as long as $a\notin\Bbb Z$, $$\lfloor-a\rfloor=-\lfloor a\rfloor-1$$. Applying that, for $2x\notin\Bbb Z$, $$0\le\lfloor x^2\rfloor+\lfloor-2x\rfloor+2=\lfloor x^2\rfloor-\lfloor2x\rfloor+1\ \blacksquare$$ And if $n=2x\in\Bbb Z$, $$0\le\left\lfloor\frac14n^2\right\rfloor-n+2$$. Notice that $n\equiv1\pmod4$ or $n\equiv3\pmod4\iff n^2\equiv1\pmod4$. So, $$0\le\frac14(n^2-1)-n+2$$ $$0\le\frac14n^2-n+\frac74$$ $$0\le\left(\frac12n-1\right)^2+\frac34\ \blacksquare$$.

Is my proposed solution correct? And better yet, is there a faster (and shorter) way to find this proof?

Thank you in advance, and feel free to correct any errors I made!

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+4
−0

This is definitely more complicated than it needs to be.

First, we can rewrite the inequality as $$\lfloor x^2 + 1\rfloor \geq \lfloor rx \rfloor$$

Proof 1

(This is the first proof I wrote, but the second one is nicer and takes a more categorical perspective.)

$\lfloor x^2 + 1 \rfloor = 1$ for $|x| < 1$ so choosing $x$ to be the opposite sign of $r$ leads to $|x||r| < 2$ on the same domain. Since $|x|$ gets arbitrarily close to $1$, this implies that $|r| \leq 2$. (If you want to formalize this more, you can take the limit with $|x| = 1-1/n$ as $n \to \infty$.) This gives the left to right implication.

Since floor is monotonic, we also have $x^2 + 1 \geq rx$ implies $\lfloor x^2 + 1 \rfloor \geq \lfloor rx \rfloor$. Thus we have the constraint $$x^2 - rx + 1 \geq 0$$ We know the minimum of this function is at $x = r/2$ and substituting that into the inequality gives $$r^2/4 - r^2/2 + 1 \geq 0$$ which can easily be solved for $r^2 \leq 4$ or $|r| \leq 2$ giving the right to left implication. (The change of order for the inequality is because we end up multiplying both sides by $-4$.)


I wanted to make a second proof that leveraged a(n even) more categorical perspective. To that end, in addition to noting that floor is functorial, i.e. monotonic, we also know that it is a right adjoint via $\iota \dashv \lfloor{-}\rfloor$ where $\iota : \mathbb Z \hookrightarrow \mathbb R$ is the inclusion which I'll suppress going forward. Explicitly, we have $m \leq \lfloor x\rfloor \iff m \leq x$ for any $x \in \mathbb R$ and $m \in \mathbb Z$. Finally, we have the full and faithfulness of the Yoneda embedding, which is to say $x \leq y \iff \forall z. z \leq x \to z \leq y$. Using these in our problem leads to the following proof.

Proof 2

For the $\implies$ direction: $$\begin{align} \lfloor rx \rfloor \leq \lfloor x^2 + 1 \rfloor & \iff \forall m. m \leq \lfloor rx \rfloor \to m \leq \lfloor x^2 + 1 \rfloor \\ & \iff \forall m. m \leq rx \to m \leq x^2 + 1 \\ & \iff \forall m. m > x^2 + 1 \to m > rx \end{align}$$ We now choose $m = 2$ and $|x| \in (0,1)$ with the sign of $x$ opposite of $r$. We then have $2/|x| > |r|$ and thus $|r|$ is bounded by the greatest lower bound of $\{2/|x|\mid x \in (0,1)\}$ which is $2$.

For the $\impliedby$ direction: If we can show that $rx \leq x^2 + 1$ then monotonicity would finish the proof. If $r$ and $x$ have opposite signs, this easily holds, so assume they have the same sign and, without loss of generality, they're both positive. We then have $2 \leq x + 1/x$, but the right hand sides' minimum (with positive $x$) which you can find using the usual calculus approach occurs when $x = 1$, finishing the proof.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

Floor is monotonic (1 comment)

Sign up to answer this question »