26.5.12 problem 15

Internal problem ID [4286]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, End of chapter, page 61
Problem number : 15
Date solved : Sunday, March 30, 2025 at 02:50:57 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _exact]

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

Maple. Time used: 0.010 (sec). Leaf size: 14
ode:=cos(x+y(x))-x*sin(x+y(x)) = x*sin(x+y(x))*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x +\arccos \left (\frac {c_1}{x}\right ) \]
Mathematica. Time used: 7.989 (sec). Leaf size: 35
ode=Cos[x+y[x]]-x*Sin[x+y[x]]==x*Sin[x+y[x]]*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -x-\arccos \left (-\frac {c_1}{x}\right ) \\ y(x)\to -x+\arccos \left (-\frac {c_1}{x}\right ) \\ \end{align*}
Sympy. Time used: 4.815 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*sin(x + y(x))*Derivative(y(x), x) - x*sin(x + y(x)) + cos(x + y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - x + \operatorname {acos}{\left (\frac {C_{1}}{x} \right )}, \ y{\left (x \right )} = - x - \operatorname {acos}{\left (\frac {C_{1}}{x} \right )} + 2 \pi \right ] \]