30.1.5 problem 5

Internal problem ID [7395]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.2, Separable Equations. Exercises. page 46
Problem number : 5
Date solved : Tuesday, September 30, 2025 at 04:30:19 PM
CAS classification : [_separable]

\begin{align*} \left (x y^{2}+3 y^{2}\right ) y^{\prime }-2 x&=0 \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 67
ode:=(x*y(x)^2+3*y(x)^2)*diff(y(x),x)-2*x = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \left (-18 \ln \left (x +3\right )+c_1 +6 x \right )^{{1}/{3}} \\ y &= -\frac {\left (-18 \ln \left (x +3\right )+c_1 +6 x \right )^{{1}/{3}} \left (1+i \sqrt {3}\right )}{2} \\ y &= \frac {\left (-18 \ln \left (x +3\right )+c_1 +6 x \right )^{{1}/{3}} \left (-1+i \sqrt {3}\right )}{2} \\ \end{align*}
Mathematica. Time used: 0.164 (sec). Leaf size: 109
ode=(x*y[x]^2+3*y[x]^2)*D[y[x],x]-2*x==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\sqrt [3]{-3} \sqrt [3]{\int _1^x\frac {2 K[1]}{K[1]+3}dK[1]+c_1}\\ y(x)&\to \sqrt [3]{3} \sqrt [3]{\int _1^x\frac {2 K[1]}{K[1]+3}dK[1]+c_1}\\ y(x)&\to (-1)^{2/3} \sqrt [3]{3} \sqrt [3]{\int _1^x\frac {2 K[1]}{K[1]+3}dK[1]+c_1} \end{align*}
Sympy. Time used: 1.145 (sec). Leaf size: 80
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x + (x*y(x)**2 + 3*y(x)**2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {\left (- \sqrt [3]{3} - 3^{\frac {5}{6}} i\right ) \sqrt [3]{C_{1} + 2 x - 6 \log {\left (x + 3 \right )}}}{2}, \ y{\left (x \right )} = \frac {\left (- \sqrt [3]{3} + 3^{\frac {5}{6}} i\right ) \sqrt [3]{C_{1} + 2 x - 6 \log {\left (x + 3 \right )}}}{2}, \ y{\left (x \right )} = \sqrt [3]{C_{1} + 6 x - 18 \log {\left (x + 3 \right )}}\right ] \]