How to prevent Mathematica from complete evaluation of special functions?

This is even simpler (thanks to @CarlWoll):

ClearSystemCache[]; 
Block[{Zeta = Inactive[Zeta]}, 
 Integrate[Log[1 - x]^5/x^5, {x, 0, 1}]]

Mathematica graphics

Original answer:

Using the Gayley-Villegas trick:

Internal`InheritedBlock[{Zeta},
 Unprotect[Zeta];
 Zeta[a_Integer /; a > 1] /; ! TrueQ[$in] := Block[{$in = True},
   Inactive[Zeta][a]
   ];
 Protect[Zeta];
 Integrate[Log[1 - x]^5/x^5, {x, 0, 1}]
 ]

Note: The integral is actually computed in terms of limits of an expression involving PolyLog[n, 1-x] (for n = 2,3,4,5); we could do something similar for PolyLog as was done for Zeta above. However PolyLog actually evaluates to Zeta first, which is why the above works in this case. I mention it in case PolyLog does not evaluate to Zeta in a future version. And it's possible the integral will not be computed in terms of PolyLog in the future, too, I suppose. In any case, I thought some explanation of why the code happens to work in this case would be helpful. (It will certainly help me a year from now when someone asks why this doesn't work, and I won't remember a thing about it.)


Mathematica is a term rewriting system and there are various ways to suppress automatic evaluation of expressions. The system doesn't evaluate Zeta for odd integer arguments (see e.g. Zeta[Range[2, 20]]). Zeta[n] yields expressions involving n-th powers of Pi, thus one of possible ways to achieve the goal would be e.g.

Integrate[Log[1 - x]^5/x^5, {x, 0, 1}] /. 
 Times[x_, Pi^n_Integer] :> x Pi^n Inactivate[Zeta[n]]/Zeta[n] //
 TraditionalForm

enter image description here

Another way is to use HoldForm[Zeta[n]] instead of Inactivate[Zeta[n]] however the latter is more universal and handy. You can use Activate (also with appropriate patterns) to evaluate the expression, e.g.

Activate[%]
-((5 Pi^2)/6) - (11 Pi^4)/18 - 30 (Zeta[3] + Zeta[5])

Nevertheless using such a replacement should be appropriately restricted to avoid possible ambiguities with expressions involving symbolic results in terms of powers of Pi.