I hope someone may be able to help me solve the following equation for $y$?

$$x=\frac b{50}\left\lfloor{50ay\over b}\right\rfloor$$

I'm trying to isolate $y$ so I can program an Excel file to solve the problem when $a$, $b$, and $x$ are known values. Is there a way to express the formula in a way that can be relied upon with utilizing the "goal seeker" feature on each dataset. I have nearly $3000$ of these.

  • $\begingroup$ Do you allow $a,b,x,y$ to be non-integers? Are they all positive numbers? $\endgroup$ – Crostul Mar 4 '16 at 22:34
  • $\begingroup$ Is it $$\frac{1}{50 b \operatorname{floor}(50ay/b)}$$ or $$\frac{1}{50} b \operatorname{floor}(50ay/b)$$ or what else? Please, write your formula unambiguously (use brakets). $\endgroup$ – Crostul Mar 4 '16 at 22:39
  • $\begingroup$ x and y may be negative. a and b will always be positive and they may be non-integers except for b. $\endgroup$ – apeters Mar 4 '16 at 22:40
  • $\begingroup$ It's the second example in the comment: (1/50)*b*floor(50ay/b) $\endgroup$ – apeters Mar 4 '16 at 22:44
  • $\begingroup$ I disagree with @Crostul as your notation was perfectly unambiguous, however I have edited your question to introduce $\LaTeX$ formatting which is used on this site via MathJax. Please follow this link to a basic introductory tutorial and familiarize yourself with $\LaTeX$ to provide better quality questions next time. Good luck! $\endgroup$ – dbanet Mar 4 '16 at 22:50

The equation $$x=\frac{1}{50} b \operatorname{floor}(50ay/b)$$ is equivalent to $$\frac{50x}{b} = \operatorname{floor}\left( \frac{50ay}{b} \right)$$ so, if $\frac{50x}{b}$ is not an integer, we have to stop, since the equation is impossible (no value of $y$ will satisfy that equation).

In the case that this is an integer, we can go on: the last equation is equivalent to $$\frac{50x}{b} \le \frac{50ay}{b} < \frac{50x}{b} +1$$ since $\frac{50a}{b} > 0$, we can divide everything by $\frac{50a}{b}$ getting $$\frac{x}{a} \le y < \frac{x}{a} + \frac{b}{50a}$$ So every number in the interval $\left[ \frac{x}{a} , \frac{x}{a}+ \frac{b}{50a} \right)$ may be a correct value for $y$.

  • $\begingroup$ Where "it is impossible to solve for $y$" should be read as "there is no solutions since $\lfloor\cdot\rfloor$ always returns an integer". $\endgroup$ – dbanet Mar 4 '16 at 22:52
  • $\begingroup$ The solution is not unique! I hope that this does not give you some troubles. Moreover, notice that in the case when $50x/b$ is not an integer, the equation is impossible. $\endgroup$ – Crostul Mar 4 '16 at 22:52
  • $\begingroup$ My point is, "impossible to solve" is ill-defined, while "no solutions exist" or equivalently "the solution set is empty" has meaning. Additionally, I do not quite follow where did $50a/b>0$ come from. $\endgroup$ – dbanet Mar 4 '16 at 22:54
  • $\begingroup$ @dbanet Thanks. I tried not to use a strictly formal language, since it seems to me that the OP is not a mathematician. $\endgroup$ – Crostul Mar 4 '16 at 22:56
  • 1
    $\begingroup$ This was very helpful. Thank you for taking the time to help out. I'm a novice, and now understand there is no single answer for y in this equation. I was able to use the advice and select a number in the range which will satisfy my immediate need. $\endgroup$ – apeters Mar 4 '16 at 23:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.