I want to calculate the antiderivative for tan(x)

In [4]: x = sp.Symbol('x', real=True)

In [5]: sp.integrate(sp.tan(x), x)
Out[5]: -log(sin(x)**2 - 1)/2


This result is technically correct, but I would (for didactic purposes)
prefer something like

-log(cos(x)).

How can I achieve this?

Thanks.
Carsten.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/56C71381.4090204%40gmx.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to