2
$\begingroup$

I was recently lecturing on the hierarchy of functions in a calculus class. Discussing the fact that eventually any exponential growth function will overcome any polynomial. As an example, I tried asking Mathematica the following:NSolve[q^800 + 4000000 == (1000001/1000000)^q, q, Reals] and it completely choked.

Honestly, I'm only interested in the order of magnitude of the answer, so that I can say, "The exponential doesn't exceed the polynomial until you input ???-digit numbers, but eventually it does happen."

How can I get Mathematica to solve this just to an order of magnitude, i.e. how do I get Mathematica to just provide a really gross estimate?

$\endgroup$
1
  • 1
    $\begingroup$ Maybe take a Log of both sides and use FindRoot? Maybe plot the function out near where you think the crossing is and use that as an estimate for FindRoot? $\endgroup$ – march Sep 16 '15 at 16:53
7
$\begingroup$

Following up on my comment, here's something that works, thought not automatically. Taking advantage of the monotonicity of the logarithm, we do

Table[
  Plot[{Log[q^800 + 4000000], q Log[1000001/1000000]}, {q, 10^k, 10^(k + 1)}]
  , {k, 7, 10}
]~Partition~2 // Grid

resulting in

enter image description here

It looks like q is about 20 billion, and so

FindRoot[Log[q^800 + 4000000] == Log[(1000001/1000000)^q], {q, 2*10^10.}]
(* {q -> 1.89313*10^10} *)

Alternatively, still take the logarithms (to avoid overflow issues, I think), but do a LogLinearPlot:

LogLinearPlot[{Log[q^800 + 4000000], q Log[(1000001/1000000)]}, {q, 0.1, 10^12}]

resulting in

enter image description here

Then approximate the crossing by eye, and either you're done or you feed it FindRoot as above.

$\endgroup$

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.