29.15.19 problem 427

Internal problem ID [5025]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 15
Problem number : 427
Date solved : Sunday, March 30, 2025 at 06:30:30 AM
CAS classification : [_separable]

\begin{align*} y y^{\prime }&=a x +b x y^{2} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 50
ode:=y(x)*diff(y(x),x) = a*x+b*x*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\sqrt {-b \left (-{\mathrm e}^{x^{2} b} c_1 b +a \right )}}{b} \\ y &= -\frac {\sqrt {-b \left (-{\mathrm e}^{x^{2} b} c_1 b +a \right )}}{b} \\ \end{align*}
Mathematica. Time used: 0.873 (sec). Leaf size: 98
ode=y[x] D[y[x],x]==a x+b x y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\sqrt {-a+e^{b \left (x^2+2 c_1\right )}}}{\sqrt {b}} \\ y(x)\to \frac {\sqrt {-a+e^{b \left (x^2+2 c_1\right )}}}{\sqrt {b}} \\ y(x)\to -\frac {i \sqrt {a}}{\sqrt {b}} \\ y(x)\to \frac {i \sqrt {a}}{\sqrt {b}} \\ \end{align*}
Sympy. Time used: 1.316 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a*x - b*x*y(x)**2 + y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \sqrt {\frac {- a + e^{b \left (C_{1} + x^{2}\right )}}{b}}, \ y{\left (x \right )} = - \sqrt {\frac {- a + e^{b \left (C_{1} + x^{2}\right )}}{b}}\right ] \]