# Prove there exists a $c \in (a,b)$ such that $\frac{f'(c)}{f(c)} = \frac{1}{a-c}+\frac{1}{b-c}.$ [duplicate]

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.

Consider the function $$g:[a,b]\to \mathbb{R}$$ with $$g(x)=(x-a)(x-b)f(x)$$. Then $$g$$ is continuous on $$[a,b]$$ and differentiable on $$(a,b)$$ and $$g(a)=g(b)=0$$. From Rolle's theorem there exists some $$c\in (a,b)$$ such that $$g'(c)=0$$ or
$$(c-b)f(c)+(c-a)f(c)+(c-a)(c-b)f'(c)=0$$
$$\frac{f'(c)}{f(c)} = \frac{1}{a-c}+\frac{1}{b-c}$$