Count the non-negative integral solutions of $x_1 + x_2 + x_3 + x_4 = 12$ with at least one $x_i\ge 5$.
I got really confused about that problem and really would like to know about methods to solve this.
I have tried to substitute the variables and the result for $7$ and then adding the $5$ later. I also thought about subtracting and using the pigeonhole principle.
For $x_1+x_2+x_3+x_4=12$ with integer $x_i\ge 0$ without other constraints we use stars and bars to get ${12+4-1\choose 4-1}=455$.
Then we subtract cases $(4, 4, 4, 0): 4, (4, 4, 3, 1): 12, (4, 4, 2, 2): 6, (4, 3, 3, 2): 12, (3, 3, 3, 3): 1$ where no $x_i\ge 5$.
In order not to enumerate the possibilities by hand, let $x_i'=4-x_i$ then $x_1+x_2+x_3+x_4=12$ becomes $x_1'+x_2'+x_3'+x_4'=4$ and we can use stars and bars again, getting ${4+4-1\choose 4-1}=35$ disallowed possibilities.
So the final answer is $${12+4-1\choose 4-1}-{4+4-1\choose 4-1}=455-35=420.$$