To find the coefficient of \(x^2\) in the expansion of \((1 + x^2) \left( \frac{x}{2} - \frac{4}{x} \right)^6\), we first expand \(\left( \frac{x}{2} - \frac{4}{x} \right)^6\) using the binomial theorem.
The general term in the expansion is given by:
\(\binom{6}{k} \left( \frac{x}{2} \right)^{6-k} \left( -\frac{4}{x} \right)^k\)
Simplifying, we have:
\(\binom{6}{k} \left( \frac{x^{6-k}}{2^{6-k}} \right) \left( \frac{(-4)^k}{x^k} \right) = \binom{6}{k} \frac{(-4)^k}{2^{6-k}} x^{6-2k}\)
We need the term where the power of \(x\) is zero (constant term) and the term where the power of \(x\) is 2.
For the constant term \(x^0\):
\(6 - 2k = 0 \Rightarrow k = 3\)
Substitute \(k = 3\):
\(\binom{6}{3} \frac{(-4)^3}{2^3} = 20 \times \frac{-64}{8} = -160\)
For the term in \(x^2\):
\(6 - 2k = 2 \Rightarrow k = 2\)
Substitute \(k = 2\):
\(\binom{6}{2} \frac{(-4)^2}{2^4} = 15 \times \frac{16}{16} = 15\)
Now consider the expansion of \((1 + x^2)\):
\(1 + x^2\)
The coefficient of \(x^2\) in the product is:
\(1 \times 15 + x^2 \times (-160) = 15 - 160 = -145\)
Thus, the coefficient of \(x^2\) is \(-145\).