integrate(1/cos(x),x) gives log(sin(x)+1)/2-log(sin(x)-1)/2 and
integrate(1/sin(x),x) gives log(cos(x)-1)/2-log(cos(x)+1)/2
in both cases sin(x)-1<0 and cos(x)-1<0 and undefined for log().
Correct values should be 1-sin(x) and 1-cos(x).
You're restricting yourself to the real domain, while Maxima is working in the complex domain. The configuration variable logabs allows you to get the results you expected:
You're restricting yourself to the real domain, while Maxima is working in the complex domain. The configuration variable logabs allows you to get the results you expected:
Last edit: Jaime E. Villate 2016-01-22