<s>[INST] The number of triangles with each side having integral length... The number of triangles with each side having integral length and the longest side is of 11 units is:-?   MY ATTEMPT:-   I applied following constraints: $12 \leq {a+b} \leq 22$ $a,b \geq 1$ I made different cases that a+b =12, a+b=13 and so on. My answer came was 160 but it is not the correct one.
 [/INST] Your conditions are not quite correct.  There is no stipulation on what $a + b$ is the only stipulation is that $11$ is the longest sides.
We need $a \le b \le 11$ so we don't count multiple instances the same and so that the maximum side(s) is $11$.
We need $a + b > 11$ or $a + b \ge 12$ to satisfy the (non-trivial) triangle inequality.
So the answer is $\sum\limits_{a=1}^{11}\sum\limits_{b=\max(a,12-a)}^{11}1$
$= \sum\limits_{a=1}^{11}[12- \max(a,12-a)]$
$= \sum\limits_{a=1}^{11}\min(12-a, a)$
$= 1 + 2 + 3 + 4+ 5 + 6 +5 + 4 + 3+2+1 = 21 + 15 = 36$.
I.E. $(a,b) = $
$(1,11)$
$(2,10)..(2, 11)$
$(3,9)....(3,11)$.
.....
$(5,7)....(5,11)$.
$(6,6)....(6,11)$.
$(7,7)....(7,11)$.
......
$(10,11)...(11,11)$
$(11,11)$
</s>