I have been asked
Integral solutions for $x_1 + x_2 - x_3 = n$ where $n \geq x_1 , x_2 , x_3 \geq 0$.
My approach:
We have, $0 \leq x_3\leq n$
$\Rightarrow n \leq x_1 + x_2 \leq 2n$
Further, by assuming some integer $t$, for which $x_1+x_2+t = n$, we can find the number of integers for $x_1$ and $x_2$ which should take care of the corresponding values of $x_3$.
However, when I solve by taking the case of $n = 20$, my answer does not match with the given, 651.
My book solution:
Number of solution $= \binom{n+1}{1} + \binom{n+2}{1}+\binom{n+3}{1} + \ldots + \binom{2n+1}{1} = \dfrac{(n+1)(3n+2)}{2}$
Any help would be appreciated