83.26.17 problem 17

Internal problem ID [19270]
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 (C) at page 93
Problem number : 17
Date solved : Monday, March 31, 2025 at 07:03:55 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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