28.1.99 problem 122

Internal problem ID [4405]
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 : 122
Date solved : Sunday, March 30, 2025 at 03:17:41 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.006 (sec). Leaf size: 10
ode:=x*diff(y(x),x)-y(x) = x*tan(y(x)/x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arcsin \left (c_1 x \right ) x \]
Mathematica. Time used: 3.384 (sec). Leaf size: 19
ode=x*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 (e^{c_1} x\right ) \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 1.206 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*tan(y(x)/x) + x*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = x \left (\pi - \operatorname {asin}{\left (C_{1} x \right )}\right ), \ y{\left (x \right )} = x \operatorname {asin}{\left (C_{1} x \right )}\right ] \]