# How to solve the following differential equation $\frac{dy}{dx} =\frac{x+2y+8}{2x+y+7}$ [duplicate]

How to solve the following differential equation $\displaystyle\frac{dy}{dx} =\frac{x+2y+8}{2x+y+7}$.

-

## marked as duplicate by Alex M., Servaes, Harish Chandra Rajpoot, Michael Medvinsky, sandwichDec 6 '15 at 3:00

$$\frac{dy}{dx} =\frac{x+2y+8}{2x+y+7}$$
Hint: Introduce new variables $X$, $Y$ such that $$x=X+a,\quad\text{and} \quad y=Y+b$$ by choosing appropriate constants $a$, $b$ in order to express your diffeq as an equivalent expression without the constants $8$ and $7$ terms on the right side of your give equation.
In terms of the new variables, your equation will then have the form $$\frac{dY}{dX}=\frac{X+2Y}{ 2X+Y} =\frac{1+2{Y\over X}}{ 2+1{Y\over X}}\ .$$