# Expansion of functions in the real domain

When I try

FullSimplify[FunctionExpand[x^(1/12)(1/12) LerchPhi[x,1,1/12]]]


I have a nice answer with many complex numbers.

Is there any way to have the expression with just real terms ? As an example, changing (1/12) by (1/4) leads to beautiful results.the argument "x" is real and (value between 0 and 1).

• So is the question about for which values of the parameters your function is real valued for real x ? Aug 3, 2013 at 8:18
• @Nasser ; the result is a real number. I gave the case of (1/4) because of its beauty. Aug 3, 2013 at 9:43
• The result of your expression is complex, not real, if $x>1$.
– Jens
Aug 3, 2013 at 18:48
• @Jens He does state that the x has a value in the interval (0, 1). Aug 3, 2013 at 18:59
• @Mr.Wizard Oh yes, I missed that. Anyway, Mathematica can't be expected to know that...
– Jens
Aug 3, 2013 at 19:04

A combination of ComplexExpand and FullSimplify can get you an expression without any complex terms:

FullSimplify[
ComplexExpand[
FunctionExpand[x^(1/12) (1/12) LerchPhi[x, 1, 1/12]],
TargetFunctions -> {Re}],
0 < x < 1]

(* 1/24 (-2 Sqrt[3] ArcCot[(1 - 2/x^(1/12))/Sqrt[3]] -
2 ArcCot[Sqrt[3] - 2/x^(1/12)] +
2 Sqrt[3] ArcCot[(1 + 2/x^(1/12))/Sqrt[3]] +
2 ArcCot[Sqrt[3] + 2/x^(1/12)] +
2 Sqrt[3] ArcCoth[(1 + x^(1/6))/(Sqrt[3] x^(1/12))] +
4 ArcTan[x^(1/12)] +
Log[3/(-1 + x^(1/12))^2 - 2/(1 - x^(1/12) + x^(1/6))] +
2 Log[1 + x^(1/12)])  *)

• @Simon : as you understood, Iam not a cleaver user of MMa. The result you sent me is a perfect illustration of my problems (in a general manner). How can I simplify such above expression using the rules such as ArcTan[a]+ArcTan[b]=..., Log[a]+Log[b]=... ? Thanks for helping the old dinosaure ! Aug 3, 2013 at 15:57
• @Simon: how could I define rules in order that the result be just a linear combination of ArcTan's and ArcTanh's ? Aug 4, 2013 at 13:59
• @ClaudeLeibovici, for fine control over the form of the expression I think you will have to supply explicit transformation rules, e.g. % /. {ArcCot[a_] :> ArcTan[1/a], ArcCoth[a_] :> ArcTanh[1/a], Log[a_] :> 2 ArcTanh[(-1 + a)/(1 + a)]} Aug 4, 2013 at 18:40
• @SimonWoods, I am sorry for my ignorance. Where do I write what you say ? Currently, I work what you sent me by hand and it is a nightmare ! Thanks for your help. Aug 5, 2013 at 2:50
• @ClaudeLeibovici, enter it into a new cell below the output of the FullSimplify. Aug 5, 2013 at 5:29