# A function with discontinuities.

Let $$y=f(x)$$ be a function which is discontinuous for exactly $$3$$ values of $$x$$ but defined $$\forall x~{\in}~\mathbb{R}$$.
Let $$y=g(x)$$ is another differentiable function such that $$y=f(x)g(x)$$ is continuous $$\forall x~{\in}~\mathbb{R}$$.

Then find the minimum number of distinct real roots of the equation $$g(x)g'(x)=0$$

How to do it with proof? With mathematical intuition?
And also, how should i approach like this problems when faced? Thank you.

My work:

I just assumed the function to be $$\frac{1}{(x-1)(x-2)(x-3)}$$ and then g(x) trivially to deal easily $$g(x)=(x-1)(x-2)(x-3)$$. But I could not think it mathematically.

The key is to make use of extended limit laws as discussed here. If $$f$$ is discontinuous at $$a$$ and $$g$$ and $$fg$$ are both continuous at $$a$$ then we must have $$\lim_{x\to a} g(x) =g(a) =0$$ Thus if $$f$$ is discontinuous at $$a, b, c$$ then $$a, b, c$$ are roots of $$g$$. Hence the desired minimum value is $$3+2=5$$ (two roots of $$g'$$ via Rolle).