83.49.6 problem Ex 6 page 123

Internal problem ID [19548]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter VIII. Linear equations of second order
Problem number : Ex 6 page 123
Date solved : Monday, March 31, 2025 at 07:33:01 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.189 (sec). Leaf size: 49
ode:=(x*sin(x)+cos(x))*diff(diff(y(x),x),x)-x*cos(x)*diff(y(x),x)+y(x)*cos(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \cos \left (x \right ) \left (c_1 -c_2 \int {\mathrm e}^{-\int \frac {\cos \left (x \right ) \cot \left (x \right )-2 x \sin \left (x \right ) \tan \left (x \right )-2 \sin \left (x \right )}{x \sin \left (x \right )+\cos \left (x \right )}d x} \sin \left (x \right )d x \right ) \]
Mathematica. Time used: 0.135 (sec). Leaf size: 16
ode=(x*Sin[x]+Cos[x])*D[y[x],{x,2}]-x*Cos[x]*D[y[x],x]+Cos[x]*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 x-c_2 \cos (x) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*cos(x)*Derivative(y(x), x) + (x*sin(x) + cos(x))*Derivative(y(x), (x, 2)) + y(x)*cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False