19.3.13 problem 21

Internal problem ID [3556]
Book : Differential equations and linear algebra, Stephen W. Goode, second edition, 2000
Section : 1.8, page 68
Problem number : 21
Date solved : Sunday, March 30, 2025 at 01:50:19 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.006 (sec). Leaf size: 10
ode:=x*diff(y(x),x) = x*tan(y(x)/x)+y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arcsin \left (c_1 x \right ) x \]
Mathematica. Time used: 9.426 (sec). Leaf size: 19
ode=x*D[y[x],x]==x*Tan[y[x]/x]+y[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.135 (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 ] \]