How to find all solutions of $y'=c-y/x$? How to show that every solution of the ODE $f'(x)=c-f(x)/x$ is of the form

$f(x) = cx/2 + k_1/x$ for some $k_1 \in \mathbb{R}$?

(Let's say that we limit the domain of $f$ to $x&gt;0$ so $1/x$ is a valid solution).
$$y' + \frac{1}{x}y = c$$

Multiplying both sides by $x$

$$xy' + y = cx$$
$$(xy)' = cx$$
$$xy = c\frac{x^2}{2} + d$$
$$y = \frac{cx}{2} + \frac{d}{x}$$

All assuming $x\gt 0$
Let $z(x)=\frac{y(x)}{x}, $ then $c-z=y'=z+xz'.$

Can you proceed ?