Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

Sometimes I have very long and complicated equations, when I evaulate the equations for example taking derivative or integral there will be several conditions with the answer. My question is that; is there any way that I enter the conditions at the begining of the program so that so that it will not appear in the evaluation result?

I will give a simple example:

pdf = x^(L-1)/( γ^L Gamma[L]) Exp[(-x)/γ];
Re[L] > 0;

Integrate[ pdf, {x, 0, γ}]
ConditionalExpression[ (Gamma[L]-Gamma[L,1])/(Gamma[L]),  Re[L] > 0 ]

in the above example even if I write the condition which is Re[L] > 0, it will appear again at the result of evaluation.

share|improve this question
1  
Most likely you are looking for ways of imposing assumptions. This question is closely related: How to specify assumptions before evaluation? or simply a duplicate. –  Artes Sep 10 '13 at 10:38
    
thanks for the answers. my question is is specifically that; is there anyway to write conditions at the begining of the program so that you don't need every time repeat them with your equations. –  barznjy Sep 10 '13 at 11:25
1  
Have you read answers to the linked question? Namely you need $Assumptions = Re[L] > 0 and appropriately writing your integral. –  Artes Sep 10 '13 at 11:50
    
Hi Artes, that was the answer of my question. $Assumptions = Re[L] > 0 you can write all your conditions at the begining of the program like this: $Assumptions = Re[b] > 0 && Re[Sqrt[b]] > 0; by putting && between your conditions. Thanks –  barznjy Sep 10 '13 at 15:30
add comment

marked as duplicate by Artes, m_goldberg, István Zachar, Sjoerd C. de Vries, Mr.Wizard Sep 11 '13 at 0:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 2 down vote accepted

Yes, you can use Assuming, eg. for your particular example:

Assuming[{Re[L] > 0}, 
 Integrate[x^(L - 1)/(\[Gamma]^L Gamma[L]) Exp[(-x)/\[Gamma]], {x, 0, \[Gamma]}]]

This gives:

1 - Gamma[L, 1]/Gamma[L]

share|improve this answer
add comment
cdf = Integrate[pdf, {x, 0, \[Gamma]}, GenerateConditions -> False]
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.