3

In Wolfram Alpha I can use complex expand sin(x + Iy) to get back sin(x) cosh(y) + i cos(x) sinh(y). Is there a package in Julia or alternatively Python that does the same?

Josef
  • 33
  • 4

1 Answers1

0

In Julia, I find this

using SymPy
@syms x,y
sympy.expand_trig( sin(x + im*y) )

#sin(x)⋅cosh(y) + ⅈ⋅cos(x)⋅sinh(y)

The similar solution can also be found in the library SymPy of Python.

Peace Wang
  • 2,399
  • 1
  • 8
  • 15