# 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.

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)$$

• emm I believe last equation should be $f(x)=cg(x)$ and this solves the problem. – Yanko Nov 25 '17 at 15:40
• Right, edited. Thank you! Why does this solve the problem though? – Kaynex Nov 25 '17 at 15:41
• @Kaynex Sorry, but where does the $g(x)^2$ come from? – user462562 Nov 25 '17 at 15:42
• There is the assumption that $g(r_1) \neq 0$ but $f(r_1)=0$ – klirk Nov 25 '17 at 15:43
• The argument goes along the lines: Assume g has no roots.... – klirk Nov 25 '17 at 15:48

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...

• So the question is wrong? – user462562 Nov 25 '17 at 15:55
• @Manny No. Why do you think it is? – DonAntonio Nov 25 '17 at 16:01
• because it states that $g(r_{1}) \ne 0$ and $f(r_{1}) = 0$. Here, you showed that f(x) = cg(x) which means that f(r1) = cg(r1) -> 0 = cg(r1). So either c = 0 or g(r1) = 0 right? – user462562 Nov 25 '17 at 16:06
• @Manny No. What I showed is that under the assumption that $\;g\;$ doesn't vanish in $\;(a,b)\;$. we arrive to the contradiction $\;g(r_1)=g(r_2)=0\;$. which means our assumption is wrong, meaning: $\;g\;$ must vanish at some point $\;x_0\in (a,b)\;$ . Q.E.D. – DonAntonio Nov 25 '17 at 16:17
• But how do we know that the point where it vanishes $x \in (a,b)$ is in $(r_{1}, r_{2})$? – user462562 Nov 25 '17 at 16:24

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$

• I understand that saying we have contradiction makes you think that the question is wrong but what it really do is showing that we did an "illegal" move, in this case we divided by $0$, which means that $g(x)$ has to be equal to $0$ at some point, if it is still not clear say and I'll explain further how it works in this case – Holo Nov 25 '17 at 16:22

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.

• @Holo Oh, that soudve been logs in that line – klirk Nov 25 '17 at 16:45