Re: NIntegrate a list
- To: mathgroup at smc.vnet.net
- Subject: [mg52961] Re: [mg52940] NIntegrate a list
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 18 Dec 2004 03:59:34 -0500 (EST)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
x is not numeric if the variable of integration is theta. Further, you need to
use Evaluate. Presumably, you meant
Integrate[x*Sin[x]*{1,2},{x,-Pi,Pi}]
{2*Pi, 4*Pi}
NIntegrate[Evaluate[x*Sin[x]*{1,2}],{x,-Pi,Pi}]
{6.283185307179588, 12.566370614359176}
Bob Hanlon
>
> From: "Aaron Fude" <aaronfude at yahoo.com>
To: mathgroup at smc.vnet.net
> Date: 2004/12/17 Fri AM 05:19:17 EST
> To: mathgroup at smc.vnet.net
> Subject: [mg52961] [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
>
>