Áp dụng công thức khai triển \((a+b)^5 = a^5 + 5a^4b + 10a^3b^2 + 10a^2b^3 + 5ab^4 + b^5\), ta được:
\((3 + \sqrt{2})^5 = 3^5 + 5 \cdot 3^4 \cdot \sqrt{2} + 10 \cdot 3^3 \cdot (\sqrt{2})^2 + 10 \cdot 3^2 \cdot (\sqrt{2})^3 + 5 \cdot 3 \cdot (\sqrt{2})^4 + (\sqrt{2})^5\)
\((3 - \sqrt{2})^5 = 3^5 - 5 \cdot 3^4 \cdot \sqrt{2} + 10 \cdot 3^3 \cdot (\sqrt{2})^2 - 10 \cdot 3^2 \cdot (\sqrt{2})^3 + 5 \cdot 3 \cdot (\sqrt{2})^4 - (\sqrt{2})^5\)
Khi lấy hiệu, các số hạng chứa lũy thừa chẵn của \(\sqrt{2}\) triệt tiêu, ta còn:
\((3+\sqrt{2})^5 - (3-\sqrt{2})^5 = 2\left[5 \cdot 3^4 \cdot \sqrt{2} + 10 \cdot 3^2 \cdot (\sqrt{2})^3 + (\sqrt{2})^5\right]\)
Tính từng lũy thừa của \(\sqrt{2}\):
\((\sqrt{2})^3 = 2\sqrt{2}\), \((\sqrt{2})^5 = 4\sqrt{2}\)
Thay vào:
\(= 2\left[5 \cdot 81 \cdot \sqrt{2} + 10 \cdot 9 \cdot 2\sqrt{2} + 4\sqrt{2}\right]\)
\(= 2\left[405\sqrt{2} + 180\sqrt{2} + 4\sqrt{2}\right]\)
\(= 2 \cdot 589\sqrt{2}\)
\(= 1178\sqrt{2}\)
Vậy \((3+\sqrt{2})^5 - (3-\sqrt{2})^5 = 0 + 1178\sqrt{2}\), tức là \(a = 0\), \(b = 1178\).