       Re: Re: Assumptions in Integrate

• To: mathgroup at smc.vnet.net
• Subject: [mg20594] Re: [mg20579] Re: [mg20562] Assumptions in Integrate
• From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
• Date: Tue, 2 Nov 1999 02:35:29 -0500
• Sender: owner-wri-mathgroup at wolfram.com

```Looking at this again I noticed another problem. The answer given by
Mathematica isn't true for n=0, so there is a bug in Simplify. The correct
command should have been:

In:=
Simplify[Integrate[Cos[n x], {x, -Pi, Pi},
Assumptions -> Element[n, Integers]], Element[n, Integers] && n != 0]
Out=
0

Note however that the following does not work, though it should:

In:=
Integrate[Cos[n x], {x, -Pi, Pi},
Assumptions -> Element[n, Integers] && n != 0]
Out=
2
2 Sin[Sqrt[n ] Pi]
------------------
2
Sqrt[n ]
--

> From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
> Date: Sat, 30 Oct 1999 14:54:54 -0400
> To: mathgroup at smc.vnet.net
> Subject: [mg20594] [mg20579] Re: [mg20562] Assumptions in Integrate
>
> I also think the Assumptions mechanism in Integrate leaves a lot to be
> desired. Probably the best thing one can do right now is something like:
>
> In:=
> Simplify[Integrate[Cos[n x], {x, -Pi, Pi},
> Assumptions -> Element[n, Integers]], Element[n, Integers]]
>
> Out=
> 0
> --
>
>
>> From: Julian Aguirre Estibalez <mtpagesj at lg.ehu.es>
To: mathgroup at smc.vnet.net
>> Organization: Universidad del Pais Vasco/Euskal Herriko Unibertsitatea
>> Date: Sat, 30 Oct 1999 00:14:09 -0400
>> To: mathgroup at smc.vnet.net
>> Subject: [mg20594] [mg20579] [mg20562] Assumptions in Integrate
>>
>> Dear Math Group,
>>
>> I find the results of using assumptions in Integrate somewhat
>> stranege. For instance,
>>
>> In:= Integrate[Cos[n x], {x, -Pi, Pi}]
>>
>> Out= 2 Sin[n Pi]
>> -----------
>> n
>>
>> In:= Integrate[Cos[n x], {x, -Pi, Pi},
>> Assumptions -> Element[n, Integers]]
>>
>> Out=
>> 2
>> 2 Sin[Sqrt[n ] Pi]
>> ------------------
>> 2
>> Sqrt[n ]
>>
>> In:= \$Version
>>
>> Out= "4.0 for Power Macintosh (July 20, 1999)"
>>
>> I know I can define my own transformation rules, but one would
>> think that Mathematica should do it directly.
>>
>> Julian Aguirre            | Voice:  +34 946012659
>> Departamento de Matematicas    | Fax:    +34 944648500
>> Universidad del Pais Vasco    | Postal: Aptdo. 644, 48080 Bilbao, Spain
>> | email:  mtpagesj at lg.ehu.es
>>
>>
>
>

```

• Prev by Date: FourierTransform
• Next by Date: Re: Re: Combinatorica questions!!!
• Previous by thread: Re: FourierTransform
• Next by thread: Mathematica 4.0 NIntegrate