TITLE: find the maximum of the value $c$ such $ \{ a^2 \} + \{ b^2 \} \leqslant 2 - \frac{c}{(a + b)^2} $
QUESTION [10 upvotes]: Suppose that $a, b$ are postive numbers and $a + b \in \mathbb{Z} {}_+$. Find the maximal constant $c$, s.t.
$$ \{ a^2 \} + \{ b^2 \} \leqslant 2 - \frac{c}{(a + b)^2} $$
for all $a, b$. Here $\{ x \}$ is the fractional part of $x$.
It is said the $c=\dfrac{3}{4}$ is best, but I don't see why.

REPLY [2 votes]: A complete proof.
Let $n=a+b\in\Bbb N\setminus\{0\}$ and $0<a<b$.
Then we can write
\begin{align}
&a_n(x)=\frac n2-x&
&b_n(x)=\frac n2+x&
\end{align}
with $0\leq x<\frac n2$.
For each $n$ define the function
\begin{align}
&f_n:\left[0,\frac n2\right)\to[0,2]&
&x\mapsto\{a_n(x)^2\}+\{b_n(x)^2\}
\end{align}
Then we are looking for
$$c=\inf_{n>0}\inf_{0\leq x<n/2}(2-f_n(x))n^2=\inf_{n>0}n^2\left(2-\sup_{0\leq x<n/2}f_n(x)\right)$$
Let $S_n$ be the set of $x_0\in\left[0,\frac n2\right)$ such that $\{a_n(x_0)^2\}=0$ or $\{b_n(x_0)^2\}=0$.
Then $S_n$ has finitely many elements and $f_n$ has positive derivative at each point $x\notin S_n$.
Consequently,
$$\sup_{0\leq x<n/2}f_n=\sup_{x_0\in S_n}\lim_{x\to x_0^-}f_n(x)$$
We have $\{a_n(x_0)^2\}=0$ if and only if $a_n(x_0)^2\in\Bbb N$, hence $x_0=n/2-\sqrt u$ for some $\Bbb N\ni u\leq (n/2)^2$, hence
$$\lim_{x\to x_0^-}f_n(x)=1+\{(n-\sqrt u)^2\}=
\begin{cases}
2-\{2n\sqrt u\}&\sqrt u\notin\Bbb N\\
0&\sqrt u\in\Bbb N
\end{cases}$$
Similarly, $\{b_n(x_0)^2\}=0$ if and only if $b_n(x_0)^2\in\Bbb N$, hence $x_0=\sqrt u-n/2$ for some $u\in\Bbb N$ satisfying $(n/2)^2\leq u\leq n^2$, hence
$$\lim_{x\to x_0^-}f_n(x)=\{(\sqrt u-n)^2\}+1=
\begin{cases}
2-\{2n\sqrt u\}&\sqrt u\notin\Bbb N\\
0&\sqrt u\in\Bbb N
\end{cases}$$
Consequently, we get
$$c=\inf_{n>0}\inf_{0<u<n^2\\\sqrt u\notin\Bbb N}n^2\{2n\sqrt u\}$$
Write $4n^2u=q^2+r$ with $0\leq r\leq 2q$.
Note that $\sqrt u\notin\Bbb N$ implies $r\neq 0$, and $q^2+r\equiv 0\pmod 4$ implies $r\neq 1$ and $r\neq 2$, so that $r\geq 3$.
Then we have
\begin{align}
n^2\{2n\sqrt u\}
&=n^2\left(\sqrt{q^2+r}-q\right)\\
&=\frac{n^2r}{\sqrt{q^2+r}+q}\\
&\geq\frac{n^2r}{2\sqrt{q^2+r}}\\
&=\frac{nr}{4\sqrt u}\\
&\geq\frac 34
\end{align}
which proves $c\geq\frac 34$.
Finally, the maximality of $c=\frac 34$ follows by considering
\begin{align}
&n=12m^2+1&
&u=\left(6m^2+\frac{21m-5}4\right)^2+3\left(6m^2-\frac{11m+1}4\right)^2&
&q=288m^4-36m^3+48m^2-9m+2
\end{align}
for $m>0$ and $m\equiv 1\pmod 4$.
Then $4n^2u=q^2+3$ and $n^2\{2n\sqrt u\}=n^2\left(\sqrt{q^2+r}-q\right)\to (3/4)^+$ as $m\to+\infty$.