Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this equation here that I need to solve for the variable 'r'. Normally this would be easy, but with the ceiling function I'm unsure of how to approach it.

$$0 = \frac{h}{w} - \frac{\lceil\frac{n}{r}\rceil\, y}{r\,x}$$

Thanks in advance for the help guys.

share|cite|improve this question
As your function is not one to one, the inverse is not unique. – Fabian May 5 '11 at 21:17

If $\lceil \frac{n}{r}\rceil = k$, then you have $$r = k\left(\frac{wy}{hx}\right).$$ This will occur precisely when $k-1\lt \frac{n}{r}\leq k$. This means that you must have $$k-1 \lt \frac{nhx}{kwy}\leq k.$$ If $k\gt 0$, this is equivalent to $$k^2-k \lt \frac{nhx}{wy}\leq k^2.$$ For $k\lt 0$, it is equivalent to $$k^2-k \gt \frac{nhx}{wy}\geq k^2.$$ For $k=0$, there is no solution unless $h=0$. If $k=h=0$, then you just want $-1\lt \frac{n}{r}\leq 0$.

So first determine the possible values of $k$ for which the inequalities can hold (since you, presumably, know the values of $n$, $h$, $x$, $w$, and $y$), then use that to determine the value of $r$ by specifying the value of $\lceil\frac{n}{r}\rceil$.

Added. You say below $n$ and $r$ are positive, so $k\geq 1$. Note that there is at most one value of $k$ that can work, since $(k+1)^2 - (k+1) = k^2 + k \gt k^2$. But there may be no value of $k$ that works at all.

share|cite|improve this answer
Shouldn't the first leq symbol in $k-1 \leq n/r \leq k$ instead be a strict inequality? If $n/r$ hits the lower bound $k-1$, doesn't this become $\lceil n/r \rceil = k-1 = k$? – JasonMond May 5 '11 at 23:43
@Jason: Yes; thank you and sorry about that. – Arturo Magidin May 6 '11 at 3:29
K will always be greater than zero because n and r are always greater than zero. given the values of n =4, x = 1.33, y = 1, h = 221.116, and w = 154.6667, I get that .1854<= k < 1.03328. This gives me an approximation for K. but how do I use that to get r? I still have the ceiling. – Shawn P May 10 '11 at 19:14
@Arturo Also, n and r will always be integers. – Shawn P May 10 '11 at 20:34
@Shawn: I don't know what you did. If $n=4$, $x=1.33$, $y=1$, $h=221.116$, $w=154.6667$, then $nhx/wy = 7.605626292$. You want a value of $k$ for which $k^2-k\lt 7.605626292 \leq k^2$. Since $k$ must be a positive integer, you get that $k$ must be at least $3$ (otherwise, $7.605626292$ is not less than or equal to $k^2$); and must be at most $3$ (otherwise, it's not greater than $k^2-k$). So the correct value of $k$ is $k=3$. Therefore, the value of the ceiling is $3$, so $r=3(wy)/(hx) \approx 1.57778$. Note that $n/r \approx 2.535$, so $\lceil n/r\rceil = 3$, as required. – Arturo Magidin May 10 '11 at 21:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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