60.1.88 problem 90

Internal problem ID [10102]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 90
Date solved : Wednesday, March 05, 2025 at 08:30:58 AM
CAS classification : [_linear]

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

Maple. Time used: 0.003 (sec). Leaf size: 17
ode:=x*diff(y(x),x)+y(x)-x*sin(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\sin \left (x \right )-\cos \left (x \right ) x +c_{1}}{x} \]
Mathematica. Time used: 0.041 (sec). Leaf size: 25
ode=x*D[y[x],x]+ y[x] - x*Sin[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {\int _1^xK[1] \sin (K[1])dK[1]+c_1}{x} \]
Sympy. Time used: 0.296 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*sin(x) + x*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{x} - \cos {\left (x \right )} + \frac {\sin {\left (x \right )}}{x} \]