89.2.24 problem 26

Internal problem ID [24289]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 27
Problem number : 26
Date solved : Thursday, October 02, 2025 at 10:07:36 PM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

With initial conditions

\begin{align*} y \left (1\right )&=\frac {\pi }{4} \\ \end{align*}
Maple. Time used: 0.103 (sec). Leaf size: 12
ode:=x*cos(y(x)/x)^2-y(x)+x*diff(y(x),x) = 0; 
ic:=[y(1) = 1/4*Pi]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\arctan \left (-1+\ln \left (x \right )\right ) x \]
Mathematica. Time used: 0.292 (sec). Leaf size: 14
ode=( x*Cos[y[x]/x]^2 -y[x] )+(x )*D[y[x],x]==0; 
ic={y[1]==Pi/4}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x \arctan (1-\log (x)) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*cos(y(x)/x)**2 + x*Derivative(y(x), x) - y(x),0) 
ics = {y(1): pi/4} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : cannot determine truth value of Relational: -1 < exp(2*_X0*I/x)