69.6.6 problem 130

Internal problem ID [18049]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 6. Linear equations of the first order. The Bernoulli equation. Exercises page 54
Problem number : 130
Date solved : Thursday, October 02, 2025 at 02:36:01 PM
CAS classification : [_linear]

\begin{align*} x y^{\prime }-2 y&=x^{3} \cos \left (x \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 12
ode:=x*diff(y(x),x)-2*y(x) = x^3*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\sin \left (x \right )+c_1 \right ) x^{2} \]
Mathematica. Time used: 0.021 (sec). Leaf size: 22
ode=x*D[y[x],x]-2*y[x]==x^3*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x^2 \left (\int _1^x\cos (K[1])dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.236 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3*cos(x) + x*Derivative(y(x), x) - 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{2} \left (C_{1} + \sin {\left (x \right )}\right ) \]