One thing that is curious about this example is that the only two methods that succeed are ftoc and ftocms, but the correct result can be obtained for them (using say n=13) for a nonnegative parameter b which is then subsequently evaluated at b=Pi.

Using Maple 15.01,

> restart:
> kernelopts(printbytes=false):
> ans:=int(abs(cos(13*x)),x=0..b) assuming b>0:
> hastype(ans,piecewise);
true
> eval(ans,b=Pi);
2
> int(abs(cos(13*x)),x=0..Pi);
24
--
13

And in more detail,

> restart:
> int(abs(cos(13*x)),x=0..b,method=_RETURNVERBOSE) assuming b>0; # takes a minute
4096 12 11264 10
[ftoc = ---- %1 sin(b) cos(b) - ----- %1 sin(b) cos(b)
13 13
11520 8 5376 6
+ ----- %1 sin(b) cos(b) - ---- %1 sin(b) cos(b)
13 13
1120 4 84 2
+ ---- %1 sin(b) cos(b) - -- %1 sin(b) cos(b) + 1/13 %1 sin(b)
13 13
/{ -26 b + Pi \
|{ 2/13 floor(- ----------) + 2/13 0 < 26 b - Pi|
+ |{ 2 Pi |, FAILS = (
|{ |
\{ 0 otherwise /
distribution, piecewise, series, o, polynomial, ln, lookup, cook, ratpoly,
elliptic, elliptictrig, meijergspecial, improper, asymptotic, meijerg,
contour), ftocms = 1/13 sin(13 b) signum(cos(13 b))
/{ -26 b + Pi \
|{ 2/13 floor(- ----------) + 2/13 0 < 26 b - Pi|
+ |{ 2 Pi |]
|{ |
\{ 0 otherwise /
13 11 9 7
%1 := signum(4096 cos(b) - 13312 cos(b) + 16640 cos(b) - 9984 cos(b)
5 3
+ 2912 cos(b) - 364 cos(b) + 13 cos(b))
> eval(%,b=Pi);
[ftoc = 2, FAILS = (distribution, piecewise, series, o, polynomial, ln, lookup,
cook, ratpoly, elliptic, elliptictrig, meijergspecial, improper,
asymptotic, meijerg, contour), ftocms = 2]
> restart:
> int(abs(cos(13*x)),x=0..Pi,method=_RETURNVERBOSE);
24
[ftoc = --, FAILS = (distribution, piecewise, series, o, polynomial, ln,
13
lookup, cook, ratpoly, elliptic, elliptictrig, meijergspecial, improper,
24
asymptotic, meijerg, contour), ftocms = --]
13

So, that's a bit of a discrepency, which suggests that the FTOC is not applied in that (naive, simple) manner.

I wonder whether there is anything special about using the constant name Pi. I tried raising Digits very high (10000) since `is` can rely upon `evalf`. But the wrong result reoccurred. These next results are a little curious, though, since `Pi` isn't a variable parameter:

> restart:
> int(abs(cos(n*x)),x=0..Pi,AllSolutions) assuming n::posint;
/{ Pi \
|{ 1/n Pi = --- |
2 + |{ 2 n |
|{ |
\{ 0 otherwise/
> restart:
> int(abs(cos(n*x)),x=0..Pi,AllSolutions) assuming n::negint;
/{ Pi \
|{ - 1/n Pi = - ---|
2 + |{ 2 n|
|{ |
\{ 0 otherwise /
> restart:
> int(abs(cos(n*x)),x=0..Pi,AllSolutions) assuming n::{negint};
/{ Pi \ /{ Pi \
|{ 1/n 0 = - ---| |{ - 1/n Pi = - ---|
2 - |{ 2 n| + |{ 2 n|
|{ | |{ |
\{ 0 otherwise/ \{ 0 otherwise /

I only include that last one above because for n=13 the result of 24/13 is wrong by 2/n, and nothing else I've seen comes close to suggesting how that result is obtained. Of course, someone could also debug it and find out exactly what it does.