Finding the number of roots which are real Let $0<a_1<a_2< . . . <a_n$ be real numbers .I need to show that the equation 
$$
\frac{a_1}{a_1-x}  + \cdots +\frac{a_n}{a_n-x}=2015 
$$
has exactly $n$ real roots.
Please tell me the steps, do I need to simplify the equation? It seems painful to me. Please dont solve the question
 A: The function $$f(x)=\sum_{i=1}^n{a_i\over a_i-x}$$ is continuous except at the points $a_1,a_2,\dots,a_n.$  When $x$ is close to $a_i$ but smaller than $a_i, \ f(x)$ is very large ("goes to $\infty.$")  When $x$ is close to $a_i$ but larger than $a_i$ then $f(x)$ goes to $-\infty.$  Now you need to examine the behavior of $f(x)$ when $x$ is greater than all the $a_i$ and when $x$ is smaller than all the $a_i$ and you can sketch the graph.  Then just count the number of times it crosses the line $y=2015.$
If you have difficulty seeing how to do this for a general $n$, start by doing it for $n=3$ say.  
A: Let $g(x)=f(x)-2015$.
(see illustration below).
Reducing $g(x)$ do a same denominator gives a rational fraction which is $0$ if and only if its numerator is $0$. And this numerator is clearly a $n$th degree polynomial.
We are going first to find $n-1$ roots...
Indeed, on each interval $(a_i,a_{i+1})$, one has 
$$\lim_{x \to a_i+0} \ g(x)=-\infty+A=-\infty$$
where $A:=\sum_{j=1, j\neq i}^n\frac{a_j}{a_j-a_i}-2015,$
whereas :
$$\lim_{x \to a_{i+1}-0} \ g(x)=+\infty+B=+\infty$$
where $B:=\sum_{j=1, j\neq (i+1)}^n\frac{a_j}{a_j-a_{i+1}}-2015.$
Thus, by continuity of $g$ on interval $(a_i,a_{i+1})$, there is at least a real root of $f$ on this interval (intermediate values theorem). See remark below.
Thus we have found at least one root on each interval $(a_i,a_{i+1})$. It remains to find the last one (we are at Easter time : looking for the last egg...).
Is it "hidden" in $(-\infty,a_1)$ or $(a_n,+\infty)$ ? 
Up to you (you have said you don't want a full solution...).

Fig. 1 : An illustration with $g(x):=\dfrac{2}{2-x}+\dfrac{3}{3-x}+\dfrac{5}{5-x}-10$ (we have taken $10$ instead of $2015$ because the latter is too big). Axes are black, asymptotes are red.
Remark : [in fact there is only one root by interval, because $g$ is increasing on each interval, but we don't need it]. 
A: A proof by contradiction. 
This  is  a  polynomial  of degree  n  on  x.  So,  there  are  n  number of  roots. We  have  to  prove that  n  roots  are  real. There  is  no  complex root  of the  equation. Let,  there  are  two  complex roots  $s  + ir$  and $ s  –  ir$  (As  complex  roots  come in conjugate  pair) 
Now, $ s  + ir $will  satisfy  the  equation. 
a1/(a1  –  s  –  ir)  + a2/(a2  –  s  –  ir)  + ....  + an/(an  –  s  –  ir)  = 2015 
Similarly,  a1/(a1  –  s  + ir)  + a2/(a2  –  s  +  ir)  + .....  + an/(an  –  s  + ir)  = 2015
Now,  subtracting  the  equations  we  get,
{a1/(a1  –  s  –  ir)  –  a1/(a1  –  s  + ir)}  + {a2/(a2  –  s  –  ir)  –  a2/(a2  –  s  + ir)}  + .....  +  {an/(an  –  s  –  ir)  –  an/(an  –  s  + ir)}  = 2015  –  2015  
a1(2ir)/{(a1  –  s)2  +  r2} +  a2(2ir)/{(a2  –  s)2  + r2}  + ..... +  an(2ir)/{(an  –  s)2  +  r2} =  0 
(2ir)[a1/{(a1  –  s)2  + r2}  + a2/(a2  –  s)2  + r2}+......+ an/{(an  –  s)2  + r2}]  = 0  
Now,  a1,  a2,  ...,  an  all  are  greater than  0. The  expression  inside  the  square  bracket  is  greater  than  0  as denominators are  sum  of square  numbers and  greater than  $0$  . $r$ has  to  be  $0$.  The  imaginary part  of  the  roots  are  zero.  The  roots  are  no  more  complex.  Our assumption  was  wrong.  There  is  no  complex root  of the  equation.  All  roots  are  real.  There  are  $n $ number of  real  roots. 
