83.41.19 problem 5 (vi)

Internal problem ID [19420]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VIII. Linear equations of second order. Excercise at end of chapter VIII. Page 141
Problem number : 5 (vi)
Date solved : Thursday, March 13, 2025 at 02:24:41 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using reduction of order method given that one solution is

\begin{align*} y&=x^{2} \end{align*}

Maple. Time used: 0.435 (sec). Leaf size: 56
ode:=x*diff(diff(y(x),x),x)*(x*cos(x)-2*sin(x))+(x^2+2)*diff(y(x),x)*sin(x)-2*y(x)*(x*sin(x)+cos(x)) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \sin \left (x \right ) \left (c_{1} +c_{2} \left (\int {\mathrm e}^{-2 \left (\int \frac {\left (x^{2} \cot \left (x \right )-3 x \right ) \cos \left (x \right )+x \sec \left (x \right )+\sin \left (x \right )}{\left (x \cos \left (x \right )-2 \sin \left (x \right )\right ) x}d x \right )} \cos \left (x \right )d x \right )\right ) \]
Mathematica
ode=x*D[y[x],{x,2}]*(x*Cos[x]-2*Sin[x])+(x^2+2)*D[y[x],x]*Sin[x]-2*y[x]*(x*Sin[x]+Cos[x])==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(x*cos(x) - 2*sin(x))*Derivative(y(x), (x, 2)) + (x**2 + 2)*sin(x)*Derivative(y(x), x) - (2*x*sin(x) + 2*cos(x))*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-x**2*Derivative(y(x), (x, 2))/tan(x) + 2*x*y(x) + 2*x*Derivative(y(x), (x, 2)) + 2*y(x)/tan(x))/(x**2 + 2) cannot be solved by the factorable group method