If I let Maple computer the integral of tan(x), it gets
, which is the same result as many other softwares get.
However, if I do integral of tan(2*x), it becomes
, instead of . The latter form should make more sense considering what Maple gives for tan(x).
In fact, Maple alwys gives the anwer (1) as the integral for tan(n*x) when n>=2. While this is also an indefinite integral of tan(n*x), it is not exactly the equivalent of (2), which is the form Maple gives for integral of tan(x). Expression (2) sometimes evaluates to complex values while (1) only evaluates to real values. It seems that for integral of tan(2x) Maple tries to find the antiderivative that always evaluates to real values, but for tan(x) Maple is happy with -ln(cos(x)), whose value may be complex.
Is there a reason why Maple does this? And is there any way to change the way Maple computes indefinite integrals?