28.1.46 problem 47

Internal problem ID [4352]
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 : 47
Date solved : Sunday, March 30, 2025 at 03:09:18 AM
CAS classification : [[_homogeneous, `class G`]]

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

Maple. Time used: 0.029 (sec). Leaf size: 18
ode:=y(x)^2+(x*y(x)+tan(x*y(x)))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\operatorname {RootOf}\left (\textit {\_Z} c_1 \sin \left (\textit {\_Z} \right )-x \right )}{x} \]
Mathematica. Time used: 0.263 (sec). Leaf size: 14
ode=(y[x]^2)+(x*y[x]+Tan[x*y[x]])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}[y(x) \sin (x y(x))=c_1,y(x)] \]
Sympy. Time used: 4.620 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x*y(x) + tan(x*y(x)))*Derivative(y(x), x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \log {\left (x \right )} + \log {\left (x y{\left (x \right )} \right )} - \frac {\log {\left (\tan ^{2}{\left (x y{\left (x \right )} \right )} + 1 \right )}}{2} + \log {\left (\tan {\left (x y{\left (x \right )} \right )} \right )} = C_{1} \]