# Inequality problem with negative values

I'm trying to solve the following expression for variable $S$ and having some difficulty manipulating the expression because of some negative terms. I have that

$$QS(1+\frac{x_2}{S})+\frac{2y_2}{S}<QS(1+\frac{x_1}{S})+\frac{2y_1}{S}$$

where $Q<0$ and all other variables are positive. $x_2>x_1$ and $y_2>y_1$

My attempt is as follows:

$$QS+Qx_2+\frac{2y_2}{S}<QS+Qx_1+\frac{2y_1}{S}$$

$$\iff Q(x_2-x_1)<\frac{2}{S}(y_1-y_2)$$

multiplying this by $-1$ gives:

$$Q(x_1-x_2)>\frac{2}{S}(y_2-y_1) \iff \frac{Q(x_1-x_2)}{2(y_2-y_1)}>\frac{1}{S} \iff \frac{(y_2-y_1)}{Q(x_1-x_2)}<S$$

Is this correct?

Your work is correct, if it is clear to you that the manipulations at the end work because $Q(x_1-x_2)>0$.
it is correct because division by $y_2-y_1$ does not change the sign since $y_2>y_1$ by assumption.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}