83.24.2 problem 2

Internal problem ID [19245]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VI. Homogeneous linear equations with variable coefficients. Exercise VI (A) at page 81
Problem number : 2
Date solved : Monday, March 31, 2025 at 07:03:10 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} y^{\prime \prime }-x y^{\prime }+y&=2 \ln \left (x \right ) \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 18
ode:=x^2*diff(diff(y(x),x),x)-x*diff(y(x),x)+y(x) = 2*ln(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 x +x \ln \left (x \right ) c_1 +2 \ln \left (x \right )+4 \]
Mathematica. Time used: 0.019 (sec). Leaf size: 20
ode=x^2*D[y[x],{x,2}]-x*D[y[x],x]+y[x]==2*Log[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 x+(2+c_2 x) \log (x)+4 \]
Sympy. Time used: 0.186 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - x*Derivative(y(x), x) + y(x) - 2*log(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} x + C_{2} x \log {\left (x \right )} + 2 \log {\left (x \right )} + 4 \]