Below is a problem I did. However, it did not match the back of the book. I would like to know where I went wrong.

Problem:

Solve the following differential equation.

${y}^{\prime}=\frac{y-x}{x}$

Answer:

$\begin{array}{rl}\frac{dy}{dx}& ={\displaystyle \frac{y}{x}}-{\displaystyle \frac{x}{x}}={\displaystyle \frac{y}{x}}-1\\ y& =xv\\ {\displaystyle \frac{dy}{dx}}& =x{\displaystyle \frac{dv}{dx}}+v\\ x{\displaystyle \frac{dv}{dx}}+v& =v-1\\ x{\displaystyle \frac{dv}{dx}}& =-1\\ dv& =-{\displaystyle \frac{dx}{x}}\\ v& =-\mathrm{ln}x+c\\ {\displaystyle \frac{y}{x}}& =-\mathrm{ln}|x|+c\\ y& =-x\mathrm{ln}|x|+cx\end{array}$

The book's answer is:

$y=x\mathrm{ln}|\frac{k}{x}|$

Where did I go wrong?

Problem:

Solve the following differential equation.

${y}^{\prime}=\frac{y-x}{x}$

Answer:

$\begin{array}{rl}\frac{dy}{dx}& ={\displaystyle \frac{y}{x}}-{\displaystyle \frac{x}{x}}={\displaystyle \frac{y}{x}}-1\\ y& =xv\\ {\displaystyle \frac{dy}{dx}}& =x{\displaystyle \frac{dv}{dx}}+v\\ x{\displaystyle \frac{dv}{dx}}+v& =v-1\\ x{\displaystyle \frac{dv}{dx}}& =-1\\ dv& =-{\displaystyle \frac{dx}{x}}\\ v& =-\mathrm{ln}x+c\\ {\displaystyle \frac{y}{x}}& =-\mathrm{ln}|x|+c\\ y& =-x\mathrm{ln}|x|+cx\end{array}$

The book's answer is:

$y=x\mathrm{ln}|\frac{k}{x}|$

Where did I go wrong?