# Find the number of integer solutions of $|x|+|y| \le 10$

Find the solutions of $|x|+|y| \le 10$, where $x$ and $y$ are integers.

My solution:

$$|x|+|y|+z=10$$

Now the solutions if there were no absolute values is:

$$\binom{13-1}{10}=\frac{11*12}{2}=66$$

now subtract that once that have $0$ then multiply the others by $4$ and multiply that ones that only has $1$ zeroes by $2$.I get $221$ Am I right?

• Do you want the solutions, or the number of solutions? – Arthur Aug 4 '16 at 11:09
• @Arthur number of the solutions. – Taha Akbari Aug 4 '16 at 11:09
• i would start with $$x=-10,y=0$$ or $$x=-9,y=-1$$ or $$x=-9,y=0$$ or $$x=-9,y=1$$ and so on – Dr. Sonnhard Graubner Aug 4 '16 at 11:10
• are you interested on all solutions? – Dr. Sonnhard Graubner Aug 4 '16 at 11:14
• There is a nice graphical approach. $|x| + |y| \le 10$ describes the interior of a square with vertices $(0,\pm10), (\pm10,0)$. Simply shade in the integer points $(x,y)$ lying within this square. – Mr. Chip Aug 4 '16 at 11:15

The number of integer solutions of $|x|+|y|\le n$ is $$1+4n+4\sum_{k=1}^{n-1} k=2n(n+1)+1.$$ $1$ is for the origin, $4n$ is for the points on the 4 semi-axis, and finally $4\sum_{k=1}^{n-1} k$ counts the points in the 4 right triangles inside the 4 quadrants.
$$A=I+{B\over2}-1$$
where $I$ is the number of Interior points with integer coordinates and $B$ is the number of Boundary points with integer coordinates. For the given problem the polygon is a square with diagonals of length $20$, so $A=200$. The bounday points satisfy $|x|+|y|=10$, so it's easy to see that $B=40$, hence $I=200-{40\over2}+1=181$. The number we want is
$$I+B=181+40=221$$