67.4.16 problem 5.2 (f)

Internal problem ID [16385]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 5. LINEAR FIRST ORDER EQUATIONS. Additional exercises. page 103
Problem number : 5.2 (f)
Date solved : Thursday, October 02, 2025 at 01:27:21 PM
CAS classification : [_linear]

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