# Solve by separation of variables

#### find_the_fun

##### Active member
Solve given differential equation by separation of variables

$$\displaystyle \frac{dy}{dx}=\frac{xy+3x-y-3}{xy-2x+4y-8}$$

So separate x and y terms

$$\displaystyle (xy-2x+4y-8) dy = (xy+3x-y-3)$$ ugh I'm stuck

#### MarkFL

Staff member
Re: solve by separation of variables

You want to factor the numerator and denominator of the right side, then you may separate variables.

#### find_the_fun

##### Active member
Re: solve by separation of variables

I can factor to $$\displaystyle \frac{dy}{dx}=\frac{(x-1)(y+3)}{(x+4)(y-2)}$$ and rewriting gives $$\displaystyle \frac{(y-2)}{(y+3)} dy = \frac{(x-1)}{(x+4)} dx$$. Am I on the right track? I don't know how to integrate this.

#### MarkFL

Staff member
Re: solve by separation of variables

Yes, you are correct. For the left side, consider:

$$\displaystyle \frac{y-2}{y+3}=\frac{y+3-5}{y+3}=1-\frac{5}{y+3}$$

Do the same kind of thing on the right side, and you should be able to integrate now.

#### find_the_fun

##### Active member
Re: solve by separation of variables

Yes, you are correct. For the left side, consider:

$$\displaystyle \frac{y-2}{y+3}=\frac{y+3-5}{y+3}=1-\frac{5}{y+3}$$

Do the same kind of thing on the right side, and you should be able to integrate now.
Is an alternative to $$\displaystyle \frac{y+3-5}{y+3}$$ doing polynomial division and seeing y+3 goes into y-2 once with a remainder of 5? I'm not super clear on the thought process of getting $$\displaystyle 1-\frac{5}{y+3}$$.

#### MarkFL

Is an alternative to $$\displaystyle \frac{y+3-5}{y+3}$$ doing polynomial division and seeing y+3 goes into y-2 once with a remainder of 5? I'm not super clear on the thought process of getting $$\displaystyle 1-\frac{5}{y+3}$$.
$$\displaystyle \frac{y-2}{y+3}=\frac{(y+3)+(-2-3)}{y+3}=\frac{y+3}{y+3}-\frac{5}{y+3}=1-\frac{5}{y+3}$$