20.4.4 problem Problem 12

Internal problem ID [3639]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number : Problem 12
Date solved : Sunday, March 30, 2025 at 01:55:23 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

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