89.3.15 problem 15

Internal problem ID [24313]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 34
Problem number : 15
Date solved : Thursday, October 02, 2025 at 10:16:52 PM
CAS classification : [_exact]

\begin{align*} \sin \left (y\right )-2 x \cos \left (y\right )^{2}+x \cos \left (y\right ) \left (2 x \sin \left (y\right )+1\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.015 (sec). Leaf size: 195
ode:=sin(y(x))-2*x*cos(y(x))^2+x*cos(y(x))*(2*x*sin(y(x))+1)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \arctan \left (-\frac {1+\sqrt {4 x^{2}-4 c_1 +1}}{2 x}, -\frac {\sqrt {-2+4 c_1 -2 \sqrt {4 x^{2}-4 c_1 +1}}}{2 x}\right ) \\ y &= \arctan \left (-\frac {1+\sqrt {4 x^{2}-4 c_1 +1}}{2 x}, \frac {\sqrt {-2+4 c_1 -2 \sqrt {4 x^{2}-4 c_1 +1}}}{2 x}\right ) \\ y &= \arctan \left (\frac {-1+\sqrt {4 x^{2}-4 c_1 +1}}{2 x}, -\frac {\sqrt {-2+4 c_1 +2 \sqrt {4 x^{2}-4 c_1 +1}}}{2 x}\right ) \\ y &= \arctan \left (\frac {-1+\sqrt {4 x^{2}-4 c_1 +1}}{x}, \frac {\sqrt {-2+4 c_1 +2 \sqrt {4 x^{2}-4 c_1 +1}}}{x}\right ) \\ \end{align*}
Mathematica. Time used: 60.139 (sec). Leaf size: 337
ode=( Sin[y[x]]-2*x*Cos[y[x]]^2   )+ x*Cos[y[x]]*(2*x*Sin[y[x]]+1)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\arccos \left (-\frac {\sqrt {-\frac {\sqrt {4 x^2+1+4 c_1}+1+2 c_1}{x^2}}}{\sqrt {2}}\right )\\ y(x)&\to \arccos \left (-\frac {\sqrt {-\frac {\sqrt {4 x^2+1+4 c_1}+1+2 c_1}{x^2}}}{\sqrt {2}}\right )\\ y(x)&\to -\arccos \left (\frac {\sqrt {-\frac {\sqrt {4 x^2+1+4 c_1}+1+2 c_1}{x^2}}}{\sqrt {2}}\right )\\ y(x)&\to \arccos \left (\frac {\sqrt {-\frac {\sqrt {4 x^2+1+4 c_1}+1+2 c_1}{x^2}}}{\sqrt {2}}\right )\\ y(x)&\to -\arccos \left (-\frac {\sqrt {\frac {\sqrt {4 x^2+1+4 c_1}-1-2 c_1}{x^2}}}{\sqrt {2}}\right )\\ y(x)&\to \arccos \left (-\frac {\sqrt {\frac {\sqrt {4 x^2+1+4 c_1}-1-2 c_1}{x^2}}}{\sqrt {2}}\right )\\ y(x)&\to -\arccos \left (\frac {\sqrt {\frac {\sqrt {4 x^2+1+4 c_1}-1-2 c_1}{x^2}}}{\sqrt {2}}\right )\\ y(x)&\to \arccos \left (\frac {\sqrt {\frac {\sqrt {4 x^2+1+4 c_1}-1-2 c_1}{x^2}}}{\sqrt {2}}\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(2*x*sin(y(x)) + 1)*cos(y(x))*Derivative(y(x), x) - 2*x*cos(y(x))**2 + sin(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out