12.2.13 problem 13

Internal problem ID [1549]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Linear first order. Section 2.1 Page 41
Problem number : 13
Date solved : Monday, January 27, 2025 at 04:59:40 AM
CAS classification : [_linear]

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

Solution by Maple

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

dsolve(diff(y(x),x) +(1/x-1)*y(x)=-2/x,y(x), singsol=all)
 
\[ y = \frac {{\mathrm e}^{x} c_1 +2}{x} \]

Solution by Mathematica

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

DSolve[D[y[x],x] +(1/x-1)*y[x]==-2/x,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {2+c_1 e^x}{x} \]