MathGroup Archive 2010

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

Search the Archive

Re: Strange behaviour of Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107592] Re: [mg107588] Strange behaviour of Plot
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 19 Feb 2010 03:32:37 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Your function is discontinuous at integer values of m since you set Summand2 to 0 for j=m. The continuous function that you plotted reflects the limit

Limit[2/((j - m)^2 d^2) (-3 + 
    Exp[-(((j - m)^2 d^2)/2)] (3 + 2 (j - m)^2 d^2)), j -> m]

1

So at the integer values of m you are subtracting 1 (using 0 rather than 1 for Summand2[m, m, d] ) and arriving at the negative values.


Bob Hanlon

---- "Very Bad Mother..." <shinytinkerbell at googlemail.com> wrote: 

=============
Hi,
I've found it quite puzzling. Pls, have a look.
I define the following functions:

Summand2[j_, m_, \[CapitalDelta]_] :=
  If[j == m, 0,
   2/((j - m)^2 \[CapitalDelta]^2) (-3 +
      Exp[-(((j - m)^2 \[CapitalDelta]^2)/2)] (3 +
         2 (j - m)^2 \[CapitalDelta]^2))];

sigma[m_, Nm_, \[CapitalDelta]_] := NSum[Summand2[j, m, \
[CapitalDelta]], {j, 0, Nm - 1}];

where j and m are supposed to be integers and \[CapitalDelta] to be a
"double" (in C-terms).
Now, I'd like to plot the sigma function:
Plot[sigma[m, 4, 6], {m, 0, 3}]
So, ofcourse, I obtain a plot of a continues function, for all ms
between 0 and 3. From this plot one can find that the values of sigma
for integers are positive and about 0.6. However, what is interesting,
if one evaluates explicitly sigma[m, 4, 6] for m=0, 1, 2, 3, one will
find that actually the values are negative about -0.3.
How is that possible? It's really confusing. Any help appreciated.
Thank you in advance,
--
Kind regards,
tinkerbell



  • Prev by Date: Nested list data extraction bottleneck
  • Next by Date: Re: Re: updating help
  • Previous by thread: Re: Strange behaviour of Plot
  • Next by thread: Re: Strange behaviour of Plot