78.9.4 problem 4 (a)

Internal problem ID [18181]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 14. Introduction. Problems at page 112
Problem number : 4 (a)
Date solved : Monday, March 31, 2025 at 05:22:01 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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