12
$\begingroup$

I have searched stackoverflow (and comparable pages) for quite a while now (got redirected from there to this specialized stack), and I surrender. I am trying to evaluate an expression that is small in the end numerically.

Example:

Log[Log[Log[6^5^4^3^2^1]]]=12.9525...

WolframAlpha has no problem evaluating these values for (any/a very high) amount of exponents (I tried it up to 20). I guess it is possible to achieve this in Mathematica aswell?

I tried Hold, Defer etc, as described in
https://stackoverflow.com/questions/1616592/mathematica-unevaluated-vs-defer-vs-hold-vs-holdform-vs-holdallcomplete-vs-etc
Hoever none of these did what I hoped for. Is it a matter of explaining Mathematica the rules of logarithms?

FullSimplify[Log[x^b], x>0 && b>0]

expands it nicely, however that is not what I want (I have explicit numbers). Is there any way to perform the calculations WolframAlpha performs with mathematica (obviously avoiding the WolframAlpha Output Operator ;)) ?

Is there some Option/Assumption etc I have overlooked?


For this specific question there is a recursive algebraic solution: $$ n^{(n-1)^{...^1}}=e^{\log(n)*(n-1)^{...^1}} $$ and so on, remove a bunch of e-s at the end. I guess Wolfram|Alpha uses this. I would still like to know if theres a true Mathematica solution to this.

$\endgroup$
4
  • 1
    $\begingroup$ tt = Log[Log[Log[6^5^4^3^2^1]]] // HoldForm; and tt /. Log[a_^b_] -> b Log[a] // Release // N does provide you with the answer? $\endgroup$
    – chris
    Oct 18, 2012 at 20:01
  • $\begingroup$ Probably not quite what you are looking for, but maybe a start: PowerExpand[Log[Log[Log[a^b^c^d^e^f]]]] /. {a -> 6, b -> 5, c -> 4, d -> 3, e -> 2, f -> 1} $\endgroup$
    – chuy
    Oct 18, 2012 at 20:27
  • $\begingroup$ @chris, oh yes it does, problem consists of something else now (see below); thank you! $\endgroup$
    – CBenni
    Oct 18, 2012 at 21:34
  • 1
    $\begingroup$ I posted a related question on Mathematics $\endgroup$ Oct 19, 2012 at 15:32

2 Answers 2

3
$\begingroup$

For example you could do:

rules = {Log[x_ y_] :> Log[x] + Log[y], Log[x_^k_] :> k Log[x]};
N[Defer@Log[Log[Log[6^5^4^3^2^1]]] //. rules]
(*
--> 12.9525
*)

But you should be aware that it doesn't work ad-infinitum because your expression stops transforming after you get to

$\log \left(\log (5) 4^{3^{2^1}}+\log (\log (6))\right)$

Edit

I posted a related question in Mathematics (no full answer yet)

$\endgroup$
2
  • $\begingroup$ Works wonderfully! The Problem got delayed a bit (but hey, thanks for your help!). I have n^...^1 defined as a function a[n_]:=n^a[n-1] ofcourse, this wont expand to 6^5^4^3^2^1 for a[6], instead it will produce an overflow. I will have to try to get a[6] to evaluate to the Power tower and then I should be fine $\endgroup$
    – CBenni
    Oct 18, 2012 at 21:20
  • $\begingroup$ That wasnt too hard lol: b[n_]:=HoldForm[n]^b[n-1] great success! Damn, Problem still not solved. For n>=8, I still receive overflows. -.- $\endgroup$
    – CBenni
    Oct 18, 2012 at 21:35
1
$\begingroup$

An alternative could be

Block[{Power, Log},
 Log[Log[Log[6^5^4^3^2^1]]] // PowerExpand]

Log[262144 Log[5] + Log[Log[2] + Log[3]]]

% // N

12.9525

Still gives overflows, it's equivalent to @belisarius's

Also,

Log[Log[Log[6^5^4^3^2^1]]] // Hold // PowerExpand // ReleaseHold
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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