# system of equation with floor function

I am looking for an idea to solve below system of equation. $$\begin{cases}x+y+\lfloor x\rfloor+\lfloor y\rfloor = 5.1\\x^2+y^2+\lfloor x^2\rfloor+\lfloor y^2\rfloor = 50.93\end{cases}$$ My trial was about to plotting them together ,I think two solution exist here . I think $$(-1.7,4.8),(4.8,-1.7)$$ is solution with respect to graphical solving. https://www.desmos.com/calculator/9mc2c6y0qd
I am interested if there was an analytical method...I am thankful for your Idea(s) .

$remark:$I tried also to put $$x=n_x+p_x,y=n_y+p_y$$ but it comes more complicated .

• Notice the Desmos notice about "fine detail that has not fully been resolved." Actually I think it's worse than that: it's plotted points that don't satisfy the equations. But the graph does give you a rough idea of where to look. – David K Sep 27 '17 at 17:52
• @DavidK:yes it works in second equation . – Khosrotash Sep 27 '17 at 17:57
• How is this calculus? – mtheorylord Sep 27 '17 at 18:01
• @Khosrotash Right, I noticed an error in my arithmetic right after I wrote the wrong result. Sometimes you get lucky! – David K Sep 27 '17 at 18:07
• Look for solutions of the first equation when $x=0.05.$ Look for solutions of the second equation when $x=0.99$ or $x=1.41.$ – David K Sep 27 '17 at 18:11

We can find a range based on condition.

1. From the first equation, we have that: $$x+y + [x]+[y] = 5.1\\ 2(x+y) - (f_x+f_y) = 5.1$$ Based on the range of $f$ which lies in $[0,1)$, we can say that: $$x+y \in \left[\frac{5.1}{2}, \frac{7.1}{2}\right)$$

2. Similarly from second equation, one can deduce: $$x^2 + y^2 \in \left[\frac{50.93}{2}, \frac{52.93}{2}\right)$$

Basically the first condition gives two lines and second condition gives two circles. Solution lies in area trapped between these curves!

## Finding the solution

What I am saying is that you can find solution analytically. Consider the first area. You can find the coordinates of intersection of circle and straight line analytically. I am graphing it to show that the range is quite small: We are lucky that here, $y$ only lies in $(4,5)$ so that $[y] = 4$. But $x$ lies in $(-3,-1)$, so you must consider two intervals for fixing $[x]$.

1. $x\in (-3, -2)$. So here, $[x] = -3$. This gives us $x+y = 4.1$, which is not possible.

2. $x \in [-2,-1)$. So here, $[x] = -2$. This gives us $x+y = 3.1$, which is possible.

We have narrowed down to $[x] = -2$ and $[y] = 4$. Now we have more cases for $[x^2]$ and $[y^2]$! Using our conditions we get $1\le [x^2]\le 4$ and that $16 \le [y^2] \lt 25$

Using the second equation, you must have $[x^2] + [y^2] \in (24.465,25.465)$. Thus $[x^2] + [y^2] = 25$. From this we get only three possible pairs of $([x^2],[y^2])$, which are $(1,24), (2,23), (3,22)$

Thus we only deal with these three cases and you will be able to solve it analytically!

Also noting that the system is symmetric in $x,y$ so that we have an even number of roots.

I tried this : we have $$[x+y]=[x]+[y] \text{or }[x+y]=[x]+[y]+1$$ so ,if we take floor of the first equation $$x+y+[x]+[y]=5.1\\ [x+y]+[x]+[y]=5\\\begin{cases}[x]+[y]+[x]+[y]=5 & imposiible\\ [x]+[y]+1+[x]+[y]=5 \to & [x]+[y]=2\end{cases}$$ if we do the same for 2nd eq. we have $$\quad{[x^2+y^2+[x^2]+[y^2]]=[50.93]\\ [x^2+y^2]+[x^2]+[y^2]=50 \\ [x^2]+[y^2]-1+[x^2]+[y^2]=50 \text { not acceptable}\\ [x^2]+[y^2]+[x^2]+[y^2]=50\\ [x^2]+[y^2]=25 \to x^2+y^2=25.93 \text{ the only possibilities}\\}$$finally we have
If we say $s=x+y ,p=xy$
also from the first one :$x+y+[x]+[y]=5.1 ,[x]+[y]=2 \to x+y=3.1$ $$\quad{\begin{cases}x+y=3.1\\x^2+y^2=25.93\end{cases}\\\begin{cases}s=3.1\\s^2-2p=25.93\end{cases}\\z^2-3.1z-8.16=0 \\z=-1.7\\z=4.8 \\so \\(x,y)=(4.8,-1.7),(-1.7,4.8)}$$ am I right ?

• In the other case, shouldn't it be $[x+y]=[x]+[y]+1$? – jonsno Sep 28 '17 at 8:33
• Nice solution! Drastically simplifies the problem! – jonsno Sep 28 '17 at 8:34
• @samjoe :Tahnk you to find the mistake , I'll correct to progress. – Khosrotash Sep 28 '17 at 8:46