Proving it has all real roots

Let $0<a_1<a_2<\cdots<a_n$ be real numbers. Show that the equation has exactly $n$ real roots.

$\displaystyle \sum_{i=1}^n \dfrac{a_i} {a_i-x} =2015$

I multiplied out denominators and that was very long, but I don't think descarte's rule will be helpful. Please any help is appreciated.


$\displaystyle f(x)=\bigg(\sum\limits_{i=1}^n\frac{a_i}{a_i-x}\bigg)-2015\quad$ with all $a_i>0$.

$\displaystyle f'(x)=\sum\limits_{i=1}^n\underbrace{\frac{a_i}{(a_i-x)^2}}_{>0}>0\quad$ so $f$ is increasing on each interval where it is defined.

It is also clear that $f$ is continuous except in its poles, thus on $\mathbb R\setminus\{a_1,a_2,...,a_n\}$.

$\begin{cases} \displaystyle \lim\limits_{x\to a_i^-}f(x)=+\infty\\ \displaystyle \lim\limits_{x\to a_i^+}f(x)=-\infty\\ \end{cases}$

By applying intermediate value theorem and using that $f\ \nearrow$ strictly, there is exactly $1$ real root in $]a_i,a_{i+1}[$, making this $n-1$ roots for $i=1..n$.

We have also $\lim\limits_{x\to-\infty}f(x)=-2015<0$ so there is $1$ root in $]-\infty,a_1[$.

We have also $\lim\limits_{x\to+\infty}f(x)=-2015<0$ so there is no root in $]a_n,+\infty[$.

Combining the results, gives exactly $n$ roots in $\mathbb R$.


another way is assume it has a complex root which is non real (it has roots by fundamental theorem of algebra). Let $x+iy$ be the complex root. Then we have $\sum_{i=1}^n a_i/(a_i-x-iy)=2015$ Multiply the lower side by conjugate to conclude $\sum_{i=1}^n (a_i^2-a_ix+ia_iy)/((a_i-x)^2+y^2)=2015$ Hence $\sum_{i=1}^na_iy/((a_i-x)^2+y^2)=0$ by comparing the imaginary part since each term has the same sign so $y=0$ . The fundamental theorem of algebra is applicable because the eqn reduces to solving a polynomial equation.