29.4.13 problem 102

Internal problem ID [4704]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 4
Problem number : 102
Date solved : Sunday, March 30, 2025 at 03:42:44 AM
CAS classification : [_Bernoulli]

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

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