12.7.18 problem 19

Internal problem ID [1728]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Integrating factors. Section 2.6 Page 91
Problem number : 19
Date solved : Saturday, March 29, 2025 at 11:37:38 PM
CAS classification : [_rational, [_Abel, `2nd type`, `class C`]]

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

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