[Math] way to find the specific variable coefficient in a binomial expansion

algebra-precalculusbinomial-coefficientslinear algebra

If a problem asks to find the coefficient of a variable, say, $x^2$, in a large binomial expansion, is there a way to solve without doing the whole expansion (I do it with Pascal's Triangle / Binomial Theorem).
For example, in this problem

The coefficient of $x^2$ in the expansion of $(\frac{1}{x} + 5x)^8$ is equal to the coefficient of $x^4$ in the expansion of $(a+5x)^7$, $a$ is a real number. Find the value of $a$.

I expand it out and get different answers on different tries. Not sure what's the best method to proceed. If anyone could help I would appreciate it so much!

Best Answer

The binomial theorem tells you that $$ \left(\frac1x + 5x\right)^8 = \sum_{i = 0}^8\binom8i\frac{1}{x^i}(5x)^{8-i}\\ (a + 5x)^7 = \sum_{j = 0}^7\binom7ja^j(5x)^{7-j} $$ Since we're looking for the $x^2$ term in the first sum, that happens only when $i = 3$. For the second sum we're interested in the $x^4$ term which only is when $j = 3$. We get $$ \binom83\frac1{x^3}(5x)^5 = 56\cdot 5^5x^2\\ \binom73a^3\cdot(5x)^4 = 35a^3\cdot 5^4x^4 $$ Now equate the two coefficients, and solve for $a$.