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