Question: How can I force int command to yield real answer?

Why does  int(x^17*cos(x^6), x) yields the complex form

-(x^12 + 2*I*x^6 - 2)*exp(x^6*I)*I/12 + (x^12 - 2*I*x^6 - 2)*exp(-I*x^6)*I/12

instead of the real (and more straightforward) answer

x^12/6*sin(x^6) + x^6/3*cos(x^6) - sin(x^6)/3

Both are equivalent, and the second form can be achieved from the first one by aplying Euler's identity.

However, how can I force int to yield the second form (real)?

Please Wait...