Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

Given two values $a$ and $b$, how should one go about solving the following inequality for $r$:

$$a \le b^r -r .$$

Applying $\log_b$ on both sides of the inequality doesn't help me much since that yields the following:

$$\log_b a \le \log_b (b^r-r) .$$

I know that

$$\log_z x - \log_z y = \frac{\log_z x}{\log_z y} .$$

But that doesn't help me to eliminate the exponentiation and solve for $r$.

It's been ages that I've done algebra, and now I'm back in grad school, and I'm finding this equation in a homework. Can't remember ever seeing a rule of logarithms involving such expressions.

The actual homework (after simplification) involves $9 \le 2^r - r$ which is trivially solvable by just eyeballing it.

But is there a methodical way to solve $a \le b^r-r$ for $r$ given any arbitrary numbers $a$ and $b$?

share|cite|improve this question
up vote 9 down vote accepted

The case of equality can be solved in terms of the Lambert W function.

It can be used to solve equations of the form $$p^{ax+b} = cx + d$$

(quoted from the wiki page).

$b^{r} -r$ is 'mostly' monotonic, so I suppose solving the equality will be enough to find the solutions to your inequality.

share|cite|improve this answer
Holy cow, I'll have to brush on that one. Thanks! – luis.espinal Oct 19 '10 at 18:06

You can also get a quick-and-dirty approximation for the equality case with the following approach, which should hold in most situations when $a, b > 1$.

Rearrange the problem and take logarithms to rewrite it as $$\ln\left(1+ \frac{r}{a}\right) = r \ln b - \ln a.$$

Now, if $\frac{r}{a}$ is less than 1 (and it should be in most cases where $a, b > 1$),

$$\ln\left(1+ \frac{r}{a}\right) \approx \frac{r}{a},$$

which gives you $$r \approx \frac{- \ln a}{1/a - \ln b}.$$

For your specific problem, this method yields $r \approx 3.78$, whereas the actual answer is closer to $3.66$.

You can improve this by using the quadratic approximation

$$\ln\left(1+ \frac{r}{a}\right) \approx \frac{r}{a} - \frac{r^2}{2a^2},$$ which requires solving a quadratic equation.

(These approximations come from the Taylor expansion of $\ln (1+x)$.)

share|cite|improve this answer

If you don't have the W function, you need an iterative root finding type of solution. Note that for your example r is somewhere between 3 and 4. This equation is nicely behaved, so any of them will work. See Root finding for a start

share|cite|improve this answer
Hmmm, I was suspecting I'll have to use an iterative solution, but I was hoping to find a solution involving some form of algebraic manipulation. Oh well, at least now I'm on the right track. Thanks! – luis.espinal Oct 19 '10 at 18:07

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.