# First order differential equation involving inverse function

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$$

• Maybe this problem is just too advanced for me, but I do not see a straightforward solution unless if $f \left( x \right)$ is in the form of some simple polynomial, with a simple polynomial inverse. – Ryan Aug 7 '14 at 0:46
• I don't think $f$ takes the form of a polynomial, however, I might be wrong. – ste_kwr Aug 7 '14 at 6:30
• Well $f(x)=x, g(x)=0$ is one solution, if I have understood all your conditions correctly. I think I might know how to do this, despite the near-arbitrary $g$... – ShakesBeer Aug 13 '14 at 9:13
• I can't quite grasp it but something about the restrictions means that if $f(x)<x$ at any point then $f'(x)-\frac{x}{f^{-1}(x)}$ must be decreasing at some point, implying g decreasing. – ShakesBeer Aug 13 '14 at 14:50
• All it says is that $f'(x)$ has to increase at a certain rate. Note that if $f(x) \le x$ then $f^{-1}(x) \ge x$. and the term subtracted from $f'(x)$ can atmost be 1. I think I am missing your point here, can you elaborate? – ste_kwr Aug 14 '14 at 0:13

This is a very quick thing, I have not done it properly. Solved it backwards numerically with $T=1, k=1/2$ in excel (!!) with a step size of 0.0001, with a simple Euler recursion. Will be accurate enough to the left of $x=1/2$, but then again that doesn't show much... That is more or less what it will look like though.

• Yes, I have indeed done the calculation myself and it looks the same (except flipped). I have also approximated the function by iteratively calculating those integrals above. $f(x) = x - \left(\frac{ T^2 - x^2}{2k} \right) + B(T) - B(x)$ where $B(x) = \int \left[ 1 - \frac{2x}{\sqrt{4k^2 + 4T^2 + 8kx} - 2k} \right] dx$ – ste_kwr Aug 22 '14 at 16:21
• @ste_kwr I don't understand, is that the solution? – ShakesBeer Aug 26 '14 at 9:32
• No. I believe the solution can be arrived numerically by iteratively solving the differential equation by starting with $f(x)=x$. That's what you get after two iterations which gives a result really close to the one in your graph. – ste_kwr Aug 26 '14 at 19:33
• @ste_kwr oh, I thought it might be that. I seem to have attracted the bounty, although the answer isn't really worth it. Do you want me to place it on the question again? – ShakesBeer Aug 26 '14 at 20:05
• @ste_kwr I'll start it in a week (promise!), cause I think that'll attract more attention, unless you're in a hurry to get it solved – ShakesBeer Aug 27 '14 at 8:37

Witout expecting an exact analytic solution, the simplest way is probably to solve it thanks to a numerical method, as coolydudey60 did it.

A possible analytical way is to proceed with series development in the vicinity of $x=T$. For example, the formula of the 3 degree series is shown below. This function $f(x)$ drawn in the case $T=1$ , $k=\frac{1}{2}$ appears in a rather good agreement with the corresponding result given by coolydudey60.

For values of $x$ far from $T$, the series is not accurate enough because more terms would be necessary. But incressing the number of terms of the series becomes more and more complicated because it is an ardous and boring task to compute the inverse series.

So, on a practical viewpoint, it should be simpler and more reliable to use a numerical method for solving the ODE.

Added on the figure : Comparison with a purely numerical method (finite elements $dx=0.0001$ )

Later, with the help of a software for formal calculus, I obtained the fourth term of the series :

The next figure gives a glimpse of the convergence of the series. One see that a large number of terms are necessay if enough accuracy is expected in the range of $x$ close to $0$.

• This is interesting. I think I'm starting to see a pattern in that series though. Do you think you could compute one more term? It could be the best solution we arrive at if we can find the series. If it goes well, you will of course get the bounty for your troubles barring a closed form solution appearing. – ShakesBeer Sep 7 '14 at 7:50
• Also, we can figure out the series up to a few terms more easily: we just use the chain rule to find the $n^{th}$ derivative of the inverse function in terms of $f$, and find the values of the derivatives at $x=T$. Then, we may be able to spot and prove something by induction. This may also be of use. math.stackexchange.com/questions/475840/… – ShakesBeer Sep 7 '14 at 9:19
• I don't think that it so easy ! The chain rule for the derivatives of the inverse function doesn't give the derivatives for the same abscissa. Consider a function $x=f(y)$ and the inverse function $y=f^{-1}(x)$ Then $dx=f'(y)dy$. Then $\frac{dy}{dx}=\frac{1}{f'(y)}$. Then $\frac{d}{dx}f^{-1}(x)=\frac{1}{f'(y)}$. A this point, do not confuse $f'(y)$ with $f'(x)$. You don't obtain $\frac{d}{dx}f^{-1}$ as wanted at abscissa $x$ , but at a different abscissa. To obtain the vanted value, you need to know the value of $f'(y)$ and you only know $f'(x)$ which is not the same. – JJacquelin Sep 7 '14 at 10:04
• Computing the three first terms of the series is already an arduous work. Of course, it is certainly possible to compute the next term whith the help of a formal software. Nethertheless, I doubt that a partern for the series could be seen from the parterns of the first terms and then derived by induction. – JJacquelin Sep 7 '14 at 10:18
• Well I'll look into it and see how it goes. You may well be right, but I don't see another way... – ShakesBeer Sep 7 '14 at 10:38

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.

• This is confusing... – ShakesBeer Sep 10 '14 at 8:53
• Ahhh: I am doubtful of your integration by parts (after the or) – ShakesBeer Sep 10 '14 at 8:58
• I take that back... It looks like you're onto something, but I just can't see what's wrong with the numerics – ShakesBeer Sep 10 '14 at 11:28
• Yes you are right. Perhaps there is some asymptotic series -type phenomenon going on, I actually tried to prove a solution doesn't exist for a while but couldonly come up with the criterion above. – Teri Sep 10 '14 at 19:18