## Integral Points

1. The lines y=3x and x+y=40 and the x axis bound a triangular area . Find the total number of points on or inside this triangle with integral coordinates? Can anyone, give the complete solution of this problem and point out a general way(if any), for solving these type of questions.

## Let me give a try

First lets try to find out all the three vertices of the triangle 1. (0 ,0) let it be O 2. Intersection of x axis and x + y = 40 is (0, 40) let this point be A. 3.Intersection of y=3x axis and x + y = 40 is (10, 30) let this point be B. We have to find how many integral points are with in these three lines. Lets start from x axis Along X axis i.e when x =0 we have 40 points (0,0), (0,1), . . . . .(0,40) when x =1 along y =3x we have y=3 and that’s the start point and end point is on line x + y =40 then when y =39. So the total number of points from 3 to 39 is 37. When x =2 , y= 6 start point and y = 38 is end point so total number of points 33. When x =3 , y= 9 start point and y = 37 is end point so total number of points 29. Like so When x= 10, y =30 start point and y=30 is end point so total number of points 1. So sum of all the possible points= 40 + 37 + 33+ 29 + …1 = 40 + 10/2(2 x 1 + 9 x 4 ) = 40 + 38 x 5 = 230 Hopefully I have not done any calculation mistake.