# Ordinary differential equation invloving the function composition

I want to solve the following function:

DSolve[(A1*Exp[B1*f[x]] + A2*Exp[B2*f[x]])*f'[x] == A1*Exp[B1*x] + A2*Exp[B2*x], f[x], x]


And this is what I get as an answer:

{{f[x] -> InverseFunction[(A1 E^(B1 #1))/B1 + (A2 E^(B2 #1))/B2 &][(A1 E^(B1 x))/B1 + (A2 E^(B2 x))/B2 + C[1]]}}


Mathematica says that some results could be given in the form of the inverse functions. Does anybody know how I can solve this to get some result?

Generally the given equation involves the function composition, and has the following form:

$(g \circ f)f'=g$, where Where $g \circ f=g(f(x))$.

By inspection, $f(x)=x$ is a solution. There are also other solutions. Anybody has idea how to tackle the problem to find more solutions?

-

Mathematica's answer is called an implicit solution.

A simpler form the ODE shows the reason.

$$\left( e^{f\left( x\right) }+e^{bf\left( x\right) }\right) f^{\prime }\left( x\right) =1$$

The solution $f\left( x\right)$ of the differential equation is given as a solution using inverse function. The reason is that there is no analytical solution for $f\left(x\right)$.

  DSolve[{(Exp[f[x]] + Exp[b f[x]])*f'[x] == 1}, f[x], x]


The solution $f(x)$ above of the ODE is actually simple to see. It is the solution to this equation

$$x-e^{f\left( x\right) }-\frac{e^{bf\left( x\right) }}{b}+C=0\tag{1}%$$

Since taking derivative of Eq. (1) the above w.r.t. $x$ gives back the ODE

\begin{align*} 1-f^{\prime}\left( x\right) e^{f\left( x\right) }-bf^{\prime}\left( x\right) \frac{e^{bf\left( x\right) }}{b} & =0\\ \left( e^{f\left( x\right) }+e^{bf\left( x\right) }\right) f^{\prime }\left( x\right) & =1 \end{align*}

Hence the solution of Eq. (1) for $f\left( x\right)$ is the solution of the differential equation. But the solution of Eq. (1) itself for $f\left( x\right)$ involves inverse functions. Hence Mathematica's answer. I Tried

  SetOptions[Solve, InverseFunctions -> False];


To see if DSolve might be using Solve at the very end to obtain the solution of the implicit equation for $f(x)$ and this setting will make it not use InverseFunction but return the solution as Solve[.....] which I think would have been better. but this did not work.

So the answer is: There is no actual analytical solution for $f(x)$, but an implicit solution in terms of InverseFunction