Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Plot[(1 + 10^(-k))^(10^k), {k, 2, 9}]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27469] RE: [mg27427] Plot[(1 + 10^(-k))^(10^k), {k, 2, 9}]
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.de>
  • Date: Tue, 27 Feb 2001 00:37:21 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

for my answer see below

-----Original Message-----
From: Hu Zhe [mailto:huzhe at public3.sta.net.cn]
To: mathgroup at smc.vnet.net
Subject: [mg27469] [mg27427] Plot[(1 + 10^(-k))^(10^k), {k, 2, 9}]



Hi,
I happen to execute:
Plot[(1+10^(-k)^(10^k), {k, 2, 9}]
It looks fine if you change  {k, 2, 9} to {k, 2, 3}, but otherwise the 
plot is absurd.
Since
Limit[(1+10^(-k)^(10^k), k->Infinity]==E
may I ask what's wrong with my Mathematica 4.0 on MMX 166 ?
Sincerely,
Hu Zhe

-------------------
The "absurd" data are the result of missing precision. Although you
specified your expression to be plotted exacly, Plot will insert machine
precision values for the argument k.

compare:

In[8]:= f[k_] := (1 + 10^(-k))^(10^k)
In[9]:= Plot[f[k_], {k, 8., 8.1}]

This is a narrow window on the erratic function values plotted

In[10]:= ListPlot[Table[f[k], {k, 8., 8.1, 0.001}], 
  PlotJoined -> True]

This also happens with Table values (of machine precision),
but not so with increased precision:

In[11]:= ListPlot[Table[f[k], {k, 8.`16, 8.1`16, 
    0.001`16}], 
  PlotJoined -> True]

Now considering the plot you (presumably) got:

In[12]:= Plot[f[k], {k, 2, 9}]

After having taking into account for the automatic plot range 
adaption this may be compared to

In[14]:=
ListPlot[Table[{k, f[k]}, {k, 6.5, 9, 0.01}], 
  PlotJoined -> True, PlotRange->{{5.5,9},Automatic}]


Now, if you specify a precision of at least 5 decimals, this graph will 
look quite more pleasing:

In[15]:=
ListPlot[Table[{k, f[k]}, {k, 6.5`5, 9, 0.01`5}], 
  PlotJoined -> True, PlotRange->{{5.5,9},Automatic}]

A perhaps better method, that keeps arbitrary precision within 
Plot is from Ted Ersek (I hope, I remember right), you might like 
to search at Wolfram's MathSource.


(This is Ted's home page:
Download Mathematica tips, tricks from 
http://www.verbeia.com/mathematica/tips/Tricks.html)


-- Hartmut Wolf



  • Prev by Date: Re: Editing formulas for the web
  • Next by Date: Re: Integrate a matrix-function
  • Previous by thread: Re: Plot[(1 + 10^(-k))^(10^k), {k, 2, 9}]
  • Next by thread: Deriviation d/dt(x(t))