(a) To expand \((1 + a)^5\), use the binomial theorem:
\((1 + a)^5 = \sum_{k=0}^{5} \binom{5}{k} a^k\).
Calculate the terms up to \(a^3\):
\(\binom{5}{0} a^0 = 1\)
\(\binom{5}{1} a^1 = 5a\)
\(\binom{5}{2} a^2 = 10a^2\)
\(\binom{5}{3} a^3 = 10a^3\)
Thus, \((1 + a)^5 = 1 + 5a + 10a^2 + 10a^3 + \ldots\)
(b) To expand \([1 + (x + x^2)]^5\), substitute \(a = x + x^2\) into the expansion from part (a):
\(1 + 5(x + x^2) + 10(x + x^2)^2 + 10(x + x^2)^3 + \ldots\)
Calculate each term up to \(x^3\):
\(5(x + x^2) = 5x + 5x^2\)
\(10(x + x^2)^2 = 10(x^2 + 2x^3 + \ldots) = 10x^2 + 20x^3 + \ldots\)
\(10(x + x^2)^3 = 10(x^3 + \ldots) = 10x^3 + \ldots\)
Combine terms: \(1 + 5x + (5x^2 + 10x^2) + (20x^3 + 10x^3) + \ldots\)
\(= 1 + 5x + 15x^2 + 30x^3 + \ldots\)