88.23.3 problem 3

Internal problem ID [24177]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 5. Special Techniques for Linear Equations. Miscellaneous Exercises at page 162
Problem number : 3
Date solved : Thursday, October 02, 2025 at 10:00:28 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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