<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] First, we transform the question $x+y+z=10$ for every positive integer to $a+b+c=7$ for every non-negative integer.
We look at a more general question of finding the number of solutions in non-negative integers to the equation $ a + b + c = n $. Since the value of $a$ can be any non-negative integer $0,1,2,3, \ldots, i , \ldots $ (see note below), we can represent this as the generating function $$ A(x) = 1 + x + x^2 + \cdots + x^i + \cdots . $$  We have the same generating function for the possible values of $b$ and $c$.  So our generating function for the number of solutions is $A(x) \times B(x) \times C(x) = [A(x)]^3$. However, finding this product could be extremely tedious.
We instead transform $ A(x) $ into the rational function $ \frac{1}{1-x} $, which we recognize from the sum of a geometric progression. Thus, we are interested in $ [A(x)]^3 = \frac{1}{(1-x)^3} $. This can be expanded using the negative binomial theorem, which gives
$$ \frac{1}{(1-x)^3} = {2 \choose 2} + {3 \choose 2} x + { 4 \choose 2 } x^2 + \cdots + { i+2 \choose 2 } x^ i + \cdots. $$
Therefore, the answer when $n=7 $ is given by $ { 9 \choose 2 } = 36$. This agrees with what we know from the stars and bars method. $_\square$
Note: It might be confusing why we allow $a$ to be any non-negative integer, even those which are larger than $n$, which clearly would not lead to a solution. Consider what would happen if we let $a = n+1$ or $a = n+2$ or any larger integer:  In the final product of polynomials, the exponents of these terms would be larger than $n,$ so they will not contribute to the term we want, which has exponent $n.$
</s>