# Differentiability Real analysis

Below is my question. I think I'm thinking too hard about it. Can anyone please point me to the right direction:

Given two functions $f, g$ differentiable on $\mathbb{R}$ so that $f'g - fg' = 0$ (logically equivalent). Does there exists constant $c$ so that either $f = cg$ or $g = cf$ ?

-
The result is not obvious. It is not even true. –  André Nicolas Dec 7 '12 at 1:52

If one of $f$ or $g$ is nowhere $0$, then everything is fine, we can put the nice function in the denominator and use the Quotient Rule. But differentiable functions, and even infinitely differentiable functions, can be pretty weird.

Let $f(x)=0$ if $x\le 0$, and let $f(x)=e^{-1/x^2}$ if $x\gt 0$.

Let $g(x)=e^{-1/x^2}$ if $x\lt 0$, and let $g(x)=0$ if $x\ge 0$.

It is not hard to show that $f$ and $g$ are infinitely differentiable everywhere.

It is clear that $f'g-fg'$ is $0$ everywhere. But $f$ is certainly not a constant times $g$.

-

If $f'g-fg'=0$ then $(f/g)'=(f'g-fg')/g^2=0$ at points where $g\ne0$. This implies $f/g$ is constant on intervals on which $g\ne0$. If there are disjoint open intervals on which $g\ne0$, this leaves open the possibility that it's a different constant on each such interval. So there's still a bit more to do here . . . . . .

PS: André Nicolas' answer seems to do the parts that my answer doesn't do, and mine does the parts that his doesn't do.

-