83.6.3 problem 2 (c)

Internal problem ID [21946]
Book : Differential Equations By Kaj L. Nielsen. Second edition 1966. Barnes and nobel. 66-28306
Section : Chapter III. First order differential equations of the first degree. Ex. VII at page 50
Problem number : 2 (c)
Date solved : Thursday, October 02, 2025 at 08:19:00 PM
CAS classification : [_linear]

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