<s>[INST] Different solutions of $x+y+z=10$ where $x$, $y$, $z$ are all positive integers and $x, y, z \leq 10$ The number of solutions to the equation $x+y+z=10$ where $x,y,z$ are positive integers, is given by ${k−1 \choose n−1}$, where in this case $k=10,n=3$, giving us ${9 \choose 2} = 36$ 
Now we have
$x + y + z = 10$   with   $x, y, z \leq 10$    (where $x,y,z$ are positive integers and can be the same)
What are the different methods by which we can solve this?
 [/INST] Following up on Trismegistos' idea of using generating functions: note that limiting the values to 10 really makes no difference, each variable can at most take the value 8 (two at 1, other one is 8). But if there is no limit, we can just write:
\begin{align}
[z^{10}] (z + z^2 + \cdots)^3
  &= [z^{10}] z^3 (1 + z + z^2 + \cdots)^3 \\
  &= [z^7] (1 - z)^{-3} \\
  &= (-1)^3 \binom{-3}{7} \\
  &= 36
\end{align} 
</s>