32.3.5 problem Exact Differential equations. Exercise 9.8, page 79

Internal problem ID [5803]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 9
Problem number : Exact Differential equations. Exercise 9.8, page 79
Date solved : Tuesday, March 04, 2025 at 11:47:06 PM
CAS classification : [_exact, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

Maple. Time used: 0.085 (sec). Leaf size: 18
ode:=cos(y(x))-(x*sin(y(x))-y(x)^2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ x +\frac {\sec \left (y \left (x \right )\right ) \left (y \left (x \right )^{3}-3 c_{1} \right )}{3} = 0 \]
Mathematica. Time used: 0.141 (sec). Leaf size: 23
ode=Cos[y[x]]-(x*Sin[y[x]]-y[x]^2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=-\frac {1}{3} y(x)^3 \sec (y(x))+c_1 \sec (y(x)),y(x)\right ] \]
Sympy. Time used: 3.232 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x*sin(y(x)) + y(x)**2)*Derivative(y(x), x) + cos(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x \cos {\left (y{\left (x \right )} \right )} + \frac {y^{3}{\left (x \right )}}{3} = 0 \]