Prove that the number of triangles with sides in integral centimetre and greatest side=$2m+1$cm is $(m+1)^2$.
My try:- Let sides of triangle be $x,y,2m+1$
Case-1:- triangle is equilateral .
No. of triangles=1
Case-2:- triangle is isosceles and x=y
As $x+y>2m+1$ so $x>=m+1$. But $x<2m+1$ No. of triangles = $m$
Case-3:-triangle is isosceles and $x=2m+1$
$2(2m+1)>y$ and $y<2m+1$. No. Of triangles =$2m$
Case-4:- scalene triangle
$x+y>2m+1$ and $x-y<2m+1$ I am unable to proceed further. Please help me
The number of arbitrary, non-degenerated triangles with sides $1\le x\le y\le 2m+1$ in $\Bbb Z$ is computed as follows, where we split the counting w.r.t. $y$, the length of the side "on the second place", which must be at least $m+1$, and then we have a clear range for $x$, and now the computation in slow motion: $$ \begin{aligned} \sum_{1\le x\le y\le 2m+1}1 &= \sum_{m+1\le y\le 2m+1} \sum_{2m+2-y\le x\le y}1 \\ &= \sum_{m+1\le y\le 2m+1} (2y-(2m+2)+1) \\ &= \left(2\sum_{m+1\le y\le 2m+1}y\right) -((2m+2)-1)(m+1) \\ &= \left(2\sum_{1\le y\le 2m+1}y\right) - \left(2\sum_{1\le y\le m}y\right) - (2m+1)(m+1) \\ &= (2m+1)(2m+2) - m(m+1) - (2m+1)(m+1) \\ %&= %2(2m+1)(m+1) - m(m+1) - (2m+1)(m+1) %\\ &= (m+1)\Big[ \ 4m+2 - m - 2m-1\ \Big] \\ &=(m+1)^2\ . \end{aligned} $$