60.1.90 problem 92

Internal problem ID [10104]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 92
Date solved : Sunday, March 30, 2025 at 03:16:10 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=x*diff(y(x),x)-y(x)-x^2*sin(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-\cos \left (x \right )+c_1 \right ) x \]
Mathematica. Time used: 0.033 (sec). Leaf size: 20
ode=x*D[y[x],x] - y[x] - x^2*Sin[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x \left (\int _1^x\sin (K[1])dK[1]+c_1\right ) \]
Sympy. Time used: 0.275 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*sin(x) + x*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (C_{1} - \cos {\left (x \right )}\right ) \]