Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can define trigonometric functions via exp() as:

matsin = lambda M: ((I*M).exp() - (-I*M).exp())/2/I
matcos = lambda M: ((I*M).exp() + (-I*M).exp())/2

For logarithm, please see this Q&A: https://math.stackexchange.com/q/3116315

You can define trigonometric functions functions via exp() as:

matsin = lambda M: ((I*M).exp() - (-I*M).exp())/2/I
matcos = lambda M: ((I*M).exp() + (-I*M).exp())/2

For logarithm, please see this Q&A: https://math.stackexchange.com/q/3116315