12.7.26 problem 27

Internal problem ID [1736]
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 : 27
Date solved : Saturday, March 29, 2025 at 11:38:06 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

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

Maple. Time used: 0.002 (sec). Leaf size: 18
ode:=3*x^2*y(x)^2+2*y(x)+2*x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {2}{\left (3 x +2 c_1 \right ) x} \]
Mathematica. Time used: 0.143 (sec). Leaf size: 25
ode=(3*x^2*y[x]^2+2*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}{3 x^2+2 c_1 x} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.214 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*x**2*y(x)**2 + 2*x*Derivative(y(x), x) + 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {2}{x \left (C_{1} + 3 x\right )} \]