82.34.1 problem Ex. 1

Internal problem ID [18844]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VII. Linear equations with variable coefficients. Problems at page 83
Problem number : Ex. 1
Date solved : Thursday, March 13, 2025 at 01:03:13 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 \left (x \right ) = c_{2} x +\ln \left (x \right ) c_{1} x +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.214 (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 \]