29.8.35 problem 240

Internal problem ID [4840]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 240
Date solved : Sunday, March 30, 2025 at 04:03:20 AM
CAS classification : [_rational, _Bernoulli]

\begin{align*} 2 x y^{\prime }&=\left (1+x -6 y^{2}\right ) y \end{align*}

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