74.9.4 problem 8

Internal problem ID [19881]
Book : Elementary Differential Equations. By Thornton C. Fry. D Van Nostrand. NY. First Edition (1929)
Section : Chapter VII. Linear equations of order higher than the first. section 63. Problems at page 196
Problem number : 8
Date solved : Thursday, October 02, 2025 at 05:00:09 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

\begin{align*} x^{2} y^{\prime \prime }+3 x y^{\prime }+y&=\frac {1}{x} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 20
ode:=x^2*diff(diff(y(x),x),x)+3*x*diff(y(x),x)+y(x) = 1/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_2 +c_1 \ln \left (x \right )+\frac {\ln \left (x \right )^{2}}{2}}{x} \]
Mathematica. Time used: 0.014 (sec). Leaf size: 27
ode=x^2*D[y[x],{x,2}]+3*x*D[y[x],x]+y[x]==1/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\log ^2(x)+2 c_2 \log (x)+2 c_1}{2 x} \end{align*}
Sympy. Time used: 0.164 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + 3*x*Derivative(y(x), x) + y(x) - 1/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + C_{2} \log {\left (x \right )} + \frac {\log {\left (x \right )}^{2}}{2}}{x} \]