TITLE: First order differential equation involving inverse function
QUESTION [11 upvotes]: 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$$

REPLY [2 votes]: This is not really an answer but maybe it'll add something to the discussion. Anyway, I'm confused, and let me explain why.
If you substitute $x=f(t)$ into your equation you get $$ \frac{f'(f(t))}{f(t)}=\frac{1}{t}+\alpha,\ \ \alpha=1/k.$$ Note that $t=f^{-1}(x)\in f^{-1}([0,T])=[t_0,T]$ where $t_0=f^{-1}(0)\ge 0$ if $f$ does attain the value zero (if not, $t_0=0$ and the interval is half-open).
Multiplying by $f(t)f'(t)$ and integrating from $t_0$ to $x$ we get $$\int_{t_0}^xf'(t)f'(f(t))\ dt = \int_{t_0}^x(\alpha+1/t)f'(t)f(t)\ dt, $$ or $$ 2f\circ f(x)=(\alpha+1/x)f(x)^2 +\int_{t_0}^x\left[\frac{f(t)}{t}\right]^2\ dt.$$ Plugging in $x=T$ we in particular obtain $$ T=\alpha T^2+\int_{t_0}^T\left[\frac{f(t)}{t}\right]^2\ dt.$$ This means that the condition $\alpha T<1$, or $T/k<1$, should be satisfied for a solution to exist. For $T=1, k=1/2$ the condition is not satisfied, which confuses me since the numerics above answers seem legit.
As a curiosity, one can also obtain the relation $$ \alpha T=\alpha f(x)+\int_{f(x)}^x\frac{f'(u)}{u}\ du, \ \ x\ge t_0.$$ From this is possible to see that if $t_0=0$ then the integral $$\int_0^T\frac{f'(u)}{u}\ du$$ must diverge. If $t_0>0$, then it is finite.