23.1.439 problem 429

Internal problem ID [5046]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 429
Date solved : Tuesday, September 30, 2025 at 11:29:57 AM
CAS classification : [_quadrature]

\begin{align*} y y^{\prime }&=a_{0} +a_{1} y+a_{2} y^{2} \end{align*}
Maple. Time used: 0.109 (sec). Leaf size: 222
ode:=y(x)*diff(y(x),x) = a__0+a__1*y(x)+a__2*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {4 \tan \left (\operatorname {RootOf}\left (2 c_1 a_{2} \sqrt {4 a_{0} a_{2} -a_{1}^{2}}+2 x a_{2} \sqrt {4 a_{0} a_{2} -a_{1}^{2}}-\sqrt {4 a_{0} a_{2} -a_{1}^{2}}\, \ln \left (\frac {\left (4 a_{0} a_{2} -a_{1}^{2}\right ) \sec \left (\textit {\_Z} \right )^{2}}{a_{2}}\right )+2 \sqrt {4 a_{0} a_{2} -a_{1}^{2}}\, \ln \left (2\right )+2 \textit {\_Z} a_{1} \right )\right ) a_{0} a_{2} -\tan \left (\operatorname {RootOf}\left (2 c_1 a_{2} \sqrt {4 a_{0} a_{2} -a_{1}^{2}}+2 x a_{2} \sqrt {4 a_{0} a_{2} -a_{1}^{2}}-\sqrt {4 a_{0} a_{2} -a_{1}^{2}}\, \ln \left (\frac {\left (4 a_{0} a_{2} -a_{1}^{2}\right ) \sec \left (\textit {\_Z} \right )^{2}}{a_{2}}\right )+2 \sqrt {4 a_{0} a_{2} -a_{1}^{2}}\, \ln \left (2\right )+2 \textit {\_Z} a_{1} \right )\right ) a_{1}^{2}-\sqrt {4 a_{0} a_{2} -a_{1}^{2}}\, a_{1}}{2 a_{2} \sqrt {4 a_{0} a_{2} -a_{1}^{2}}} \]
Mathematica. Time used: 0.248 (sec). Leaf size: 123
ode=y[x]*D[y[x],x]==a0+a1*y[x]+a2*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\frac {\log (\text {$\#$1} (\text {$\#$1} \text {a2}+\text {a1})+\text {a0})-\frac {2 \text {a1} \arctan \left (\frac {2 \text {$\#$1} \text {a2}+\text {a1}}{\sqrt {4 \text {a0} \text {a2}-\text {a1}^2}}\right )}{\sqrt {4 \text {a0} \text {a2}-\text {a1}^2}}}{2 \text {a2}}\&\right ][x+c_1]\\ y(x)&\to \frac {\sqrt {\text {a1}^2-4 \text {a0} \text {a2}}-\text {a1}}{2 \text {a2}}\\ y(x)&\to -\frac {\sqrt {\text {a1}^2-4 \text {a0} \text {a2}}+\text {a1}}{2 \text {a2}} \end{align*}
Sympy. Time used: 2.755 (sec). Leaf size: 192
from sympy import * 
x = symbols("x") 
a0 = symbols("a0") 
a1 = symbols("a1") 
a2 = symbols("a2") 
y = Function("y") 
ode = Eq(-a0 - a1*y(x) - a2*y(x)**2 + y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - x + \frac {\left (- \frac {a_{1} \sqrt {- 4 a_{0} a_{2} + a_{1}^{2}}}{4 a_{0} a_{2} - a_{1}^{2}} + 1\right ) \log {\left (y{\left (x \right )} + \frac {- 2 a_{0} \left (- \frac {a_{1} \sqrt {- 4 a_{0} a_{2} + a_{1}^{2}}}{4 a_{0} a_{2} - a_{1}^{2}} + 1\right ) + 2 a_{0} + \frac {a_{1}^{2} \left (- \frac {a_{1} \sqrt {- 4 a_{0} a_{2} + a_{1}^{2}}}{4 a_{0} a_{2} - a_{1}^{2}} + 1\right )}{2 a_{2}}}{a_{1}} \right )}}{2 a_{2}} + \frac {\left (\frac {a_{1} \sqrt {- 4 a_{0} a_{2} + a_{1}^{2}}}{4 a_{0} a_{2} - a_{1}^{2}} + 1\right ) \log {\left (y{\left (x \right )} + \frac {- 2 a_{0} \left (\frac {a_{1} \sqrt {- 4 a_{0} a_{2} + a_{1}^{2}}}{4 a_{0} a_{2} - a_{1}^{2}} + 1\right ) + 2 a_{0} + \frac {a_{1}^{2} \left (\frac {a_{1} \sqrt {- 4 a_{0} a_{2} + a_{1}^{2}}}{4 a_{0} a_{2} - a_{1}^{2}} + 1\right )}{2 a_{2}}}{a_{1}} \right )}}{2 a_{2}} = C_{1} \]