Let $f$ be continuous on $[a,b]$, differentiable on $(a,b)$ and positive for all $x \in(a,b).$ Prove that there exists $c\in(a,b)$ such that $$\frac{f'(c)}{f(c)} = \frac{1}{a-c}+\frac{1}{b-c}.$$
This seems like just an application of the mean value theorem, but it doesn't seem to work out when I try.
My first attempt was to find an explicit equation for $f(x)$ since $$f'(x) = f(x)\left( \frac{1}{a-x} + \frac{1}{b-x} \right)\Rightarrow f(x) = e^{-\ln((a-x)(b-x)} \left( \frac{1}{a-x} + \frac{1}{b-x} \right)$$
But applying the mean value theorem doesn't quite work here because $f(a)$ and $f(b)$ are not defined so $f(x)$ isn't continuous on $[a,b].$
Any help would be appreciated.