Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re : NIntegrate a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52959] Re : [mg52940] NIntegrate a list
  • From: "Jaccard Florian" <Florian.Jaccard at he-arc.ch>
  • Date: Sat, 18 Dec 2004 03:59:32 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello Aaron,

Don't mix up x and theta !

If you want to use NIntegrate, just use Evaluate :

In[9]:=
Integrate[x*Sin[x]*{1, 2}, {x, -Pi, Pi}]

Out[9]=
{2*Pi, 4*Pi}

In[12]:=
NIntegrate[Evaluate[x*Sin[x]*{1,2}],{x,-Pi,Pi}]

Out[12]=
{6.28319,12.5664}

Regards
 
F.Jaccard


-----Message d'origine-----
De : Aaron Fude [mailto:aaronfude at yahoo.com] 
Envoyé : vendredi, 17. décembre 2004 11:19
À : mathgroup at smc.vnet.net
Objet : [mg52940] NIntegrate a list

Hi,

I can Integrate this, but apparently not NIntegrate this:

Integrate[x*Sin[x]*{1, 2}, {theta, -Pi, Pi}]

but not

NIntegrate[x*Sin[x]*{1, 2}, {theta, -Pi, Pi}]

Is there a good way to do this (w/o writing loops)?

Many thanks!

Aaron Fude 


  • Prev by Date: Re: NIntegrate a list
  • Next by Date: Differentiate of Abs[x] ???
  • Previous by thread: Re : simply problem (not for me) about axes scale
  • Next by thread: Differentiate of Abs[x] ???