30.6.12 problem 13

Internal problem ID [7547]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Review problems. page 79
Problem number : 13
Date solved : Tuesday, September 30, 2025 at 04:47:07 PM
CAS classification : [_linear]

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