Say we have something like $$ (x+2+y)^{23} $$
How does one go about finding the co efficient of say $$ x^6y^7 $$
Say we have something like $$ (x+2+y)^{23} $$
How does one go about finding the co efficient of say $$ x^6y^7 $$
Consider the entire expansion $(x+2+y)(x+2+y) \ldots (x+2+y)$. You want the term $x^6 y^7$, which means that you have to pick 6 $x$'s and 7 $y$'s. Thus, you need to pick $23-6-7$ 2's.
Hence, the term is given by
$$ {23 \choose 6} {23-6 \choose 7} { 23-6-7 \choose 23-6-7} \times x^6 \times y^7 \times (2)^{23-6-7}$$
It get's slightly more interesting when the base has multiple powers of $x$. You can try this problem of determining the coefficient of $x^{16}$ in $ (x^3+x+1)^8$.
You can also use the multinomial theorem. Your problem is then equivalent to compute
$$\binom{23}{6,10,7}2^{10}x^6y^7=\dfrac{23!}{6!\ 10!\ 7!}2^{10}x^6y^7=2010334470144 x^6 y^7$$
You can also use the binomial theorem twice over:
$$ (x+y+2)^{23} = \sum_{k=0}^{23} \binom{23}{k} 2^{23-k} (x+y)^k$$
$$ = \sum_{k=0}^{23} \binom{23}{k} 2^{23-k} \sum_{\ell=0}^k \binom{k}{\ell} x^{\ell} y^{k-\ell}$$
Seen this way, $k$ represents the net order of the monomial of interest, which in this case is 13. It then follows that $\ell = 6$ and the coefficient of $x^6 y^7$ is
$$2^{10} \binom{23}{13} \binom{13}{6}$$
Related techniques: (I), (II). We will use the Taylor series in two variables
$$ \sum_{k=0}^{\infty}\sum_{m=0}^{\infty}\frac{x^m y^k}{m! k!}\frac{\partial^{m+k}}{\partial x^m \partial y^k }f(x,y)|_{x=0,y=0} ,$$
to get the desired result. In your case, we are looking for the coefficient of $x^6 y^7$, so we need to find
$$ \frac{1}{6!\,7!}\frac{\partial^{13}}{\partial x^6 \partial y^7 }(x+y+2)^{23}|_{x=0,y=0} = 2010334470144 $$
Note: We used the formula
$$ D^n x^m = \frac{\Gamma(m+1)}{\Gamma(m-n+1)}x^{m-n} $$
to find
$$ \frac{\partial^{13}}{\partial x^6 \partial y^7 }(x+y+2)^{23}. $$
$$ \frac{\partial^{6}}{\partial x^6 }\frac{\Gamma(23+1)}{\Gamma(23-7+1)}(x+y+2)^{16} = \frac{\Gamma(23+1)}{\Gamma(23-7+1)}\frac{\Gamma(16+1)}{\Gamma(16-6+1)}(x+y+2)^{10} $$
$$ = \frac{(23)!}{(16)!}\frac{(16)!}{(10)!}(x+y+2)^{10} .$$