Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1442 > unrolled thread

Re: defining a integer greater than one

Started byBob Hanlon <hanlonr@cox.net>
First post2011-04-02 22:05 +0000
Last post2011-04-02 22:05 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: defining a integer greater than one Bob Hanlon <hanlonr@cox.net> - 2011-04-02 22:05 +0000

#1442 — Re: defining a integer greater than one

FromBob Hanlon <hanlonr@cox.net>
Date2011-04-02 22:05 +0000
SubjectRe: defining a integer greater than one
Message-ID<in86iv$9tb$1@smc.vnet.net>
It is unlikely that the condition is nonsensical but rather that Mathematica is giving a result that is more general than you were expecting. Below it assumes that n can be complex until you say otherwise.

Integrate[x^(n - 2), {x, 0, 5}]

ConditionalExpression[5^(-1 + n)/(-1 + n), Re[n] > 1]

Integrate[x^(n - 2), {x, 0, 5}, Assumptions -> n > 1]

5^(-1 + n)/(-1 + n)

Assuming[{n > 1}, Integrate[x^(n - 2), {x, 0, 5}]]

5^(-1 + n)/(-1 + n)

Simplify[Integrate[x^(n - 2), {x, 0, 5}], n > 1]

5^(-1 + n)/(-1 + n)

Also, you can use compound assumptions such as      

Element[n, Integers] && n > 1

or

{Element[n, Integers], n > 1}


Bob Hanlon

---- Karina Erlang <karina.erlang@yahoo.de> wrote: 

=============
Hi,

I am new to Mathematica and cannot seem to achieve the following. I want to integrate an expression but Mathematica gives me a nonsensical if answer. (If Re(n)>1 then etc). How can I define n being greater than one before that integration. I can only achieve to make it an integer with the Element[] function. Thanks guys.


[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web