28.1.116 problem 139

Internal problem ID [4422]
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 : 139
Date solved : Sunday, March 30, 2025 at 03:21:18 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.004 (sec). Leaf size: 12
ode:=x-y(x)*cos(y(x)/x)+x*cos(y(x)/x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\arcsin \left (\ln \left (x \right )+c_1 \right ) x \]
Mathematica. Time used: 0.387 (sec). Leaf size: 15
ode=(x-y[x]*Cos[ y[x]/x ])+(x*Cos[ y[x]/x] )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x \arcsin (-\log (x)+c_1) \]
Sympy. Time used: 0.906 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*cos(y(x)/x)*Derivative(y(x), x) + x - y(x)*cos(y(x)/x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = x \left (\pi - \operatorname {asin}{\left (C_{1} - \log {\left (x \right )} \right )}\right ), \ y{\left (x \right )} = x \operatorname {asin}{\left (C_{1} - \log {\left (x \right )} \right )}\right ] \]