60.1.149 problem 152

Internal problem ID [10163]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 152
Date solved : Sunday, March 30, 2025 at 03:20:45 PM
CAS classification : [`y=_G(x,y')`]

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

Maple. Time used: 0.028 (sec). Leaf size: 135
ode:=(x^2+1)*diff(y(x),x)+x*sin(y(x))*cos(y(x))-x*(x^2+1)*cos(y(x))^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\arctan \left (\frac {6 \sqrt {x^{2}+1}\, \left (\sqrt {x^{2}+1}\, x^{2}+\sqrt {x^{2}+1}+3 c_1 \right )}{10+6 c_1 \left (x^{2}+1\right )^{{3}/{2}}+x^{6}+3 x^{4}+12 x^{2}+9 c_1^{2}}, \frac {8-6 c_1 \left (x^{2}+1\right )^{{3}/{2}}-x^{6}-3 x^{4}+6 x^{2}-9 c_1^{2}}{10+6 c_1 \left (x^{2}+1\right )^{{3}/{2}}+x^{6}+3 x^{4}+12 x^{2}+9 c_1^{2}}\right )}{2} \]
Mathematica. Time used: 8.803 (sec). Leaf size: 97
ode=(x^2+1)*D[y[x],x] + x*Sin[y[x]]*Cos[y[x]] - x*(x^2+1)*Cos[y[x]]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \arctan \left (\frac {x^4+2 x^2-6 c_1 \sqrt {x^2+1}+1}{3 x^2+3}\right ) \\ y(x)\to -\frac {1}{2} \pi \sqrt {\frac {1}{x^2+1}} \sqrt {x^2+1} \\ y(x)\to \frac {1}{2} \pi \sqrt {\frac {1}{x^2+1}} \sqrt {x^2+1} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*(x**2 + 1)*cos(y(x))**2 + x*sin(y(x))*cos(y(x)) + (x**2 + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out