29.19.26 problem 539

Internal problem ID [5135]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 19
Problem number : 539
Date solved : Sunday, March 30, 2025 at 06:43:33 AM
CAS classification : [_rational, _Bernoulli]

\begin{align*} 2 x y y^{\prime }+1-2 x^{3}-y^{2}&=0 \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 29
ode:=2*x*y(x)*diff(y(x),x)+1-2*x^3-y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {x^{3}+c_1 x +1} \\ y &= -\sqrt {x^{3}+c_1 x +1} \\ \end{align*}
Mathematica. Time used: 0.316 (sec). Leaf size: 37
ode=2 x y[x] D[y[x],x]+1-2 x^3-y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {x^3+c_1 x+1} \\ y(x)\to \sqrt {x^3+c_1 x+1} \\ \end{align*}
Sympy. Time used: 0.459 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**3 + 2*x*y(x)*Derivative(y(x), x) - y(x)**2 + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {C_{1} x + x^{3} + 1}, \ y{\left (x \right )} = \sqrt {C_{1} x + x^{3} + 1}\right ] \]