Seeking a compact expression in a model.

• To: mathgroup at smc.vnet.net
• Subject: [mg48940] Seeking a compact expression in a model.
• From: gilmar.rodriguez at nwfwmd.state.fl.us (Gilmar Rodr?guez Pierluissi)
• Date: Thu, 24 Jun 2004 05:36:07 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Greetings Mathematica User Group!

In[1]: \!\(\(points = {{10, 2}, {
10\^2, 6}, {10\^3, 28}, {10\^4, 127}, {
10\^5, 810}, {10\^6, 5402}, {10\^7, 38807}, {10\^8, 291400},
{
10\^9, 2274205}};\)\)

In[2]: << Statistics`NonlinearFit`

In[3]:  \!\(BF[n_] = NonlinearFit[
points, a\_1 + a\_2*n + ß\_1*Log[n]*n\  +
ß\_2*Log[Log[n]]*n + ß\_3*Log[Log[Log[n]]]*n +
ß\_4*Log[Log[Log[Log[
n]]]]*n + ß\_5*Log[Log[Log[Log[Log[n]]]]]*
n + ß\_6*Log[Log[Log[Log[Log[Log[n]]]]]]*n + ß\_7*Log[Log[Log[
Log[Log[Log[Log[n]]]]]]]*n, {n}, {a\_1, a\_2, ß\_1,
ß\_2, ß\_3, ß\_4, ß\_5, ß\_6, ß\_7}]\)

To get a glimpse of the above Non-linear Fit do:

In[4]: << Graphics`Graphics`

In[5]: plt1 = LogLogListPlot[points, ImageSize -> 800, GridLines ->
True, PlotStyle -> {RGBColor[0, 0, 1]}, Frame ->
True];

In[6]: plt2 = LogLogListPlot[Table[{points[[n]][[1]],
Re[BF[points[[n]][[1]]]]}, {n, \
1, 9}], ImageSize -> 800, GridLines -> True,
PlotJoined -> True, PlotStyle -> \
{RGBColor[1, 0, 0]}, Frame -> True];

In[7]: Show[plt1, plt2]

Now; I'm attempting to find a shorter expression for the above
convolution of Log[x],
that would works in conjunction with  NonlinearFit.  So, I tried:

In[8]:   \!\(term = First[
ListConvolve[{ß\_7, ß\_6, ß\_5, ß\_4, ß\_3, ß\_2, ß\_1},
Drop[NestList[Log, n, 7], 1]]]\)

In[9]:   \!\(BF2[n_] = NonlinearFit[points, a\_1 + a\_2*n + term*n,
{n}, {a\_1,
a\_2, ß\_1, ß\_2, ß\_3, ß\_4, ß\_5, ß\_6, ß\_7}]\)

and I found that this shorter way also works.

My question is; is there a more elegant way to do the above
NonLinearFit that doesn't
involve having to use ListConvolve and NestList?

\!\(\(\( (*\(\(*\)\(\ \)\(Define\)\(\ \)\(Log\_\(\([\)\(1\)\(]\)\)[
n]\)\)\  = \
Log[n], \ Log\_\(\([\)\(2\)\(]\)\)[n] = Log[Log[n]], \
Log\_\(\([\)\(3\)\(]\)\)[n] = Log[Log[Log[
n]]], \  ... \ , Log\_\(\([\)\(i\)\(]\)\)[n] =
Log[Log[Log[\(\(...\) \
\(Log[n]\)\) ... ]]], \
i . e . \ this\ last\ term\ is\ obtained\ by\ convolving\ Log[n],
\
i\ \(\(times\)\(.\)\)\ \ \ \ \ \ \ \ \ \ \ \ \ \ **) \)\(\ \
\)\)\)

I'm looking for a short expression like:

\!\(\(\(\ \ \ \ \ \ \ \ \)\(BF[n_] = NonlinearFit[points, a\_1 + a\_2*
n\  + \((\(\(?\(\(ß\_i\)\(*\)\)\)\+\(\(\ \)\(i\  = \ 1\)\)\%9\) \
Log\_\(\([\)\(i\)\(]\)\)[
n])\)*n, {n}, {a\_1, a\_2, ß\_1, ß\_2, ß\_3, ß\_4,
ß\_5, ß\_6,
ß\_7}]\)\)\)

Unfortunately; this last form does not work.

If the above command lines are not translating faithfully when you
copy paste