-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complex missing Euler's formula #591
Comments
This seems to me to be required if complex numbers are to become first-class citizens of Symbolics |
@YingboMa any thoughts on this? |
Using julia> @syms x
(x,)
julia> exp(im*x)
exp((im)*x) but then the simplify step doesn't seem to work at all: julia> t(x) = cos(x)+im*sin(x)
t (generic function with 1 method)
julia> simplify(t(x)^2)
((0 + 1im)*sin(x) + cos(x))^2 and yet julia> simplify(exp(im*x)^2)
exp((0 + 2im)*x) Not sure what the right way to handle this is - my knowledge of Symbolics is weak. My intention is that I want to register some basic identities like |
I think this is somewhat resolved. julia> @variables a
1-element Vector{Num}:
a
julia> exp(im*a)
cos(a) + im*sin(a) |
Symbolics doesn't seem to be able to evaluate/define complex exponentials
Defining the function
and trying to simplify gives the right result, but fails to express it as complex exponential:
Also, higher order tests are slow to generate correct but needlessly complicated expressions
The text was updated successfully, but these errors were encountered: