10.2. Find all values of the parameter $a$ for which the equation $|x+a|=\frac{1}{x}$ has exactly two roots.
Answer: $a=-2$. Solution. The intersection of the graphs of the right and left parts can only be in the first

![](https://cdn.mathpix.com/cropped/2024_05_06_b17fb121c45cb400e742g-1.jpg?height=97&width=1602&top_left_y=2236&top_left_x=250)
the graph $y=|x+a|$ in the first quadrant represents the line $y=x+a$, which intersects with the hyperbola $y=\frac{1}{x}$ at exactly one point (since $y=\frac{1}{x}$ is a decreasing function). Now consider the values $a<0$. For $x \geq -a$, we have (reasoning similarly) one point of intersection of the graphs. Therefore, we need to find $a$ such that there is exactly one more point of intersection for $x \in (0, -a)$. We have $-x-a=\frac{1}{x} \Leftrightarrow x^{2}+a x+1=0 \Leftrightarrow x=\left(-a \pm \sqrt{a^{2}-4}\right) / 2$, hence $a=-2$ (for $-2<a<0$ the quadratic equation has no roots, and for $a<-2$ it has two positive roots, both less than $|a|$).