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


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

Re: defining a integer greater than one

From Bob Hanlon <hanlonr@cox.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: defining a integer greater than one
Date 2011-04-02 22:05 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <in86iv$9tb$1@smc.vnet.net> (permalink)

Show all headers | View raw


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.


Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web