Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

integration of real functions

Is it possible to integrate real functions? For example, integrating

f=(1+sin(x))/(1-cos(x))
from sage.symbolic.integration.integral import indefinite_integral
indefinite_integral(f, x)

Sage returns:

−(cos 𝑥 + 1)/ sin 𝑥 + log(cos 𝑥 − 1)

Now, this is correct if complex numbers are allowed but as a real function it is not, because of course the cos(x)-1 is non-positive. Is there a way to ask sage to integrate as a real function?