1
$\begingroup$

Consider the following input

Assuming[Element[y, Integers], (-1 + E^(I \[Pi] (x + y)))/(-1 + E^(I \[Pi] (x - y)))//FullSimplify]

(-1 + E^(I \[Pi] (x + y)))/(-1 + E^(I \[Pi] (x - y)))

the output comes out exactly the same as the input. However, note that for integer y we have

$$e^{i\pi(x+y)}=e^{i\pi(x+2y-y)}=\underbrace{e^{2\pi i y}}_{=1}e^{i\pi(x-y)}=e^{i\pi(x-y)}$$

With this I would expect the above mathematica input to return 1 instead of unaltered input.

How to properly simplify this in mathematica?

$\endgroup$

1 Answer 1

2
$\begingroup$
Assuming[Element[y, Integers],
   (-1 + E^(I π (x + y)))/(-1 + E^(I π (x - y))) // ComplexExpand // FullSimplify]

1

If x is not necessarily real (thanks: Bob Hanlon),

Assuming[Element[y, Integers],  
  (-1 + E^(I π (x + y)))/(-1 + E^(I π (x - y)))// ComplexExpand[#, {x}]& // FullSimplify]

1

Also

Assuming[Element[y, Integers], 
   (-1 + E^(I π (x + y)))/(-1 + E^(I π (x - y))) // ExpToTrig // FullSimplify]

1

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.