# Difference between integral(csc(x)) and integral(1/sin(x))?

integral(csc(x),x) gives -log(cot(x) + csc(x)) as expected. integral(1/sin(x),x) gives -1/2*log(cos(x) + 1) + 1/2*log(cos(x) - 1). Evaluation of the second log is problematic because cos(x)-1 < 0 for all x except n*2pi. Choosing the sympy or maxima algorithms makes no difference.

Also (and this is less reliable) if I perform a substitution t=tan(x/2) by hand in the first case I get ln(t), again as expected. But in the second ln(-t). That maybe my fault but I can't see what I did wrong.

Is there any fundamental difference between asking that same question in two different ways?

SageMath version 8.1, Release Date: 2017-12-07