# How to calculate the number of integral points inside an area

How many integral solutions (x, y) exist satisfying the equation |y| + |x| ≤ 4

My approach:

I have made the graph after opening the the modulus in the above equation by making four equations.

Now it is a square with co-ordinates (4,0)(0,4)(-4,0)(0,-4).

Now I am stuck and don't know how to calculate integral solutions. It should be integral boundary points plus the integral points inside the area.

I know about the Pick's theorem in which we can find the integral points by using area and boundary points but I need to know how to calculate the integral points without it.

Answer is 41. In my book it is given as 9+2(7+5+3+1)=41 [which I am not getting]

Kindly help in solving the same.

-
Is it perhaps $\le 4$ instead of $=4$ ? – Dietrich Burde Aug 9 '13 at 18:10
Consider the ways to partition each of $0,1,2,3,4$ into sums of two positive integers... then consider that e.g. $a+b=c$ yields the solutions $(a,b),(a,-b),(-a,b),(-a,-b)$ – oldrinb Aug 9 '13 at 18:19

Clearly, $0\le|x|\le4\implies -4\le x\le 4$

If we need to find the number of integral points inside the area $|x|+|y|=4$

For $0\le a\le4,$ if $x= \pm a,|x|=a,|y|\le 4-a\iff -(4-a)\le x\le 4-a,$ so $x$ can assume $2(4-a)+1=9-2a$ values including $0$

If $a=0,a=-a,x$ can assume $2(4-0)+1=9$ values

So, the number integer points will be $9+2\sum_{1\le r\le 4}(9-2a),$ the multiplier $2$ is due to the fact that there is one $-a$ for each integer $a\in[1,4]$

-

We begin by counting the lattice points satisfying $x+y\leq4$ in the first quadrant. Collect the points lying on a line $x+y={\rm const.}$ into a group. In this way we obtain $1+2+\ldots+5={5\cdot 6\over 2}=15$ points. Now there are four such triangles, makes $60$ points. In this way we have counted the points $\ne(0,0)$ on the axes twice and the origin four times. Therefore we deduct $4\cdot4$ and $3$, leaving a final $41$.

-