29.8.13 problem 218

Internal problem ID [4818]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 218
Date solved : Sunday, March 30, 2025 at 03:59:55 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.396 (sec). Leaf size: 34
ode:=x*diff(y(x),x) = y(x)-2*x*tanh(y(x)/x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \operatorname {arctanh}\left (\frac {1}{\sqrt {-c_1 \,x^{4}+1}}\right ) x \\ y &= -\operatorname {arctanh}\left (\frac {1}{\sqrt {-c_1 \,x^{4}+1}}\right ) x \\ \end{align*}
Mathematica. Time used: 10.732 (sec). Leaf size: 21
ode=x D[y[x],x]==y[x]-2 x Tanh[y[x]/x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to x \text {arcsinh}\left (\frac {e^{c_1}}{x^2}\right ) \\ y(x)\to 0 \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*tanh(y(x)/x) + x*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded