57.1.28 problem 28

Internal problem ID [9012]
Book : First order enumerated odes
Section : section 1
Problem number : 28
Date solved : Sunday, March 30, 2025 at 01:59:08 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.035 (sec). Leaf size: 12
ode=D[y[x],x]==Cos[x]+y[x]/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x (\operatorname {CosIntegral}(x)+c_1) \]
Sympy. Time used: 0.624 (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 ) \]