Which of the numbers $99^{100}$ & $100^{99}$ is the larger? Solve without using logarithms.
Which of the numbers $99^{100}$ and $100^{99}$ is the larger one?
-
62Why do I have to solve it? Even more, why do *I* have to solve it without using logarithms? – 2012-01-28
-
6Python: `99**100 > 100*99 == True` – 2012-01-29
-
0@nightcracker: Was that a typo??! – 2012-01-29
-
0@cardinal: Actually yes, but it still gives you the answer (it returns `False` :P) – 2012-01-29
-
0@nightcracker: Except that it's true both with and without the typo, which indicates there's actually a second typo...or Python's doing something a little strange. – 2012-01-29
-
3Why all the upvotes? Maybe I should ask a similar (yet abstractly non-duplicate) question... – 2012-01-29
-
0@TheChaz: This question is currently at the top of the list of "hot questions" on the SE network. – 2012-01-29
-
9-1 This question has showed absolutely no effort whatsoever. @TheChaz I don't get the upvotes either. – 2012-01-29
-
5@cardinal: I should explain why @nightcracker's Python returns False. Python allows chained comparisons (`1 <= x < 9`), so it was interpreting `99**100 > 100**99 == True` as one of these. True has an integer comparison value of 1, so this is really `99**100 > 10**99 == 1`, which is false. `99**100 > 100**99` and `(99**100 > 10**99) == True` both return True as you'd expect. – 2012-01-29
-
0@cardinal: Thanks for the insight. It's not the end of the world, but sure reinforces the asking of "un-researched" questions. – 2012-01-29
-
0@DSM: Thanks. I don't use python really. In the interim, I saw that both of your latter examples worked and then tried `10 > 1 == True` and `10 > 2 == True`. The difference in returned values allowed me to deduce what must be happening. There must be some good reason they decided to allow this in the language specification, but it still strikes me as odd and, as in this case, error-prone. – 2012-01-29
-
6No one has explicitly said that the question is simply rude. Michael, using the imperative when asking for a favor will not pay in the long run. – 2012-01-29
-
0@TheChaz: More likely, it reinforces the asking of questions that seem "amazing" and "hard" to the (even pretty technically oriented) person with an average math background, but that have several fairly simple and elegant answers. – 2012-01-29
-
1@cardinal the reason why that's allowed is because chained expressions simplify a lot of things, while explicitly comparing booleans to True or False is something you shouldn't generally need to do anyway as `if condition == True:` is more verbose than `if condition:` for no good reason. – 2012-01-29
-
0in irb: `99**100 > 100**99 #=> true` – 2012-01-30
-
0Beronulli inequality kills this problem indeed ! :D – 2012-10-23
-
0I love this question, not because of the question, but the vast variety of answers you give (well you all give the same answer) but many of you have completely different methods, and I just love that about math. – 2014-09-09
8 Answers
Note that $$\begin{align} 99^{100} > 100^{99} &\iff 99 \cdot 99^{99} > 100^{99} \\ &\iff 99 > (100/99)^{99} \\ &\iff 99 > \left( 1 + \frac{1}{99}\right)^{99} \end{align}$$
Since $(1 + \frac{1}{n})^n < 3$ for all integers $n$, the above inequalities are all true. Thus, $99^{100} > 100^{99}$. In general, you should expect that $x^y > y^x$, whenever $y > x$.
-
3it holds when $x>2$ – 2012-01-28
-
8Mr. Man, sir, can you please cite where $(1 + \frac{1}{n})^n < 3$ comes from, or prove it, or something? I'm Rusty on this sort of thing. – 2012-01-29
-
7@EdStaub: The inequality comes from the calculation of e. e=2.7(ish), and is defined as the limit of that equasion, as n= infinity. – 2012-01-29
-
4@EdStaub: Expanding $(1 + \frac{1}{n})^n$ using the binomial theorem, it is enough to show $\frac{1}{2!} + \frac{1}{3!} + \dots + \frac{1}{n!} < 1$. But this follows immediately since $n! \geq 2^{n-1}$ for positive integers $n$ (which you can prove by induction), and hence $$\sum_{k =2}^n \frac{1}{k!} \leq \sum_{k=2}^n \frac{1}{2^{n-1}} < 1$. Adding $2$ to both sides gives the result. There are many places where you can read more (by googling "limit definition of e"), say for example, here: http://www.physicsforums.com/showthread.php?t=176076 – 2012-01-29
-
0$\lim_{x \rightarrow 0} e^x-1 = x$. From there, you can get the inequality that $\lim_{x \rightarrow \infty}\left(1 + \frac{1}{x} \right)^{x} =e$ and since it is monotonically increasing function inside the limit, you have that it is true for $x$. – 2012-01-29
-
1@Jalaj $\lim\limits_{x\to 0}e^x-1=0$, not $x$. – 2012-01-29
-
0Sorry, I meant $\lim_{x \rightarrow 0}\frac{e^x-1}{x}=1$. A sheer example of negligence on my part. – 2012-01-29
-
1@ratchet freak: Assuming "it" is $x^y > y^x$ for $y > x$, that would be true for $x \ge e$, not for $x > 2$. – 2012-01-29
-
0@RobertIsrael if you say $x,y \in \mathbb{N}$ then $x>2$ suffices – 2012-01-29
-
7@Pearsonartphoto: no it doesn't. What you get from the calculation of $e=2.71828\dots$ is that there is an $N$ so that for $x>N$, $\left(1+\frac1x\right)^x<3$. However, what happens for $x\le N$? – 2012-01-29
-
0@robjohn: $\left(1+\frac1x\right)^x$ is an increasing function of $x$ so you can take $N=0$ – 2012-02-07
-
1@Henry: my comment was to point out that the fact that $\lim\limits_{n\to\infty}\left(1+\frac1n\right)^n=e<3$ does not give a clue as to $\max\limits_{n\in\mathbb{N}}\left(1+\frac1n\right)^n$. – 2012-02-07
$99^{100} - 100^{99}$ is:
3560323412732295049306160265725173861897
1207663892369140595737269931704475072474
8187196543510026950400661569100652843274
7182356968017994158571053544917075742738
9035006098270837114978219916760849490001
Since this number is positive, $99^{100}$ is the bigger number.
-
33Nice reminder that the world has changed since I first did mathematics. – 2012-01-29
-
15@AndréNicolas I suppose it doesn't use logarithms... – 2012-01-29
-
1@Matt...uh, why would it? The first term can be calculated with 7 integer multiplications and the second can be done in 8. – 2012-01-29
-
2@cardinal Maybe I misinterpreted what AndréNicolas said, but I meant my comment more as a joke than anything; although this method is certainly not what would be expected and doesn't give any insight into which is bigger, it's still 'correct' and doesn't use logarithms. – 2012-01-29
-
0@Matt: I see. I probably misinterpreted your comment then, which I thought might be an ironic one implying logarithms were almost certainly used in the calculation. Sorry about that. Cheers. – 2012-01-29
-
20@Matt, technically correct is the best kind of correct. – 2012-01-29
-
16So, Hammerite, is $999999^{1000000}$ larger than $1000000^{999999}$? – 2012-01-29
-
8@Myself - Yep, http://www.wolframalpha.com/input/?i=999999%5E1000000+%3E+1000000%5E999999. Might have to give it a few seconds ;) – 2012-01-29
-
6"...Since this number is positive...": as Orwell could have said, many numbers are positive but some are more positive than others... – 2012-01-29
A purely math solution: Using AM-GM inequality:
$$(x+1)^x\times \frac{x}{2} \times \frac{x}{2} < (\frac{x(x+1)+x}{x+2})^{x+2}=x^{x+2}$$
Therefore
$$(x+1)^x < 4x^x$$
And easily we see that $(x+1)^x< x^{x+1}$ for any $x\ge 4$.
-
10"purely math solution" as opposed to? – 2012-01-29
-
2In this case, it's no computation. In general, it's just personal sense. Since the question is pretty easy with calculus, I expected that an "elementary" solution (secondary-school) is a best fit. – 2012-01-29
-
1@GeorgesElencwajg I don't see how using a hand calculator, as say I did in my answer, doesn't come as something check-able. Or for that matter if we calculate $99^{100}$ by multiplying 99s out on paper, it only involves 100 multiplications. Sure, that's several sheets of paper and probably takes a few hours to do, but we *could* all do that before we die *if* we had the persistance and desire to do so. – 2012-01-29
-
3@Doug: But why would we want to do such a thing, since (a) this is most boring, (b) using our brain a few seconds would solve the question and would furthermore suggest easy generalizations? – 2012-01-29
-
0@Doug: As mentioned in a comment hidden under the fold of another answer, the explicit calculation can be done in under ten multiplications for each term. So, if you're masochistic but still not *that* masochistic... :) – 2012-01-29
-
0@DidierPiau If we didn't trust our calculating machines, and we wanted to know how much greater one of the numbers is than the other, doing such a calculation by hand might make sense. – 2012-01-30
-
1@Doug: If I didn't trust my calculating machines, and I wanted to know how much greater one of the numbers is than the other, I would **much** prefer to know that $(x+1)^x=\varrho(x)x^x$, where the function $x\mapsto \varrho(x)$ is increasing on $x\geqslant1$ from $\varrho(1)=2$ to $\varrho(+\infty)=\mathrm e$. The proof is easier to check and the result is more informative. – 2012-01-30
-
0@DidierPiau Sorry, I don't follow. How does that method tell us how much different the numbers are? – 2012-01-30
-
1@Doug: The ratio between $(x+1)^x$ and $x^{x+1}$ is $\varrho(x)/x$, hence, between $2/x$ and $\mathrm e/x$ for every $x\geqslant1$, and even between $9/(4x)$ and $\mathrm e/x$ for every $x\geqslant2$. For example, this proves that the ratio $100^{99}/99^{100}$ is between $0.02272727$ and $0.02745739$ without knowing the values of $100^{99}$ and $99^{100}$. This even suggests that this ratio is much closer to the latter value than to the former (to wit, the actual ratio is $0.02731999$). – 2012-01-30
$x^{x+1}=x x^x$ while for large $x$, $(x+1)^x\sim e x^x$. Since $99>e$, I would say that $99^{100}>100^{99}$.
More Detail:
To show that $(x+1)^x=\left(1+\frac1x\right)^xx^x
-
1Is your approximation here necessarily an over or under approximation? If not, then how do you have anything more than a good guess? – 2012-01-29
-
2$$\frac{(x+1)^x}{x^x}=\left(1+\frac{1}{x}\right)^x
0$. – 2012-01-29 -
1@Doug: At least for natural $x$, we can show monotonicity simply with the binomial theorem. I have added the details. – 2012-01-29
-
1@robjohn I've now upvoted your answer, since the details can help here, while the older version didn't help much. – 2012-01-29
Proof that $x^y > y^x$ for all $y > x > e$: Raising both sides to the ${1 \over xy}$ power, this is equivalent to $x^{1 \over x} > y^{1 \over y}$. The derivative of $x^{1 \over x}$ with respect to $x$ is ${\displaystyle {1 - \ln(x) \over x^2} x^{1 \over x}}$, which is negative whenever $\ln(x) > 1$ i.e. when $x > e$. Thus $x^{1 \over x}$ is a decreasing function of $x$ for $x > e$.
Yeah I know, I used logarithms. But someone needed to say this ;)
I cheat and use a basic fact about $e$.
$${99^{100}\over 100^{99}} = 99\left({99\over 100}\right)^{99}\approx {99\over e} > 1.$$
-
0Nice cheat, what is the general formula for this fact about $e$ please? Thanks. – 2012-01-29
-
1For large $n$, $(1 + \lambda/n)^n \sim e.$$ – 2012-01-29
-
2@ncmathsadist Your comment has a small typo. Surely, you meant to write either $(1 + \lambda/n)^n \sim e^{\lambda}$ or $(1 + 1/n)^n \sim e$. – 2012-01-29
-
0Yes, $(1 + \lambda/n)^n \sim e^\lambda$ – 2012-01-29
-
6Somebody should probably mention that such asymptotics, per se, can give NO information about the $n$th term of a sequence, even for $n=99$, hence the (true) basic fact used here CANNOT prove the desired inequality. – 2012-01-29
-
0That'd be true, but I think the approximation is illuminating. It is not terribly hard to establish that for any $n$, $2\le (1 + 1/n) \le 3$. Massage this a bit and it will make the argument airtight. – 2012-01-29
-
3Starting from $2\le1+1/n\le3$, I doubt one can go far. And if you wish to use $(1+1/n)^n\le3$ for every $n$, then mention it... – 2012-01-30
$100^{99}$=$(10*10)^{99}$=$(10^{99})(10^{99})$=$10^{198}$ exactly.
$99^{100}$=$(9*11)^{100}$=$(9^{100})(11^{100})$ exactly. My "hand" calculator approximates $9^{100}$ as about $(2.656)(10^{95})$.
11=(2)(2)(2.75).
$2^{100}$ equals about (1.267)($10^{30}$), $2.75^{100}$ equals about (8.575)($10^{43}$). Dropping the coefficients here we can thus approximate ($11^{100}$) by a lower bound of ($10^{30}$)($10^{30}$)($10^{43}$)=$10^{103}$.
Keeping the coefficients on the approximation of $9^{100}$ we have a lower bound for $99^{100}$ as $(2.656)((10^{95}$)($10^{103}$))=(2.656)($10^{198}$) which comes as greater than $10^{198}$.
So, $99^{100}$>$100^{99}$.
Note that if we kept the coefficients in here, we would also have more of an idea as to how much greater $99^{100}$ is than $100^{99}$. Some of the other answers do this, some don't. This doesn't necessarily make this answer better though, since such information might come as extraneous to the problem.
From experimenting with small numbers:
scala> (0 to 5).map (x=> (math.pow (x, x+1) - math.pow (x+1, x))).mkString ("; ")
res18: String = -1.0; -1.0; -1.0; 17.0; 399.0; 7849.0
scala> (0 to 5).map (x=> (math.pow (x, x+1), math.pow (x+1, x))).mkString ("; ")
res19: String = (0.0,1.0); (1.0,2.0); (8.0,9.0); (81.0,64.0); (1024.0,625.0); (15625.0,7776.0)
you can conclude, that the first one is growing faster than the second. Of course this is only an indication.
-
0Do you have computer code in this answer? I simply don't know how to interpret "scala> (0 to 5).map" and the like. – 2012-01-30
-
0@DougSpoonwood: Yes, Scala code. (0 to 5) creates a Range, a collection of the numbers (0, 1, ..., 5). The `map (x =>` takes each of them, and puts them, named `x`, into a function, math.pow (x, x+1) - ... so for the first element it is math.pow (0, 0+1) or 0^(1), then 1^2, 2^3 and so on minus 1^0, then 2^1, 3^2 and so on. mkString is only used for formatting the output a bit. (3^4-4^2) = 81.0-64.0 = 16 – 2012-01-30