Question: power of integers

In my expresions I have an integer, nx, which actually has values of only +1 and -1 but I do not specify which.

THe results come out as powers of nx, say nx^n, where n is a positive integer.

How do I reduce the expression nx^n,= 1 for n even and nx^n,= nx for n odd?

Please Wait...