73.4.1 problem 5.1 (a)

Internal problem ID [15012]
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.1 (a)
Date solved : Monday, March 31, 2025 at 01:12:17 PM
CAS classification : [[_linear, `class A`]]

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

Maple. Time used: 0.002 (sec). Leaf size: 46
ode:=x^2*diff(y(x),x)+3*x^2*y(x) = sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-1+3 i\right ) {\mathrm e}^{-3 x} x \,\operatorname {Ei}_{1}\left (\left (-3-i\right ) x \right )+\left (-1-3 i\right ) {\mathrm e}^{-3 x} x \,\operatorname {Ei}_{1}\left (\left (-3+i\right ) x \right )+2 \,{\mathrm e}^{-3 x} c_1 x -2 \sin \left (x \right )}{2 x} \]
Mathematica. Time used: 0.078 (sec). Leaf size: 35
ode=x^2*D[y[x],x]+3*x^2*y[x]==Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-3 x} \left (\int _1^x\frac {e^{3 K[1]} \sin (K[1])}{K[1]^2}dK[1]+c_1\right ) \]
Sympy. Time used: 7.276 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*x**2*y(x) + x**2*Derivative(y(x), x) - sin(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \int \frac {\left (3 x^{2} y{\left (x \right )} - \sin {\left (x \right )}\right ) e^{3 x}}{x^{2}}\, dx = C_{1} \]