16
$\begingroup$

I'm often troubled with the following task. I need to carry out symbolical computations involving certain special functions. Let me take as an example Barnes gamma-function. It is included in Mathematica's standard tools under the name of BarnesG[x]. However, Mathematica often does not deal with it efficiently. For instance, there is an identity stating BarnesG[1+x]=Gamma[x]BarnesG[x] where Gamma[x] is Euler gamma function. Mathematica does not seem to "know" it. Execution of

Simplify[ BarnesG[1 + x] - Gamma[x] BarnesG[x]] 

results in no real simplification.

What is the most efficient way to "teach" Mathematica such kind of identities?

The only tool that I'm aware of is to create a corresponding transformation function and then use it in the process of simplification. In the case under discussion transformation function would be

tf[e_] := e /. {BarnesG[1 + x_] :> Gamma[x] BarnesG[x]};

Then evaluation of

Simplify[ BarnesG[1 + x] - Gamma[x] BarnesG[x], TransformationFunctions->{Automatic,tf}]

indeed gives zero. However, it does not help to work with numerical values. For example I still have no simplification for

Simplify[ BarnesG[7/6] - BarnesG[1/6] Gamma[1/6], 
          TransformationFunctions -> {Automatic, tf}]

So my questions are

  1. What is the most convenient way of solving my problem?
  2. If the one that I'm already using is OK, then how to extend it to numerical computations?
  3. A little bit off topic: how can I bring Mathematica to use new transformation function by default in opposite to explicit indication for this in every Simplify command?

Any help is appreciated/ I'm sorry if I won't be quick enough with my replies.

$\endgroup$
1
  • 2
    $\begingroup$ There are typos in your code, sometimes you use Barnes[x] instead of BarnesG[x]. $\endgroup$
    – rcollyer
    Sep 30, 2013 at 13:31

1 Answer 1

18
$\begingroup$

If you modify your TransformationFunction so that it considers numerical values as a special case, you can get both of your examples to work

In[1]:= tf[e_] := 
 e /. {BarnesG[x_?NumberQ /; x > 1] :> Gamma[x - 1] BarnesG[x - 1], 
   BarnesG[1 + x_] :> Gamma[x] BarnesG[x]}

In[2]:= Simplify[BarnesG[1 + x] - Gamma[x] BarnesG[x], 
 TransformationFunctions -> {Automatic, tf}]

Out[2]= 0

In[3]:= Simplify[BarnesG[7/6] - BarnesG[1/6] Gamma[1/6], 
 TransformationFunctions -> {Automatic, tf}]

Out[3]= 0
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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