What conditions must the coefficients $p, q$ satisfy so that the extreme values of the function $x^{3}+p x+q$ have opposite signs?
I. solution. The function can only have an extremum where its derivative vanishes:

$$
f^{\prime}(x)=3 x^{2}+p=0, \quad x^{2}=-\frac{p}{3}
$$

that is, at the points

$$
x_{1,2}= \pm \sqrt{-\frac{p}{3}}
$$

These are real and distinct if and only if

$$
p<0
$$

The function values at these points are

$$
f\left(x_{1,2}\right)=-\frac{2}{3 \sqrt{3}}(-p)^{3 / 2} \pm q
$$

If $f\left(x_{1}\right)$ and $f\left(x_{2}\right)$ have opposite signs, then

$$
\left|q\right|<\frac{2}{3 \sqrt{3}}(-p)^{3 / 2}
$$

If $f\left(x_{1}\right)$ and $f\left(x_{2}\right)$ have the same sign, then

$$
\left|q\right|>\frac{2}{3 \sqrt{3}}(-p)^{3 / 2}
$$

If $f\left(x_{1}\right)=0$ or $f\left(x_{2}\right)=0$, then

$$
\left|q\right|=\frac{2}{3 \sqrt{3}}(-p)^{3 / 2}
$$

The condition $f\left(x_{1}\right)>0$ and $f\left(x_{2}\right)<0$ (or vice versa) means that the extrema have opposite signs. The condition $f\left(x_{1}\right)>0$ and $f\left(x_{2}\right)>0$ (or both negative) means that the extrema have the same sign. The condition $f\left(x_{1}\right)=0$ or $f\left(x_{2}\right)=0$ means that one of the extrema is 0, the curve touches the $x$-axis at this point, or that the two extrema have the same sign (both positive or both negative). The graph outlines the behavior of the curve for $x_{1} \neq x_{2}$, according to the sign of $D$.

![](https://cdn.mathpix.com/cropped/2024_05_02_585a6249dc1a63c27580g-1.jpg?height=290&width=209&top_left_y=2343&top_left_x=470)

$0=0$

![](https://cdn.mathpix.com/cropped/2024_05_02_585a6249dc1a63c27580g-1.jpg?height=290&width=485&top_left_y=2343&top_left_x=1145)[^0]

II. solution. The image of the function $f(x)$ can be obtained by translating the image of the function

$$
f_{0}(x)=x^{3}+p x
$$

by $q$ in the direction of the $y$-axis, so we first examine the simpler function $f_{0}(x)$. Since $f_{0}(-x)=-f_{0}(x)$, i.e., the function is an odd function, it suffices to examine positive $x$ values. We distinguish three cases:

1. If $p>0$, then $f_{0}$ is the sum of two monotonically increasing functions, so $f_{0}$ is also monotonically increasing, and thus has no extrema.
2. If $p=0$, then $f_{0}=x^{3}$, which is again monotonically increasing.
3. If $p<0$, then $f_{0}$ can be factored as

$$
f_{0}(x)=x(x+a)(x-a)
$$

where $a=\sqrt{-p}$. Thus, $f_{0}$ is negative for $0<x<a$ and positive for $x>a$. For $x>a$, all three factors are positive and monotonically increasing, so $f_{0}$ is also increasing, which means an extremum can only occur at $0<x<a$. The derivative of $f_{0}$ is

$$
f_{0}^{\prime}(x)=3 x^{2}+p
$$

which is negative for $0<x<a$ (since $p<0$), so $f_{0}$ is decreasing in this interval. The critical point is at

$$
x=\frac{a}{\sqrt{3}}
$$

(ensuring $0<x<a$), so $f_{0}(x)$ has a minimum at $x=a / \sqrt{3}$, and the value of the function at this point is

$$
\min f_{0}=f_{0}\left(\frac{a}{\sqrt{3}}\right)=\frac{a}{\sqrt{3}}\left(\frac{a^{2}}{3}-a^{2}\right)=-\frac{2}{3 \sqrt{3}} a^{3}=-\frac{2}{3 \sqrt{3}}(-p)^{3 / 2}
$$

Since $f_{0}$ is odd, the local maximum can also be determined:

$$
\max f_{0}=\frac{2}{3 \sqrt{3}}(-p)^{3 / 2}
$$

Returning to the function $f(x)$, it will only have extrema for negative $p$, and these extrema will have different signs if the value of $q$ lies between $\max f_{0}$ and $\min f_{0}$, i.e.,

$$
|q|<\max f_{0}=\frac{2}{3 \sqrt{3}}(-p)^{3 / 2}, \quad q^{2}<-\frac{4}{27} p^{3}, \quad\left(\frac{q}{2}\right)^{2}+\left(\frac{p}{3}\right)^{3}<0
$$

which can only be satisfied for negative $p$, this is the necessary and sufficient condition for the extrema of the function $f(x)$ to have different signs.


[^0]:    ${ }^{1}$ For a slightly different form, see Hack Frigyes: Function Tables, Mathematical Relations, Tankönyvkiadó, Budapest, 1967, pp. 61-62.