83.26.18 problem 18

Internal problem ID [19271]
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 : 18
Date solved : Monday, March 31, 2025 at 07:03:58 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

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