8.6.2 problem 2

Internal problem ID [772]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Chapter 1 review problems. Page 78
Problem number : 2
Date solved : Tuesday, March 04, 2025 at 11:44:34 AM
CAS classification : [_separable]

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

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