# Solving $\frac{dx}{dt} = A \frac{ (1-x)}{(t-t^2)} - \frac{(B*x -C*x^2)}{(t-t^2 )*(t-x)}$ (using wolfram/mathematica)

I would like to solve the following non-linear ordinary differential equation:

$$\frac{dx}{dt} = A \frac{ (1-x)}{(t-t^2)} - \frac{(B*x -C*x^2)}{(t-t^2 )*(t-x)}$$

-I need an analytic solution.

-I don't know where to start (the 2 terms make it difficult), therefore I tried to use Wolfram-Alpha/ Mathematica. See here

-It seems however that even Wolfram-Alpha / Mathematica is not able to solve it (computation time out).

-Can someone help me out?

• Maybe you can use partial fraction decomposition to simplify the expression. But I'm not certain that would help much. I wouldn't be suprised Mathematica already tried that. – Nihl Jun 9 '15 at 8:36
• @Nihl For the 2nd term you mean? – student441 Jun 9 '15 at 8:47
• It can also be used for the first. $\frac{1}{t-t^2}$ can be written as a combinaison of $\frac{1}{1-t}$ and $\frac{1}{t}$. – Nihl Jun 9 '15 at 9:34
• @Nihl Thanks for the suggestion, but it doesn't work out.. wolfram can then still not solve it.. – student441 Jun 9 '15 at 12:01
• Did you use Wolfram-alpha AND Mathematica? They are not the same thing. I'm saying this because there is no "computation time out" on Mathematica. Mathematica is a software that runs on your computer (it's not online), therefore it doesn't impose time limits for computations. – Integral Jun 9 '15 at 14:04

Let $u=t-x$ ,

Then $x=t-u$

$\dfrac{dx}{dt}=1-\dfrac{du}{dt}$

$\therefore1-\dfrac{du}{dt}=\dfrac{A(1-t+u)}{t-t^2}-\dfrac{B(t-u)-C(t-u)^2}{(t-t^2)u}$

$u-u\dfrac{du}{dt}=\dfrac{Au}{t}+\dfrac{Au^2}{t-t^2}+\dfrac{Cu^2+(B-2Ct)u+Ct^2-Bt}{t-t^2}$

$u-u\dfrac{du}{dt}=\dfrac{Au}{t}+\dfrac{(A+C)u^2+(B-2Ct)u+Ct^2-Bt}{t-t^2}$

$u\dfrac{du}{dt}=\dfrac{(A+C)u^2}{t^2-t}+\left(\dfrac{B-2Ct}{t^2-t}-\dfrac{A}{t}+1\right)u+\dfrac{Ct^2-Bt}{t^2-t}$

This belongs to an Abel equation of the second kind.

In fact all Abel equation of the second kind can be transformed into Abel equation of the first kind.

Let $u=\dfrac{1}{v}$ ,

Then $\dfrac{du}{dt}=-\dfrac{1}{v^2}\dfrac{dv}{dt}$

$\therefore-\dfrac{1}{v^3}\dfrac{dv}{dt}=\dfrac{A+C}{(t^2-t)v^2}+\left(\dfrac{B-2Ct}{t^2-t}-\dfrac{A}{t}+1\right)\dfrac{1}{v}+\dfrac{Ct^2-Bt}{t^2-t}$

$\dfrac{dv}{dt}=-\dfrac{(Ct^2-Bt)v^3}{t^2-t}-\left(\dfrac{B-2Ct}{t^2-t}-\dfrac{A}{t}+1\right)v^2-\dfrac{(A+C)v}{t^2-t}$

• Using insights from this answer, I derived a parametric solution for B = C = -A and posted it under Mathematica. – bbgodfrey Jun 12 '15 at 1:16
• Yes, Maple confirms the type: DEtools[odeadvisor](eq,x(t)); gives [_rational, [_Abel, 2nd type, class B]] and class B is described more in this paper arxiv.org/pdf/math-ph/0001037.pdf in the appendix it gives a model ODE of this class and its solution. – Nasser Jun 12 '15 at 2:08
• Could you please post the code you use as text? I tried your code using DSolve[x'[t] == A*(1 - x[t])/(t - t^2) - (B*x[t] - C*x[t]^2)/((t - t^2)*(t - x[t])), x[t], t] but it doesn't seem to work for me. – dreamer Jun 9 '15 at 16:19
• @Integral MMA should return a solution involving a constant of integration (i.e. C[1]) for the problem you gave. Would you be able to restart the kernel and try for this solution again? – Ian Jun 10 '15 at 16:50
• @Integral Please try back-substituting your solutions into the equation. When I do so, I do not get 0. – bbgodfrey Jun 11 '15 at 13:26