67.2.50 problem Problem 19(c)

Internal problem ID [13936]
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(c)
Date solved : Monday, March 31, 2025 at 08:18:43 AM
CAS classification : [[_2nd_order, _exact, _nonlinear], [_2nd_order, _reducible, _mu_xy]]

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

Maple. Time used: 0.018 (sec). Leaf size: 21
ode:=(x*cos(y(x))+sin(x))*diff(diff(y(x),x),x)-x*diff(y(x),x)^2*sin(y(x))+2*(cos(y(x))+cos(x))*diff(y(x),x) = y(x)*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ -x \sin \left (y\right )-y \sin \left (x \right )-c_1 x +c_2 = 0 \]
Mathematica. Time used: 0.124 (sec). Leaf size: 25
ode=(x*Cos[y[x]]+Sin[x])*D[y[x],{x,2}]- x*D[y[x],x]^2*Sin[y[x]] + 2*(Cos[y[x]]+Cos[x])*D[y[x],x]==y[x]*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\sin (y(x))+\frac {y(x) \sin (x)}{x}-\frac {c_1}{x}=c_2,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*sin(y(x))*Derivative(y(x), x)**2 + (x*cos(y(x)) + sin(x))*Derivative(y(x), (x, 2)) + (2*cos(x) + 2*cos(y(x)))*Derivative(y(x), x) - y(x)*sin(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ZeroDivisionError : polynomial division