60.1.349 problem 356

Internal problem ID [10363]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 356
Date solved : Sunday, March 30, 2025 at 04:26:35 PM
CAS classification : [_exact]

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

Maple. Time used: 0.016 (sec). Leaf size: 19
ode:=(x^2*cos(y(x))+2*sin(x)*y(x))*diff(y(x),x)+2*x*sin(y(x))+y(x)^2*cos(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \sin \left (x \right ) y^{2}+x^{2} \sin \left (y\right )+c_1 = 0 \]
Mathematica. Time used: 0.224 (sec). Leaf size: 76
ode=2*x*Sin[y[x]] + Cos[x]*y[x]^2 + (x^2*Cos[y[x]] + 2*Sin[x]*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{y(x)}\left (\cos (K[2]) x^2+2 K[2] \sin (x)-\int _1^x(2 \cos (K[2]) K[1]+2 \cos (K[1]) K[2])dK[1]\right )dK[2]+\int _1^x\left (\cos (K[1]) y(x)^2+2 K[1] \sin (y(x))\right )dK[1]=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*sin(y(x)) + (x**2*cos(y(x)) + 2*y(x)*sin(x))*Derivative(y(x), x) + y(x)**2*cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out