30.3.7 problem 7

Internal problem ID [7463]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.4, Exact equations. Exercises. page 64
Problem number : 7
Date solved : Tuesday, September 30, 2025 at 04:36:31 PM
CAS classification : [_exact]

\begin{align*} 2 x +y \cos \left (x y\right )+\left (x \cos \left (x y\right )-2 y\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.021 (sec). Leaf size: 29
ode:=2*x+y(x)*cos(x*y(x))+(x*cos(x*y(x))-2*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\operatorname {RootOf}\left (x^{4}+\sin \left (\textit {\_Z} \right ) x^{2}+c_1 \,x^{2}-\textit {\_Z}^{2}\right )}{x} \]
Mathematica. Time used: 0.127 (sec). Leaf size: 76
ode=(2*x+y[x]*Cos[x*y[x]])+(x*Cos[x*y[x]]-2*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^x(2 K[1]+\cos (K[1] y(x)) y(x))dK[1]+\int _1^{y(x)}\left (x \cos (x K[2])-2 K[2]-\int _1^x(\cos (K[1] K[2])-K[1] K[2] \sin (K[1] K[2]))dK[1]\right )dK[2]=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (x*cos(x*y(x)) - 2*y(x))*Derivative(y(x), x) + y(x)*cos(x*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out