MathGroup Archive 2006

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

Search the Archive

sum up

  • To: mathgroup at
  • Subject: [mg69716] sum up
  • From: dimmechan at
  • Date: Thu, 21 Sep 2006 07:30:51 -0400 (EDT)


The last two-three days I posted some messages about some things that
they look strange (and not only to me).

In case somebody was lost and in view of Chris Chiasson's suggestion I
sum up my queries/findings.

Some of these questions have been answered a bit (actually it is these
answers that make me to deal more with) but I repost in case somebody
is interested.

1) Why built-in functions like Plot, Integrate and NIntegrate exhibit
listability although they do not have the Attribute Listable?

lst = {1/x, 1/x^2};
Integrate[lst, {x, 1, 2}]
{Log[2], 1/2}
NIntegrate[Evaluate[lst], {x, 1, 2}]
{0.693147180559947, 0.5000000000000211}
Plot[Evaluate@lst, {x, 1, 2}];
({#1, Attributes[#1]} & ) /@ {Integrate, NIntegrate, Plot}
{{Integrate, {Protected, ReadProtected}}, {NIntegrate, {HoldAll,
{Plot, {HoldAll, Protected}}}

To me (at least now) look more normal the behavior of

lst2= {1/x, 1/Sin[x]};

Both of these fail to produce Output (apart from the NIntegrate::inum

CauchyPrincipalValue[lst, {x, -1, {0}, 2}]
CauchyPrincipalValue[Evaluate[lst], {x, -1, {0}, 2}]

2) Why do the following commands fail to prevent the appearance of

Block[{Message}, NIntegrate[lst1, {x, 1, 2}]]
Block[{$Messages = {}}, NIntegrate[lst1, {x, 1, 2}]]

The relevant Plot::plnr message can be prevented from displaying.

Block[{Message}, Plot[lst, {x, 1, 2}]];
Block[{$Message = {}}, Plot[lst, {x, 1, 2}]];

3) Why the first (second) command below fails (succeeds) to provide

Block[{Message}, CauchyPrincipalValue[lst, {x, -1, {0}, 2}]]
Block[{$Messages = {}}, CauchyPrincipalValue[lst, {x, -1, {0}, 2}]]

4) From where all these "x" appear in the following list of sampled

Take[Reap[CauchyPrincipalValue[1/x, {x, -1, {0}, 2}, EvaluationMonitor
:> Sow[x], AccuracyGoal -> 20]][[2,1]], -12]
{1.7298614049356686, x, x, x, x, x, x, x, x, x, x, x}

That's all (I guess for know!).

I really appreciate any comments/insight.

Thanks in advance.

Dimitris Anagnostou

P.S1. In case someone wonders, all these questions appear in my attempt
to get more insight of Mathematica thanks to this forum and some amazing people
ready to answer you everything.
(In fact even how you can command Mathematica to make your dinner...).
I do not mention anyone, because there are so many and I do not want to
forget someone.

PS2. Nevertheless let me make just one exception and thank deeply
and from this position David Park. His comments/suggestions/advice
about the way I present my posts were invaluable.

  • Follow-Ups:
    • Re: sum up
      • From: "Chris Chiasson" <>
  • Prev by Date: Re: Re: attention 64 bit Mathematica users - would you please test a command for me?
  • Next by Date: Re: question about Block
  • Previous by thread: Re: does the following code shut down anyone else's kernel? - why?
  • Next by thread: Re: sum up