12.7.10 problem 10

Internal problem ID [1720]
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 : 10
Date solved : Saturday, March 29, 2025 at 11:36:39 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

Maple. Time used: 0.006 (sec). Leaf size: 39
ode:=y(x)^2+(x*y(x)^2+6*x*y(x)+1/y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ x -\frac {3}{y^{4}}+\frac {1}{y^{3}}+\frac {6}{y^{5}}-\frac {6}{y^{6}}-\frac {{\mathrm e}^{-y} c_1}{y^{6}} = 0 \]
Mathematica. Time used: 0.213 (sec). Leaf size: 41
ode=(y[x]^2)+(x*y[x]^2+3*x*y[x]+3*x*y[x]+1/y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=-\frac {y(x)^3-3 y(x)^2+6 y(x)-6}{y(x)^6}+\frac {c_1 e^{-y(x)}}{y(x)^6},y(x)\right ] \]
Sympy. Time used: 1.107 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x*y(x)**2 + 6*x*y(x) + 1/y(x))*Derivative(y(x), x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x y^{6}{\left (x \right )} e^{y{\left (x \right )}} - \left (- y^{3}{\left (x \right )} + 3 y^{2}{\left (x \right )} - 6 y{\left (x \right )} + 6\right ) e^{y{\left (x \right )}} = 0 \]