When does product of derivatives equals derivative of products?

In general, $\frac{d}{dx}(f(x) \cdot g(x)) \neq \frac{d}{dx}f(x) \cdot \frac{d}{dx}g(x)$

When does this result hold true? My first try is to use product rule on left side and compare the two sides, but this hasn't helped at all. Any suggestions?


well assuming one of the two functions, e.g. $g$ is given, then finding $f$ is just solving a homogeneous linear equation.

$$f'(x)g(x) + f(x)g'(x) = f'(x)g'(x)$$ which is the same as $$f'(x)(g(x)-g'(x)) + f(x)g'(x) = 0$$ given $g$ then you can solve it by $$f(x) = f(x_0)\exp \left\{ -\int_{x_0}^x \frac{g'(y)}{g(y)-g'(y)}dy\right\}.$$