30.2.14 problem 14

Internal problem ID [7442]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.3, Linear equations. Exercises. page 54
Problem number : 14
Date solved : Tuesday, September 30, 2025 at 04:35:28 PM
CAS classification : [_linear]

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