Graphing sum of floor functions

50 Views Asked by At

Find the area enclosed by the curve $[x+y]+[x-y]=5, x \geq y, \forall x,y \geq 0$. [.] represents the greatest integer function.

I first noted that these represent a pair of perpendicular lines, so I thought of rotating these lines to make them x and y axis. However we would require a $\sqrt(2)$ term in the denominator (inside floor) for each of them so this won't help.

I tried case work, $x+y \in [5,6)$ and $x-y \in [0,1)$ etc. but this method became very lengthy and also I couldn't get this graph by this way.

Desmos could get the graph(and of course the area part is trivial to calculate from it) but I still don't know how we can obtain that graph systematically.

1

There are 1 best solutions below

0
On BEST ANSWER

You have the curve

$$\lfloor x + y \rfloor + \lfloor x - y \rfloor = 5, \; x \geq y, \; \forall \, x,y \geq 0 \tag{1}\label{eq1A}$$

where I've used the $\lfloor$ and $\rfloor$ symbols to represent the greatest integer function.

First, let

$$x = m + r_1, \; m \in \mathbb{Z}, \; r_1 \in \mathbb{R}, \; 0 \le r_1 \lt 1 \tag{2}\label{eq2A}$$

$$y = n + r_2, \; n \in \mathbb{Z}, \; r_2 \in \mathbb{R}, \; 0 \le r_2 \lt 1 \tag{3}\label{eq3A}$$

Substituting \eqref{eq2A} and \eqref{eq3A} into \eqref{eq1A} gives

$$\begin{equation}\begin{aligned} 5 & = \lfloor m + r_1 + n + r_2 \rfloor + \lfloor m + r_1 - n - r_2 \rfloor \\ & = \lfloor (m + n) + (r_1 + r_2) \rfloor + \lfloor (m - n) + (r_1 - r_2) \rfloor \\ & = m + n + \lfloor r_1 + r_2 \rfloor + m - n + \lfloor r_1 - r_2 \rfloor \\ & = 2m + \lfloor r_1 + r_2 \rfloor + \lfloor r_1 - r_2 \rfloor \end{aligned}\end{equation}\tag{4}\label{eq4A}$$

If you assign

$$a = \lfloor r_1 + r_2 \rfloor \tag{5}\label{eq5A}$$

$$b = \lfloor r_1 - r_2 \rfloor \tag{6}\label{eq6A}$$

you have that $a = 0$ or $a = 1$ and $b = 0$ or $b = -1$, so $a + b$ can only be $-1$, $0$ or $1$. Since $2m$ is an even integer, this means that it must be $4$ or $6$. Thus, there are $2$ basic cases to consider

$$m = 2, \; a = \lfloor r_1 + r_2 \rfloor = 1, \; b = \lfloor r_1 - r_2 \rfloor = 0 \tag{7}\label{eq7A}$$

$$m = 3, \; a = \lfloor r_1 + r_2 \rfloor = 0, \; b = \lfloor r_1 - r_2 \rfloor = -1 \tag{8}\label{eq8A}$$

For \eqref{eq7A} to hold, you have $2$ required inequalities of

$$r_1 + r_2 \ge 1 \tag{9}\label{eq9A}$$

$$r_1 - r_2 \ge 0 \tag{10}\label{eq10A}$$

Adding \eqref{eq9A} and \eqref{eq10A} gives

$$2r_1 \ge 1 \iff r_1 \ge 0.5 \tag{11}\label{eq11A}$$

Also, rearranging \eqref{eq9A} and \eqref{eq10A} to get the range of $r_2$ in terms of $r_1$ gives

$$1 - r_1 \le r_2 \le r_1 \tag{12}\label{eq12A}$$

You can do something similar with the conditions on $r_1$ and $r_2$ for the case given by \eqref{eq8A} to hold.