Solve the equation

$$
|x+3|+p|x-2|=5
$$

where $p$ is a real parameter.
I. solution. Using the definition of absolute value, rewrite the equation. We distinguish three cases: 1) $x>2$. In this case, the original equation is $x+3+p(x-2)=5$, from which

$$
(1+p) x=2(1+p)
$$

If $p \neq-1$, then $x=2$, which cannot be the case due to the condition $x>2$. In the case of $p=-1$, $x$ can be anything, so the solution in this case is $x>2$.
2) $2 \geq x \geq-3$. The equation now takes the form $x+3-p(x-2)=5$, from which $(1-p) x=2(1-p)$. If $p \neq 1$, then $x=2$. If $p=1$, $x$ can be any value, which, given the condition, means the solution is $-3 \leq x \leq 2$.

3) If $x< -3$, the equation becomes $x+3-p(x-2)=5$, which simplifies to $(1-p)x=2(1-p)$. If $p \neq 1$, then $x=2$, but this contradicts the condition $x < -3$. If $p=1$, the equation is always true, so the solution is $x < -3$.

If $|p|>1$, it is clear that the only solution is $x=2$, as the slope on the right side is smaller in absolute value than the slope on the left side (Figure 2).
![](https://cdn.mathpix.com/cropped/2024_05_02_3e36590002da93bab4a1g-1.jpg?height=264&width=1074&top_left_y=1770&top_left_x=514)

Figure 2

If $|p|=1$, the graphs are identical on each segment, resulting in infinitely many solutions. If $p=1$, then $x \in[-3 ; 2]$, and if $p=-1$, then $x \in[2 ;+\infty)$.

If $0<|p|<1$, in addition to the solution $x=2$, the graphs intersect at one additional point on each corresponding ray, resulting in two solutions: $x \in\left\{2 ; \frac{2 p-8}{p+1}\right\}$ (Figure 3).
![](https://cdn.mathpix.com/cropped/2024_05_02_3e36590002da93bab4a1g-1.jpg?height=294&width=1114&top_left_y=2354&top_left_x=492)

Figure 3

Finally, if $p=0$, the only solution to the equation is 2.