29.8.6 problem 211

Internal problem ID [4811]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 211
Date solved : Sunday, March 30, 2025 at 03:59:24 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: 14
ode:=x*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: 9.229 (sec). Leaf size: 21
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 (\frac {e^{c_1}}{x}\right ) \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 1.291 (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 (\frac {C_{1}}{x} \right )}\right ), \ y{\left (x \right )} = x \operatorname {asin}{\left (\frac {C_{1}}{x} \right )}\right ] \]