7.7.2 problem 2

Internal problem ID [180]
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 : 2
Date solved : Saturday, March 29, 2025 at 04:38:32 PM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 18
ode:=x*y(x)^2+3*y(x)^2-x^2*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x}{3-\ln \left (x \right ) x +c_1 x} \]
Mathematica. Time used: 0.144 (sec). Leaf size: 25
ode=x*y[x]^2+3*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.185 (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} \]