7.7.18 problem 18

Internal problem ID [196]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Review problems at page 98
Problem number : 18
Date solved : Saturday, March 29, 2025 at 04:41:44 PM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

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

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