35.8.1 problem 1

Internal problem ID [6208]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 13. Miscellaneous problems. page 466
Problem number : 1
Date solved : Sunday, March 30, 2025 at 10:43:06 AM
CAS classification : [_linear]

\begin{align*} x^{2} y^{\prime }-x y&=\frac {1}{x} \end{align*}

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