3. Calculate $\sin ^{3} x+\cos ^{3} x$ if $\sin x+\cos x=a$.
Solution. We will write the expression $\sin ^{3} x+\cos ^{3} x$ in the form:

$$
\begin{aligned}
\sin ^{3} x+\cos ^{3} x & =(\sin x+\cos x)^{3}-3 \sin ^{2} x \cos x-3 \sin x \cos ^{2} x \\
& =a^{3}-3(\sin x+\cos x) \sin x \cos x \\
& =a^{3}-3 a \sin x \cos x
\end{aligned}
$$

By squaring the equation $\sin x+\cos x=a$, we get

$$
\begin{gathered}
\sin ^{2} x+\cos ^{2} x+2 \sin x \cos x=a^{2} \\
1+2 \sin x \cos x=a^{2} \\
\sin x \cos x=\frac{a^{2}-1}{2}
\end{gathered}
$$

In the end, we have

$$
\sin ^{3} x+\cos ^{3} x=a^{3}-3 a \cdot \frac{a^{2}-1}{2}=\frac{a}{2}\left(3-a^{2}\right)
$$