238. a) Factorize the expression

$$
a^{3}+b^{3}+c^{3}-3 a b c
$$

b) Using the result from part a), find the general formula for solving the cubic equation

$$
x^{3}+p x+q=0
$$

$^{1}$ François Viète (1540-1603) - a prominent French mathematician, one of the creators of modern algebraic symbolism (and thus algebra).

Note. Let us note that the result of this problem allows solving any cubic equation. Indeed, let

$$
x^{3}+A x^{2}+B x+C=0
$$

be some cubic equation (the coefficient of $x^{3}$ can always be considered equal to 1, as otherwise we can divide the entire equation by this coefficient). Make the substitution: $x=y+c$. Then we get:

$$
y^{3}+3 c y^{2}+3 c^{2} y+c^{3}+A\left(y^{2}+2 c y+c^{2}\right)+B(y+c)+C=0,
$$

![](https://cdn.mathpix.com/cropped/2024_05_21_b937612abb2773f7abffg-051.jpg?height=32&width=58&top_left_y=439&top_left_x=197)

![](https://cdn.mathpix.com/cropped/2024_05_21_b937612abb2773f7abffg-051.jpg?height=64&width=915&top_left_y=454&top_left_x=225)

From this, it is clear that by setting $c=-\frac{A}{3}$ (i.e., $x=y-\frac{A}{3}$), we arrive at the equation

$$
y^{3}+\left(\frac{3 A^{2}}{9}-\frac{2 A^{2}}{3}+B\right) y+\left(-\frac{A^{3}}{27}+\frac{A^{3}}{9}-\frac{A B}{3}+C\right)=0
$$

which has the same form as the equation given in the problem:

$$
y^{3}+p y+q=0, \text { where } p=-\frac{A^{2}}{3}+B, q=\frac{2 A^{3}}{27}-\frac{A B}{3}+C
$$
238. a) First solution. We have:

$a^{3}+b^{3}+c^{3}-3 a b c=$

$$
\begin{aligned}
& =a^{3}+3 a b(a+b)+b^{3}+c^{3}-3 a b c-3 a b(a+b)= \\
& =a^{3}+3 a^{2} b+3 a b^{2}+b^{3}+c^{3}-3 a b(c+a+b)= \\
& =(a+b)^{3}+c^{3}-3 a b(a+b+c)= \\
& =[(a+b)+c]\left[(a+b)^{2}-(a+b) c+c^{2}\right]-3 a b(a+b+c)= \\
& =(a+b+c)\left[(a+b)^{2}-(a+b) c+c^{2}-3 a b\right]= \\
& =(a+b+c)\left(a^{2}+2 a b+b^{2}-a c-b c+c^{2}-3 a b\right)= \\
& =(a+b+c)\left(a^{2}+b^{2}+c^{2}-a b-a c-b c\right)
\end{aligned}
$$

Second solution. Replace the letter $a$ with $x$ in the problem notation and set $x+b+c=0$; transforming $(x+b+c)^{3}$, we get that $x^{3}+b^{3}+c^{3}-3 x b c=0$ if $x+b+c=0$. Therefore, the equation $x^{3}-3 b c x+b^{3}+c^{3}=0$ has a root $x=-b-c$, and the polynomial $x^{3}-3 b c x+b^{3}+c^{3}$ is divisible by $x-(-b-c)=x+b+c$, which means $a^{3}+b^{3}+c^{3}-3 a b c$ is divisible by $a+b+c$. Performing the division directly (it is convenient to consider the polynomials $a^{3}-3 a b c+b^{3}+c^{3}$ and $a+b+c$ arranged by the powers of the letter $a$), we arrive at the same result:

$$
a^{3}+b^{3}+c^{3}-3 a b c=(a+b+c)\left(a^{2}+b^{2}+c^{2}-a b-a c-b c\right) .
$$

b) Choose two numbers $a$ and $b$ such that we have the equality

$$
x^{3}+p x+q=x^{3}+a^{3}+b^{3}-3 a b x
$$

For this, it is sufficient that $a^{3}+b^{3}=q, a b=-\frac{p}{3}$; from this system of two equations with two unknowns, it is not difficult to determine $a$ and $b$. We have $a^{3}+b^{3}=q \cdot a^{3} b^{3}=-\frac{p^{3}}{27}$; from this it follows that $a^{3}$ and $b^{3}$ are the roots of the quadratic equation $z^{2}-q z-\frac{p^{3}}{27}=0$ and, consequently,

$$
a=\sqrt[3]{\frac{q}{2}+\sqrt{\frac{q^{2}}{4}+\frac{p^{3}}{27}}}, b=\sqrt[3]{\frac{q}{2}-\sqrt{\frac{q^{2}}{2}+\frac{p^{3}}{27}}}.
$$

Now, by the result of part a), we have

$$
\begin{aligned}
x^{3}+p x+q=x^{3}+a^{3}+b^{3}-3 a b x & \\
\quad & (a+b+x)\left(a^{2}+b^{2}+x^{2}-a b-a x-b x\right)
\end{aligned}
$$

Therefore, the solution of our cubic equation reduces to solving the linear equation:

$$
a+b+x=0
$$

from which we have:

$$
x_{1}=-a-b
$$

or

$$
x_{1}=-\sqrt[3]{\frac{q}{2}+\sqrt{\frac{q^{2}}{4}+\frac{p^{3}}{27}}}-\sqrt[3]{\frac{q}{2}-\sqrt{\frac{q^{2}}{4}+\frac{p^{3}}{27}}}
$$

and the quadratic equation

$$
x^{2}-(a+b) x+a^{2}+b^{2}-a b=0
$$

1) The numbers $a$ and $b$, determined by the formulas (*), are real if $\frac{q^{2}}{4}+\frac{p^{3}}{27} \geqslant 0$. If $\frac{q^{2}}{4}+\frac{p^{3}}{27}<0$, then under the cube root in the formulas (*) there will be complex numbers. In this case, the numbers $a$ and $b$ are also complex; they can be found, for example, using the formula for the $n$-th root of a complex number. In this case, $a$ can be taken as any of the three cube roots of the complex number $\frac{q}{2}+\sqrt{\frac{q^{2}}{4}+\frac{p^{3}}{27}}$; then $b$ is determined from the relation $a b=-\frac{p}{3}$.
From this it follows

$$
x_{2}=\frac{a+b}{2}+\frac{(a-b) \sqrt{3}}{2} i, x_{3}=\frac{a+b}{2}-\frac{(a-b) \sqrt{3}}{2} i
$$

where $a$ and $b$ are determined by the formulas (*).