83.2.9 problem 9

Internal problem ID [18984]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Exercise II (A) at page 8
Problem number : 9
Date solved : Monday, March 31, 2025 at 06:28:26 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=x*diff(y(x),x)-y(x)-cos(1/x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-\sin \left (\frac {1}{x}\right )+c_1 \right ) x \]
Mathematica. Time used: 0.03 (sec). Leaf size: 16
ode=x*D[y[x],x]-y[x]-Cos[1/x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x \left (-\sin \left (\frac {1}{x}\right )+c_1\right ) \]
Sympy. Time used: 0.328 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - y(x) - cos(1/x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (C_{1} - \sin {\left (\frac {1}{x} \right )}\right ) \]