I am wondering if there is a way to solve a differential equation of the following form:

$$\displaystyle \frac{f'(x)}{x} = \frac{1}{f^{-1}(x)} + \frac{1}{k}$$

We can assume that $f(x): [0,T] \to (-\infty,T]$ is a monotone non-decreasing function with $f(T) = T$. Moreover, $f(x) \le x$ for all $x \in [0,T]$, and $0<k<\infty$.

---

To clarify the context, the differential equation comes from the following problem:

Find the value of $f(x)$ such that

$$\int\_{f(x)}^x k dt + \int\_x^T k\left(1-\frac{t}{f^{-1}(t)}\right) = \int\_x^Tt\ dt$$

As we can clearly see, when $x$ is very close to $T$. the value of $f(x)$ must be close to the value of $x$ since we know that $f^{-1}(x) \ge x$ and the second integral on the LHS is close to zero. Since the right integral is also close to zero, we must have $x$ close to $f(x)$. In fact, we can show $f(T)=T$.

The problem was originally stated in a more general form with $g(x)$ an increasing function on $[0,T]$.
$$\int\_{f(x)}^x k dt + \int\_x^T k\left(1-\frac{g(t)}{g(f^{-1}(t))}\right) = \int\_x^Tg(t)\ dt$$