Given that $f'(x)g(x) = g'(x)f(x)$ show that g has a root I'm given a question which reads:
"suppose $f(x)g'(x) = f'(x)g(x)$ for all $x \in (a,b)$. Let $r_{1}, r_{2} \in (a,b)$ where $r_{1} < r_{2}$ be two consecutive roots of $f$. Also, $f(x) \ne 0$ for any $x \in (r1, r2)$. Furthermore assume that $g(r_{1}) \ne 0$ and $g(r_{2}) \ne 0$. Show that g must have a root in $(r_{1}, r_{2})$.
My attempt:
We know that $f(r_{1}) = f(r_{2}) = 0$. So $0 = g(r_{1})f'(r_{1})$. Since $g(r_{1}) \ne 0$, it follows that $f'(r_{1}) = 0$. A similar argument can be made for $r_{2}$. Now, since $f(r_{1}) = 0$ and $f(r_{2}) = 0$, then there must be a $x_{1} \in(r_{1}, r_{2})$ such that $f'(x_{1}) = 0$. So, $f(x_{1})g'(x_{1}) = g(x_{1})f'(x_{1}) \to f(x_{1})g'(x_{1}) = 0 \to g'(x_{1}) = 0$, which means that g has an extremeum at that point.
That's about as far as I can get before getting stuck.   
 A: My thoughts so far:
$$f(x)g'(x) = f'(x)g(x)$$
$$0 = \frac{f'(x)g(x) - f(x)g'(x)}{g(x)^2}$$
$$\frac{d}{dx}\frac{f(x)}{g(x)} = 0$$
$$f(x) = cg(x)$$
A: Following Kaynes very good idea: suppose $\;g\;$ doesn't vanish in $\;(a,b)\;$ , then we can write for all $\;x\in (a,b)\;$ :
$$f'(x)g(x)=g'(x)f(x)\implies\left(\frac{f(x)}{g(x)}\right)'=\frac{f'(x)g(x)-f(x)g'(x)}{g(x)^2}=0\implies f(x)=cg(x)$$
for some constant $\;c\in\Bbb R\;$ . But this then means $\;g(r_i)=cf(r_i)=0\;$, contradiction...
A: I will take what @Kaynex showed: $f(x)=cg(x)$ 
Now we know that for some $x$ we have $f(x)\ne0\ne cg(x)\implies c\ne0$
Hence:$$f(r_1)=0=cg(r_1)\implies g(r_1)=\frac0c=0$$ this is contradiction to the assumption, thus a step in @Kaynex way is illegal, the only step it can be is: $$0=f'(x)g(x)-f(x)g'(x)\rightarrow 0=\frac{f'(x)g(x)-f(x)g'(x)}{g^2(x)}$$
Which implies that for some $x$, say $x_0$, we have $g^2(x_0)=0$ hence $g(x_0)=0$
A: Here is another solution. It does follow the same principles though:
Assume $g$ has no zeros in $(r_1, r_2)$. Then we can manipulate the condition $fg'=f'g$ to get:
$$\frac {f'} f = \frac {g'}g\\
\frac {d}{dx} \log(f) = \frac {d}{dx} \log (g)\\
\log f=\log g+c$$
Thus $f=\tilde c g, \text{ where } \tilde c=e^c \neq 0$.
But then $0=f(r_1)=\tilde c g(r_1) \neq 0$, a contradiction.
