#f'(x) = x*tan(x)#
#f(x) - f(pi/4) = int_{pi/4}^x u*tan(u) du#
#f(x) - (-2) = int_{pi/4}^x u*tan(u) du#
#f(x) = int_{pi/4}^x u*tan(u) du - 2#
Try to evaluate the integral using integration by parts.
#int_{pi/4}^x u*tan(u) du = -int_{pi/4}^x u*frac{d}{du}(ln(cosu)) du#
#= -( [u*ln(cosu)]_{pi/4}^x - int_{pi/4}^x ln(cosu)*frac{d}{du}(u) du )#
#= - ( xln(cosx) - pi/4ln(1/sqrt{2}) ) + int_{pi/4}^x ln(cosu) du #
#= - xln(cosx) - frac{piln2}{8} + int_{pi/4}^x ln(cosu) du#
Evaluating the integral fully requires non-elementary functions.