Task B-1.1. Factorize the following expression into factors that cannot be further factorized

$$
x\left(x^{2}-2\right)+4-\frac{1}{2}(x+2)^{2}
$$
## Solution.

$$
\begin{aligned}
x\left(x^{2}-2\right)+4- & \frac{1}{2}(x+2)^{2}=x^{3}-2 x+4-\frac{1}{2} x^{2}-2 x-2 \\
= & x^{3}-4 x-\frac{1}{2} x^{2}+2 \\
= & x\left(x^{2}-4\right)-\frac{1}{2}\left(x^{2}-4\right) \\
= & \left(x^{2}-4\right)\left(x-\frac{1}{2}\right) \\
= & (x-2)(x+2)\left(x-\frac{1}{2}\right) \\
& \frac{1}{2}(x-2)(x+2)(2 x-1)
\end{aligned}
$$