<s>[INST] Generating Functions in Discrete Math a)Find the coefficient of $x^3y^4$ in $(2x + 5y)^7$. b) Find the coefficient of $x^5$ in $(3x -1)(2x +1)^8$.
I know this has to do with generating functions , but i'm not sure how to start with this problem in order to find the coefficient of part a) and b)
 [/INST] For (b), you have $(3x - 1)(2x + 1)^{8}$. So consider $(2x+1)^{8}$. You are interested in the coefficients of $x^{4}$ and $x^{5}$ in that term. When you multiply by $(3x-1)$ you can form $x^{5}$ by $3x * kx^{4}$, and $x^{5}$ is held constant by multiplying with $-1$. So $(2x + 1)^{8}$ has coefficient of $x^{5}$ as $\binom{8}{5} (2x)^{5}$ and coefficient of $x^{4}$ as $\binom{8}{4}$.
Now consider $3 * \binom{8}{4} x^{4} * x - \binom{8}{5} (2x)^{5}$.
</s>