Solivng differential equation by subtracting Y. I have the equation $$ \frac{dy}{dx} = y + 2$$ And normally u would isolate the y's and the x's but what if I subtract y and then solve the equation. That would like the following. $$ \frac{dy}{dx} - y =2 $$ $$ 
 \int(\frac{dy}{dx} - y)dx = \int2dx$$ $$ \int\frac{dy}{dx}dx - \int ydx = \int 2dx $$ $$ \int1dy - \int ydx = \int2dx $$ $$ y - yx = 2x + C$$ $$ y = \frac{2x+C}{1-x}$$ But when you check this u get an equation where your only solution that works is when x=0. What am is wrong with the math.

$$ \frac{dy}{dx} = y + 2$$
you should  do
$$\frac{dy}{y+2}=dx$$
and then integrate
$$\log(y+2)=x+C$$
$$y=e^{x+C}-2$$
