(i) To find the coefficient of \(x^2\) in \(\left( 2x - \frac{1}{2x} \right)^6\), we use the binomial expansion:
The general term is \(\binom{6}{r} (2x)^{6-r} \left(-\frac{1}{2x}\right)^r\).
We need \((6-r) - r = 2\), which gives \(6 - 2r = 2\), so \(r = 2\).
The term is \(\binom{6}{2} (2x)^4 \left(-\frac{1}{2x}\right)^2\).
Calculating, \(\binom{6}{2} = 15\), \((2x)^4 = 16x^4\), and \(\left(-\frac{1}{2x}\right)^2 = \frac{1}{4x^2}\).
The coefficient of \(x^2\) is \(15 \times 16 \times \frac{1}{4} = 60\).
(ii) For \((1 + x^2) \left( 2x - \frac{1}{2x} \right)^6\), we consider two terms:
1. The constant term from \(\left( 2x - \frac{1}{2x} \right)^6\) is \(20 \times x^3 \times \left(-\frac{1}{2x}\right)^3 = 20 \times 8x^3 \times \left(-\frac{1}{8x^3}\right) = 20\).
2. The \(x^2\) term from \((1 + x^2)\) is \(60\) from part (i).
The coefficient of \(x^2\) is \(60 - 20 = 40\).