I am trying to simplify the following expression.

  Binomial[2 k, m] (1 + (-1)^m)/2 Beta[(1 + m)/2, (n - 2)/2] 
    (Gamma[(1 + m)/2] Gamma[1/2 (-1 + 2 k - m + n)])^2 , 
  {m, 0, 2 k}]

Before doing it, I first set the $Assumptions = {n ∈ Integers, k ∈ Integers}; since I know n and k are integers.

The answer I got from Mathematica v10 was rather complicated. However, one thing I found strange was that the solution contains Floor[k] and Ceiling[-k] that are clearly just k and -k since they are integers.

What is more strange thing is I get an error if I try to further simplify it. What is the precise way to achieve this goal?

  • $\begingroup$ Add Assumptions -> $Assumptions to your Sum[] $\endgroup$ – Dr. belisarius Sep 7 '14 at 0:05
  • $\begingroup$ Or encase the Sum in the Assumptions: `Assuming[$Assumptions, Sum[Binomial[2 k, m] (1 + (-1)^m)/2 Beta[(1 + m)/2, (n - 2)/2] (Gamma[(1 + m)/2] Gamma[1/2 (-1 + 2 k - m + n)])^2, {m, 0, 2 k}]] gives a simpler answer. $\endgroup$ – bill s Sep 7 '14 at 0:16
  • $\begingroup$ @belisarius Oh know, I thought I did't know I have to put such assumptions in each expression that I later evaluate. Then, what is the reason we set $Assumptions if we still have to put Assumptions to the expression? (PS. I tried your solution but I still habe a problem). $\endgroup$ – Sungmin Sep 7 '14 at 5:31
  • 3
    $\begingroup$ @bills Yes your suggestion really simplified my expression. Thank you. But I'm still quite confused. Why should I put such additional Assuming function even though I have already set $Assumptions? I've oberseved that $Assumptions worked quite well in my experience. Do you have a criteria that I should additionally put Assumption? $\endgroup$ – Sungmin Sep 7 '14 at 5:37
  • 3
    $\begingroup$ @bills This is strange. Surely using the Assumptions option to Sum, setting the global $Assumptions and using Assuming should all have the same effect? $\endgroup$ – Simon Woods Sep 7 '14 at 10:40

From the documentation, $Assumptions is the default setting for the Assumptions option used in such functions as Simplify, Refine, and Integrate.

It expects statements such as $Assumptions = a < 0 && b < 0}, using the wrong syntax $Assumptions = {n ∈ Integers, k ∈ Integers} actually breaks the use of Simplify.

The correct approach should have been

$Assumptions = $Assumptions && n ∈ Integers && k ∈ Integers

and then use FullSimplify.

As pointed out in the comments, there is no need to change the global definitions and you are better off by using

{n, k} ∈ Integers
    Binomial[2 k, m] (1 + (-1)^m) 2 Beta[(1 + m)/2, (n - 2) 2] (Gamma[(1 + m)/2] Gamma[1/2 (-1 + 2 k - m + n)])^2
    , {m, 0, 2 k}
  • $\begingroup$ +1, but I would say that the use of FullSimplify is optional. It simplifies only a little, while the main point is the syntax of $Assumptions. Also note that Assuming[{n ∈ Integers, k ∈ Integers}, $Assumptions] shows Assuming rewrites the assumptions by replacing List with And. $\endgroup$ – Michael E2 Dec 7 '14 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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