7
$\begingroup$

I have an expression which is simply

(j/k) x^(j/k) LerchPhi[x,1,j/k)] 

where 0 < j < k.

Manually I have been able (tedious work) to obtain only ArcTan's and ArcTanh's. How could I ask Mathematica to do this automatically in the most compact form ?

$\endgroup$
4
  • $\begingroup$ Clarify your question. What exactly do you intend to do with that expression? Simplify or what? $\endgroup$
    – RunnyKine
    Oct 26, 2013 at 9:00
  • $\begingroup$ @RunnyKine, I think the OP is looking for a generalisation of this. $\endgroup$ Oct 26, 2013 at 9:05
  • $\begingroup$ @SimonWoods. Ah I see. $\endgroup$
    – RunnyKine
    Oct 26, 2013 at 9:12
  • $\begingroup$ @RunnyKine. It is a kind of simplification. I have been able to do this by hand and arrived to quite nice linear combinations of ArcTan's and ArcTanh's. What I would like to learn is how to formulate the problem and get the most compact form of the result (ideally, one ArcTan and one ArcTanh, but linear combinations will be good). I am not very good (this is an understatement). $\endgroup$ Oct 26, 2013 at 9:18

1 Answer 1

9
$\begingroup$

This should get you started. For some reason Mathematica returns LerchPhi[x, 1, j/k] unevaluated if the third argument is a symbol. So let's assume $j = 1$ and $k = 4$ (it does meet your requirement $0 < j < k$ ).

Let's first define some complexity function:

cf[k_][e_] :=  k Count[e, _Log | _ArcCot | _ArcCoth, Infinity] + LeafCount[e]

Now we simplify:

FullSimplify[ FunctionExpand[(1/4) x^(1/4) LerchPhi[x, 1, 1/4]], 
              ComplexityFunction -> cf[#]] & /@ Range[4]
{1/2 (ArcTan[x^(1/4)] + ArcTanh[x^(1/4)]), 1/2 (ArcTan[x^(1/4)] + ArcTanh[x^(1/4)]),
 1/2 (ArcTan[x^(1/4)] + ArcTanh[x^(1/4)]),   1/2 (ArcTan[x^(1/4)] + ArcTanh[x^(1/4)])}

Looks like it converged fast to a nicely simplified expression in terms of only ArcTan and ArcTanh

1/2 (ArcTan[x^(1/4)] + ArcTanh[x^(1/4)])

Admittedly, for this lone case, FunctionExpand will do just fine, but if you're trying to generalize this, you'll need to use the ComplexityFunction. To see this try:

FunctionExpand[(1/8) x^(1/8) LerchPhi[x, 1, 1/8]]

You'll get your answer in terms of Log only

x^(1/8) ( -(Log[1 - x^(1/8)]/(8 x^(1/8))) 
          + (I Log[1 - I x^(1/8)])/(8 x^(1/8)) 
          - (I Log[1 + I x^(1/8)])/(8 x^(1/8)) 
          + Log[1 + x^(1/8)]/(8 x^(1/8)) 
          - ((-1)^(1/4) Log[1 - E^(-((I π)/4)) x^(1/8)])/(8 x^(1/8)) 
          + ((-1)^(3/4) Log[1 - E^((I π)/4) x^(1/8)])/(8 x^(1/8)) 
          - ((-1)^(3/4) Log[1 - E^(-((3 I π)/4)) x^(1/8)])/(8 x^(1/8)) 
          + ((-1)^(1/4) Log[1 - E^((3 I π)/4) x^(1/8)])/(8 x^(1/8)))

But if we apply our cf:

FullSimplify[FunctionExpand[(1/8) x^(1/8) LerchPhi[x, 1, 1/8]], ComplexityFunction -> cf[1]]

We obtain:

1/4 (ArcTan[x^(1/8)] + ArcTanh[x^(1/8)] - (-1)^( 3/4) (ArcTan[(-1)^(1/4) x^(1/8)] 
+ ArcTanh[(-1)^(1/4) x^(1/8)]))

Again, in terms of only ArcTan and ArcTanh.

$\endgroup$
9
  • $\begingroup$ This looks as magics ! It is almost what I am looking for.If I may ask : is it feasible to remove the roots of (-1) and use automatically the multiple angles formulas for ArcTan and ArcTanh ? This is what I made by hand. Thanks for you help to the old idiot. $\endgroup$ Oct 26, 2013 at 11:48
  • $\begingroup$ It does not seem to like (1/3) $\endgroup$ Oct 26, 2013 at 11:55
  • $\begingroup$ @ClaudeLeibovici. Hmmm, interesting. I wonder why. Looking into it. $\endgroup$
    – RunnyKine
    Oct 26, 2013 at 12:02
  • $\begingroup$ I do not know how to post a Word document to show you my formulas (if you are interested). In any manner, many thanks for your help from the old idiot ! $\endgroup$ Oct 26, 2013 at 13:41
  • $\begingroup$ @ClaudeLeibovici. I'm glad I could help. If you have a cloud storage you could upload it there and put a link to it here. $\endgroup$
    – RunnyKine
    Oct 26, 2013 at 13:49

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.