15.6.10 problem 10

Internal problem ID [2967]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 10, page 41
Problem number : 10
Date solved : Sunday, March 30, 2025 at 01:02:28 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=y^2*diff(x(y),y)+(y^2+2*y)*x(y) = 1; 
dsolve(ode,x(y), singsol=all);
 
\[ x = \frac {{\mathrm e}^{-y} c_1 +1}{y^{2}} \]
Mathematica. Time used: 0.034 (sec). Leaf size: 19
ode=y^2*D[x[y],y]+(y^2+2*y)*x[y]==1; 
ic={}; 
DSolve[{ode,ic},x[y],y,IncludeSingularSolutions->True]
 
\[ x(y)\to \frac {1+c_1 e^{-y}}{y^2} \]
Sympy. Time used: 0.265 (sec). Leaf size: 12
from sympy import * 
y = symbols("y") 
x = Function("x") 
ode = Eq(y**2*Derivative(x(y), y) + (y**2 + 2*y)*x(y) - 1,0) 
ics = {} 
dsolve(ode,func=x(y),ics=ics)
 
\[ x{\left (y \right )} = \frac {C_{1} e^{- y} + 1}{y^{2}} \]