i need to find the number of solutions to the equation $x_1+x_2+x_3=14$ in positive integers $x_1 \le 3, x_2 \le 4, x_3 \le 8$.
According to the lessons I think I need to introduce a new variable, $y$, but then when I do that I get a negative. $$ y_1=x_1−3 \\ y_2=x_2−4 \\ y_3=x_3−8 $$ i cant seem to find the problem why this is happening.. or what i need to do more thanks for any help and tips!
What you did is good, if you want to work with nonnegative values you might very well do:
$y_1=3-x_1,\quad y_2=4-x_2,\quad y_3=8-x_3$
So $y_1,y_2,y_3\ge 0$, and
$y_1+y_2+y_3=15-(x_1+x_2+x_3)=1$
Which happens only when two $y$'s are $0$ and the third is $1$