35.7.15 problem 18

Internal problem ID [6197]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 7. Other second-Order equations. page 435
Problem number : 18
Date solved : Monday, January 27, 2025 at 01:47:27 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 31

dsolve(x^2*diff(y(x),x$2)+x*diff(y(x),x)-y(x)=x-1/x,y(x), singsol=all)
 
\[ y = \frac {2 \ln \left (x \right ) x^{2}+4 c_{2} x^{2}+2 \ln \left (x \right )+4 c_{1} +1}{4 x} \]

Solution by Mathematica

Time used: 0.049 (sec). Leaf size: 36

DSolve[x^2*D[y[x],{x,2}]+x*D[y[x],x]-y[x]==x-1/x,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {2 \left (x^2+1\right ) \log (x)+4 (-1+c_2) x^2+3+4 c_1}{4 x} \]