Skip to content
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

simplifier doesn't detect exp(i x) * exp(- i x) = 1 #188

Open
light-matters opened this issue Sep 18, 2024 · 0 comments
Open

simplifier doesn't detect exp(i x) * exp(- i x) = 1 #188

light-matters opened this issue Sep 18, 2024 · 0 comments

Comments

@light-matters
Copy link

Without I, the simplifier does as expected:

(e/simplify (* (e/exp (* -1 (c/complex 'k)))
               (e/exp (* 1 (c/complex 'k)))))  ;=>1

With I, it does something very different:

(e/simplify (* (e/exp (* -1 I (complex 'k)))
               (e/exp (* 1 I (complex 'k)))))
;=> #emmy/complex [(- (* (cos (* -1 k)) (cos k)) (* (sin (* -1 k)) (sin k))) (+ (* (cos (* -1 k)) (sin k)) (* (sin (* -1 k)) (cos k)))]

This is a problem because multiplying by the conjugate is a very common operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant