First order non linear ODE with non-constant coefficients I am trying to solve numerically and ODE of the form, $$ A(x) + B(x)\dot{x} + C(x)\dot{x}^2 = 0.$$
I've tried many things such as but did not come up with a satisfying solution, anybody got an  idea of a method to solve this one ?
 A: $$ A(x) + B(x)\dot{x} + C(x)\dot{x}^2 = 0.$$
Are you sure about what you wrote? Let try to clearfy.
The variable of differentiation is missing in the equation. Suppose that the variable be $t$. Thus $\dot{x}=\frac{dx}{dt}$.
$$ A(x(t)) + B(x(t))\frac{dx}{dt} + C(x(t))\left(\frac{dx}{dt}\right)^2 = 0.\qquad\text{Is it OK ?}$$
If YES ,
$$\frac{dx}{dt}=\frac{1}{2C(x)}\left(-B(x)\pm \sqrt{\big(B(x)\big)^2-4C(x)A(x)}\right)$$
$$dt=\frac{2C(x)}{-B(x)\pm \sqrt{\big(B(x)\big)^2-4C(x)A(x)}}dx$$
$$t=\int \frac{2C(x)}{-B(x)\pm \sqrt{\big(B(x)\big)^2-4C(x)A(x)}}dx+\text{constant}$$
Since $A(x) , B(x) , C(x)$ are given (known) functions, then
$$f(x)=\frac{2C(x)}{-B(x)\pm \sqrt{\big(B(x)\big)^2-4C(x)A(x)}} \quad\text{is a known function}.$$
A first problem is to integrate $f(x)$:
$$t=\int f(x)dx+\text{constant}$$
If the integration is possible we find the function $F(x)$ which is antiderivative of $f(x)$.
$$t=F(x)+\text{constant}$$
A second problem is to find the inverse function of $F$, say $F^{-1}$. Don't confuse with $\frac{1}{F}$.
If it is possible the solution of the problem is :
$$x(t)=F^{-1}\big(t-\text{constant}\big)$$
Of course one cannot say if the integration and the inversion are analytically possible without knowing what kind of functions $A(x),B(x),C(x)$ are.
