3. Determine all real numbers $p$ for which the equation

$$
(x-1)^{2}=3|x|-p x
$$

has exactly three distinct solutions in the set of real numbers.
3. Although the given problem can be solved by a vivid geometric consideration about the relative position of the parabola $y=(x-1)^{2}$ and the broken line $y=3|x|-p x$, we will first prefer a purely algebraic approach.

The given equation clearly has no solution $x=0$. After removing the absolute value and a simple rearrangement, we get the equations

$$
\begin{array}{ll}
x^{2}+(p+1) x+1=0 & \text { for } x<0, \\
x^{2}+(p-5) x+1=0 & \text { for } x>0.
\end{array}
$$

Since each quadratic equation has at most two different roots, we are looking for all numbers $p$ for which one of the equations (1), (2) has one root and the other has two different roots (and always of the prescribed signs). Note that for each $q \in \mathbb{R}$, the real roots $x_{1,2}$ of the equation $x^{2}+q x+1=0$ (if they exist at all) have the same sign, which is opposite to the sign of the number $q$; indeed, $x_{1} x_{2}=1$ and $x_{1}+x_{2}=-q$. For equations (1), (2), we first get the conditions

$$
p+1>0 \quad \text { and } \quad p-5<0.
$$

Thus, we need to find $p$ such that either $D_{1}=0$ and $D_{2}>0$, or $D_{1}>0$ and $D_{2}=0$. The equality $D_{1}=0$ holds only for $p \in\{-3,1\}$, and the equality $D_{2}=0$ only for $p \in\{3,7\}$. Of these four values, only the numbers $p=1$ and $p=3$ lie in the interval $(-1,5)$, and for $p=1$ we get $D_{2}=12>0$, and for $p=3$ we get $D_{1}=12>0$.

Answer. The sought values are $p=1$ and $p=3$.

Alternative solution. The graph of the function $y=(x-1)^{2}$ is a parabola $\mathrm{s}$ with vertex $V[1,0]$, and the graph of the function $y=3|x|-p x$ is a broken line consisting of the sides of some angle with vertex $O[0,0]$ (Fig. 3a for $p=2$). Both graphs have three common points precisely when one of the sides of the mentioned angle is a tangent to the parabola and the other is its "secant". Since the parabola under consideration does not have a tangent parallel to the $y$-axis, we can look for the equations of both tangents passing through the point $[0,0]$ in the form $y=k x$. As is known, the slope $k$ is determined by the condition that the equation $k x=(x-1)^{2}$ has a double root, i.e., a zero discriminant. The discriminant has the expression $(k+2)^{2}-4$, so the sought values are $k_{1}=0, k_{2}=-4$ and the corresponding points of tangency are $T_{1}=V[1,0]$ and $T_{2}[-1,4]$. From the equations for the slopes of the tangent sides of the angles $3-p=0$ and $-3-p=-4$, we find the solutions $p_{1}=3$ and $p_{2}=1$ and easily verify that the other side is indeed a secant of the parabola in both cases (Fig. 3b for $p=3$ and Fig. 3c for $p=1$).

![](https://cdn.mathpix.com/cropped/2024_04_17_16872b628cb10877d512g-4.jpg?height=571&width=502&top_left_y=1573&top_left_x=206)
a) $p=2$

![](https://cdn.mathpix.com/cropped/2024_04_17_16872b628cb10877d512g-4.jpg?height=574&width=508&top_left_y=1569&top_left_x=751)
b) $p=3$

![](https://cdn.mathpix.com/cropped/2024_04_17_16872b628cb10877d512g-4.jpg?height=577&width=492&top_left_y=1570&top_left_x=1316)
c) $p=1$

Fig. 3

For a complete solution, 6 points are awarded. When using the algebraic approach mentioned, award 1 point for setting up equations (1) and (2), and add 3 points for determining the values $p \in\{-3,1,3,7\}$, where one of the discriminants of equations (1) and (2) is zero and the other is positive. If the check or reasoning about the signs of the roots of equations (1) and (2) is missing, which is mainly manifested by the solver not excluding the values $p=-3$ and $p=7$, award a maximum of 4 points.