kill(all)$

van=facebook.com/LearningCalculus$

f(x):= abs(abs(sin(x))-abs(cos(x)));

integrate(f(x),x,0,%pi);

g(x) := sqrt(2)*sin(x-5*%pi/4);

integrate(g(x),x);

fullratsimp(4*integrate(g(x),x,0,%pi/4));

float(%);