61.2.51 problem Problem 19(d)

Internal problem ID [15289]
Book : APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section : Chapter 4, Second and Higher Order Linear Differential Equations. Problems page 221
Problem number : Problem 19(d)
Date solved : Thursday, October 02, 2025 at 10:11:10 AM
CAS classification : [[_2nd_order, _exact, _nonlinear], [_2nd_order, _reducible, _mu_y_y1], [_2nd_order, _reducible, _mu_xy]]

\begin{align*} y y^{\prime \prime } \sin \left (x \right )+\left (\sin \left (x \right ) y^{\prime }+y \cos \left (x \right )\right ) y^{\prime }&=\cos \left (x \right ) \end{align*}
Maple. Time used: 1.579 (sec). Leaf size: 877
ode:=y(x)*diff(diff(y(x),x),x)*sin(x)+(sin(x)*diff(y(x),x)+cos(x)*y(x))*diff(y(x),x) = cos(x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} \text {Solution too large to show}\end{align*}
Mathematica. Time used: 60.072 (sec). Leaf size: 92
ode=y[x]*D[y[x],{x,2}]*Sin[x]+ ( D[y[x],x]*Sin[x]+y[x]*Cos[x] )*D[y[x],x]==Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\sqrt {2} \sqrt {\int _1^x-\csc (K[2]) \left (c_1+\int _1^{K[2]}-\cos (K[1])dK[1]\right )dK[2]+c_2}\\ y(x)&\to \sqrt {2} \sqrt {\int _1^x-\csc (K[2]) \left (c_1+\int _1^{K[2]}-\cos (K[1])dK[1]\right )dK[2]+c_2} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((y(x)*cos(x) + sin(x)*Derivative(y(x), x))*Derivative(y(x), x) + y(x)*sin(x)*Derivative(y(x), (x, 2)) - cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(sqrt(y(x)**2*cos(x)**2 - 4*y(x)*sin(x)**2*Derivative(y(x), (x, 2)) + 2*sin(2*x)) - y(x)*cos(x))/(2*sin(x)) + Derivative(y(x), x) cannot be solved by the factorable group method