5. Solve the pair of simultaneous equations
$(a+b)\left(a^{2}-b^{2}\right)=4$ and
$$
(a-b)\left(a^{2}+b^{2}\right)=\frac{5}{2} \text {. }
$$
Solution
Since $a^{2}-b^{2}=(a-b)(a+b)$, we may write the first equation as $(a+b)^{2}(a-b)=4$.
Note that $a-b \neq 0$, since this would make the left-hand side of both equations zero, which is false. Hence we can divide the first equation by the second and cancel the term $a-b$ to produce
$$
\frac{(a+b)^{2}}{a^{2}+b^{2}}=\frac{8}{5} .
$$

Multiplying each side by $5\left(a^{2}+b^{2}\right)$, we get
$$
5\left((a+b)^{2}\right)=8\left(a^{2}+b^{2}\right) .
$$

When we multiply this out and collect like terms, we obtain
$$
\begin{aligned}
0 & =3 a^{2}-10 a b+3 b^{2} \\
& =(3 a-b)(a-3 b),
\end{aligned}
$$
so either $a=3 b$ or $b=3 a$.
We substitute each of these in turn back into the first equation.
$$
a=3 b
$$

Then $4 b \times 8 b^{2}=4$, so that $b=\frac{1}{2}$ and $a=\frac{3}{2}$.
$$
b=3 a
$$

Then $4 a \times\left(-8 a^{2}\right)=4$, so that $a=-\frac{1}{2}$ and $b=-\frac{3}{2}$.
Hence we have two solutions $(a, b)=\left(\frac{3}{2}, \frac{1}{2}\right)$ or $(a, b)=\left(-\frac{1}{2},-\frac{3}{2}\right)$. These solutions should be checked by substituting back into the second equation.