Skip to content

exp(I*pi*n).simplify_exp() doesn't simplify #11785

Closed
@dandrake

Description

@dandrake

At https://groups.google.com/d/topic/sage-support/Pkn1o1kAcyE/discussion I noted that currently (4.7.1 and 4.7.2.alpha2), we have this:

sage: n = var('n')
sage: assume(n, 'integer')
sage: exp(I*n*pi).simplify_exp()
e^(I*pi*n)

I was really hoping for cos(pi*n), or (-1)^n.

If you are serious about asking Maxima, it will simplify it, though:

sage: A = exp(I*pi*n)
sage: A.maxima_methods().rectform()
(-1)^n

We should somehow wrap rectform or make it easier to access. At a minimum, we should add something to the documentation to mention this possibility.

Depends on #13061

CC: @kcrisman @orlitzky

Component: symbolics

Keywords: maxima symbolics exponentials sd40.5

Author: Michael Orlitzky

Branch/Commit: 2fb52ed

Reviewer: Ralf Stephan

Issue created by migration from https://trac.sagemath.org/ticket/11785

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions