       Re: Assumptions in Integrate

• To: mathgroup at smc.vnet.net
• Subject: [mg20584] Re: [mg20562] Assumptions in Integrate
• From: BobHanlon at aol.com
• Date: Sat, 30 Oct 1999 14:54:57 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```Julian,

Integrate[Cos[n x], {x, -Pi, Pi}, Assumptions -> Element[n, Integers]]

(2*Sin[Sqrt[n^2]*Pi])/Sqrt[n^2]

Integrate[Cos[n x], {x, -Pi, Pi}, Assumptions -> n >= 0]

(2*Sin[n*Pi])/n

To get Mathematica to "evaluate" the Sqrt, it must believe that n is
nonnegative

Integrate[Cos[n x], {x, -Pi, Pi},
Assumptions -> {Element[n, Integers] , n >= 0}]

(2*Sin[n*Pi])/n

Integrate[Cos[n x], {x, -Pi, Pi},
Assumptions -> {Element[n, Integers] , n > 0}]

(2*Sin[n*Pi])/n

Bob Hanlon

In a message dated 10/30/1999 7:14:07 AM, mtpagesj at lg.ehu.es writes:

>   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.
>

```

• Prev by Date: Re: Zeta Function
• Next by Date: Re: Simlifying series expansion
• Previous by thread: Assumptions in Integrate
• Next by thread: Re: Assumptions in Integrate