Re: defining a integer greater than one
- To: mathgroup at smc.vnet.net
- Subject: [mg117892] Re: defining a integer greater than one
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 2 Apr 2011 17:05:26 -0500 (EST)
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 at 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.