51.1.28 problem 28

Internal problem ID [10298]
Book : First order enumerated odes
Section : section 1
Problem number : 28
Date solved : Tuesday, September 30, 2025 at 07:18:28 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=\cos \left (x \right )+\frac {y}{x} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 10
ode:=diff(y(x),x) = cos(x)+y(x)/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\operatorname {Ci}\left (x \right )+c_1 \right ) x \]
Mathematica. Time used: 0.022 (sec). Leaf size: 12
ode=D[y[x],x]==Cos[x]+y[x]/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x (\operatorname {CosIntegral}(x)+c_1) \end{align*}
Sympy. Time used: 0.374 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-cos(x) + Derivative(y(x), x) - y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (C_{1} + \operatorname {Ci}{\left (x \right )}\right ) \]