In one of my recent answers to an optimization question (see here), I came across the following equation:
$$\sum_{j=1}^n \frac{a_j}{(\lambda_j+x )^2}=1$$
where $a_j>0, \lambda_j \ge 0, j=1,...,n$. After doing some numerical checks, I realized that this equation always has two real roots (try it yourself here).
One may note that the equation can be written based on a polynomial with $2n$ degrees.
Is there any formal proof or counterexample for this observation?
We can assume that $\lambda_1 \le \lambda_2 \le \ldots \le \lambda_n$. The function $$ f(x) = \sum_{j=1}^n \frac{a_j}{(\lambda_j+x )^2} $$ is continuous on the open interval $(-\lambda_1, \infty)$ with $$ \lim_{x \to (-\lambda_1)+} f(x) = +\infty \, , \, \lim_{x \to \infty} f(x) = 0 \, . $$ It follows that $f(x) = 1$ has a solution in $(-\lambda_1, \infty)$. (Actually exactly one solution in that interval because $f$ is strictly decreasing there.)
In the same way one can show that $f(x) = 1$ has (exactly) one solution in the interval $(-\infty, -\lambda_n)$.
This shows that $f(x) =1$ has at least two real solutions. There can be additional solutions (one or two in each of the intervals $(-\lambda_{k+1}, -\lambda_k)$). For example, the equation $$ \frac{1}{x^2} + \frac {1}{(x+5)^2} + \frac{1}{(x+10)^2} = 1 $$ has six real solutions (WolfamAlpha).