26.5.10 problem 13

Internal problem ID [4284]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, End of chapter, page 61
Problem number : 13
Date solved : Monday, January 27, 2025 at 08:48:26 AM
CAS classification : [_linear]

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

Solution by Maple

Time used: 0.002 (sec). Leaf size: 25

dsolve(x*diff(y(x),x)+y(x)=x^2*cos(x),y(x), singsol=all)
 
\[ y \left (x \right ) = \frac {\sin \left (x \right ) x^{2}-2 \sin \left (x \right )+2 \cos \left (x \right ) x +c_{1}}{x} \]

Solution by Mathematica

Time used: 0.059 (sec). Leaf size: 25

DSolve[x*D[y[x],x]+y[x]==x^2*Cos[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {\left (x^2-2\right ) \sin (x)+2 x \cos (x)+c_1}{x} \]