60.1.121 problem 124

Internal problem ID [10135]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 124
Date solved : Wednesday, March 05, 2025 at 08:33:06 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.006 (sec). Leaf size: 12
ode:=x*diff(y(x),x)+x*cos(y(x)/x)-y(x)+x = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -2 \arctan \left (\ln \left (x \right )+c_{1} \right ) x \]
Mathematica. Time used: 0.373 (sec). Leaf size: 31
ode=x*D[y[x],x] + x*Cos[y[x]/x] - y[x] + x==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 2 x \arctan (-\log (x)+c_1) \\ y(x)\to -\pi x \\ y(x)\to \pi x \\ \end{align*}
Sympy. Time used: 0.963 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*cos(y(x)/x) + x*Derivative(y(x), x) + x - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 2 x \operatorname {atan}{\left (C_{1} - \log {\left (x \right )} \right )} \]