29.6.5 problem 151

Internal problem ID [4751]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 6
Problem number : 151
Date solved : Monday, January 27, 2025 at 09:36:24 AM
CAS classification : [_linear]

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

Solution by Maple

Time used: 0.001 (sec). Leaf size: 17

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

Solution by Mathematica

Time used: 0.033 (sec). Leaf size: 19

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