23.1.7 problem 1(g)

Internal problem ID [4097]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 2. First order equations. Exercises at page 14
Problem number : 1(g)
Date solved : Monday, January 27, 2025 at 08:08:32 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=\frac {y-2 x}{x} \end{align*}

Solution by Maple

Time used: 0.000 (sec). Leaf size: 12

dsolve(diff(y(x),x)=(y(x)-2*x)/x,y(x), singsol=all)
 
\[ y \left (x \right ) = \left (-2 \ln \left (x \right )+c_{1} \right ) x \]

Solution by Mathematica

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

DSolve[D[y[x],x]==(y[x]-2*x)/x,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x (-2 \log (x)+c_1) \]