29.4.12 problem 12

Internal problem ID [7265]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 4. OTHER METHODS FOR FIRST-ORDER EQUATIONS. page 406
Problem number : 12
Date solved : Tuesday, September 30, 2025 at 04:27:27 PM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

\begin{align*} y^{\prime }&=\frac {y}{x}-\tan \left (\frac {y}{x}\right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 14
ode:=diff(y(x),x) = y(x)/x-tan(y(x)/x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \arcsin \left (\frac {1}{x c_1}\right ) \]
Mathematica. Time used: 12.511 (sec). Leaf size: 21
ode=D[y[x],x]==y[x]/x- Tan[y[x]/x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x \arcsin \left (\frac {e^{c_1}}{x}\right )\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.761 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(tan(y(x)/x) + Derivative(y(x), x) - y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = x \left (\pi - \operatorname {asin}{\left (\frac {C_{1}}{x} \right )}\right ), \ y{\left (x \right )} = x \operatorname {asin}{\left (\frac {C_{1}}{x} \right )}\right ] \]