28.1.125 problem 148

Internal problem ID [4431]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 148
Date solved : Sunday, March 30, 2025 at 03:21:54 AM
CAS classification : [_exact, [_1st_order, `_with_symmetry_[F(x),G(x)*y+H(x)]`]]

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

Maple. Time used: 0.004 (sec). Leaf size: 15
ode:=2*x+y(x)*cos(x*y(x))+x*cos(x*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\arcsin \left (x^{2}+c_1 \right )}{x} \]
Mathematica. Time used: 0.435 (sec). Leaf size: 19
ode=(2*x+y[x]*Cos[x*y[x]])+(x*Cos[x*y[x]])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {\arcsin \left (x^2-c_1\right )}{x} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*cos(x*y(x))*Derivative(y(x), x) + 2*x + y(x)*cos(x*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out