81.15.13 problem 19-14

Internal problem ID [21721]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 19. Change of variables. Page 483
Problem number : 19-14
Date solved : Thursday, October 02, 2025 at 08:01:17 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} \cos \left (x \right ) y^{\prime \prime }+\left (x \sin \left (x \right )-2 \cos \left (x \right )\right ) \left (x y^{\prime }-y\right )&=0 \end{align*}
Maple. Time used: 0.107 (sec). Leaf size: 12
ode:=x^2*cos(x)*diff(diff(y(x),x),x)+(x*sin(x)-2*cos(x))*(x*diff(y(x),x)-y(x)) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left (c_1 +c_2 \sin \left (x \right )\right ) \]
Mathematica. Time used: 10.34 (sec). Leaf size: 53
ode=x^2*Cos[x]*D[y[x],{x,2}]+(x+Sin[x]-2*Cos[x])*(x*D[y[x],x]-y[x])==0 ; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x \left (c_2 \int _1^x\frac {\exp \left (-\int _1^{K[2]}\frac {K[1] \sec (K[1])+\tan (K[1])-2}{K[1]}dK[1]\right )}{K[2]^2}dK[2]+c_1\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*cos(x)*Derivative(y(x), (x, 2)) + (x*Derivative(y(x), x) - y(x))*(x + sin(x) - 2*cos(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False