# How can I solve this non-linear ODE?

I'm trying to solve the following ODE

$\qquad \dot{x}_t = \frac{e^{-x_{t}} r (\pi + \frac{\lambda \gamma}{\lambda + r} - \frac{c}{\lambda}) - e^{\frac{r}{\lambda} x_t} \left( \frac{c}{\lambda (\pi+\gamma)-c}\right)^{1+\frac{r}{\lambda}} \frac{r\lambda\gamma}{\lambda+r} + r (\pi - 2 c / \lambda) - \frac{cr}{\lambda} e^{x_{t}}}{-e^{-x_t} \frac{(\lambda \pi -c)r}{\lambda (\lambda + r)} - e^{\frac{r}{\lambda} x_{t}} \left( \frac{c}{\lambda (\pi+\gamma)-c}\right)^{\frac{r}{\lambda}} \left( \left( \frac{c}{\lambda (\pi+\gamma)-c}\right) \frac{r\lambda \gamma}{\lambda + r} + \frac{rc}{\lambda} \left( \frac{1}{\lambda + r} + \frac{1}{r}\right) \right) +\frac{c}{\lambda} }$

where all the constants are positive real numbers. I tried DSolve but it did not work. For example, naming the constants a to f:

DSolve[
{y'[x] ==
(a/E^y[x] - E^((r/l) y[x]) b + c - d E^y[x])/(-(f/E^y[x]) - E^((r/l) y[x]) g + h),
y[0] == p},
y[x], x]


But nothing happens (the evaluation runs forever). Can anybody help me to get an analytical solution?

• Have you tried searching before asking? Also, you probably meant E instead of e. Oct 16, 2017 at 17:37
• Sorry, is E not e. And yes, I searched but without success. Oct 16, 2017 at 18:14
• Do you have any reason (e.g., physical intuition) to believe that a closed-form, analytical solution exists? Oct 16, 2017 at 21:42
• Yes, actually an economic reason. This ODE comes from the solution of a game. The model is pretty simple and there is no reason to think that no-closed-form exist (I use assumptions that usually leads to an analytical solution). Oct 16, 2017 at 21:53
• "Could you imagine a more accessible related problem?" (Polya 1945, "How to Solve It") Oct 16, 2017 at 22:21

This becomes an integration problem. The generated integrals do not have closed form solution. Maple gives two integrals. I tried to solve one of them to start with, and none of Mathematica, Rubi, Maple nor FriCAS could solve them. FriCAS reported a "Poterntial Pole" on it. So I do not think there is closed form solution to the ODE you have.

I will show what I did, and you are free to duplicate it and see for yourself.

First converted the ODE to Maple, and Maple gave solution in terms of integrals

restart;
with(MmaTranslator);
ode:=FromMma(y'[x] ==
(a/E^y[x] - E^((r/l) y[x]) b + c - d E^y[x])/(-(f/E^y[x]) - E^((r/l) y[x]) g + h));


sol:=dsolve({ode,y(0) = p},y(x)):
DEtools[remove_RootOf](sol);


But these integrals do not have closed form solution. Looking at the second one, copied it to Mathematica and tried

integrand1=(g*Exp[a*(l+r)/l]-h*Exp[a]+f)/(b*Exp[a*(l+r)/l]+d*Exp[2*a]-c*Exp[a]-a)


Integrate[integrand1, {a, 0, p}]


Rubi can do part of it:

ShowSteps=False;
Int[integrand1,a]


The parts with Int stuck to them above, means it can't integrate these terms.

Then I tried FriCAS

setSimplifyDenomsFlag(true)
integrate((g*exp(a*(l+r)/l)-h*exp(a)+f)/(b*exp(a*(l+r)/l)+d*exp(2*a)-c*exp(a)-a),a=0..p)


And it can't do it. and it says "potentialPole"

You might want to ask in the Math forum if someone can solve this analytically.

• Tank you! So sad :( Oct 16, 2017 at 23:59
• Why not go for numerical integration? Are we going to face the issue there too?
– zhk
Oct 17, 2017 at 5:11
• @zhk ofcourse OP can try numerical integration, but the parameters given in the question are symbolic. No numerical values are given for them in the question to use. OP also said Can anybody help me to get an analytical solution? so I used what was given. But if this was numerical problem, one can just try NDSolve from the start also instead of DSolve Oct 17, 2017 at 5:17