I'm really annoyed with Mathematica and I need your help. I defined a discrete Fourier-Transformation(I use II instead of N, because Mathematica wont let me-.-):

Subscript[ϕ, i_] = Sum[Exp[I (2 Pi)/II i k] f[k], {k, II}];

And I want to check that

Subscript[ϕ, 1] == Subscript[ϕ, II + 1]

This gives me $$\sum _k^{\text{II}} \left(f(k) e^{\frac{2 i \pi k}{\text{II}}}\right)=\sum _k^{\text{II}} \left(f(k) e^{\frac{2 i \pi (\text{II}+1) k}{\text{II}}}\right)$$

And by simply splitting the exponents on the right side of the equations this can be seen to be true.($\exp(i2\pi k)=1\forall k\in\mathbb N$ ) I really would have thought that Mathematica would be able to simplify that on its own, considering that $k$ is the summation index and is therefore an integer, but it does not. So I told Mathematica:

Simplify[Subscript[ϕ, 1] == Subscript[ϕ, II + 1],     Assumptions -> k ∈ Integers]

Didn't help, so I tried:

Simplify[Subscript[ϕ, 1] == Subscript[ϕ, II + 1] /. 
        Exp[a_] :> Exp[Expand[a]], Assumptions -> k ∈ Integers]

Still does not work! Please help me. Thank you

  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$ – bbgodfrey May 4 '15 at 23:44

Apparently, simplifying a Sum does not result in simplifying each term in the Sum. Try

Subscript[ϕ, 1] == Subscript[ϕ, II + 1] /. 
    Exp[a_] :> Simplify[Exp[a], Assumptions -> k ∈ Integers]
(* True *)

Undoubtedly, there are more elegant approaches.

| improve this answer | |

Simplify does not simplify held arguments of a function (that's a \[CapitalNu], not an N, just for fun):

SetAttributes[foo, HoldAll];
Simplify[foo[E^((2 I k π (1 + Ν))/Ν) ], {k, Ν} ∈ Integers]
Simplify[E^((2 I k π (1 + Ν))/Ν), {k, Ν} ∈ Integers]
  foo[E^((2 I k π (1 + Ν))/Ν)]
  E^((2 I k π)/Ν)

This should seem perfectly reasonable, since the arguments are held for a reason. If they were to be evaluated inside the operations of Simplify, the returned expression might not be equivalent. This is indeed irritating with a function like Sum, which has the attribute HoldAll. If you're certain that the summand can be evaluated outside the Sum, then something like the following should work:

Assuming[{k, Ν} ∈ Integers,
  Subscript[ϕ, 1] == Subscript[ϕ, Ν + 1], 
  TransformationFunctions ->
     # /. Sum[t_, i__] :> With[{t0 = Simplify[t]}, Sum[t0, i]] &}]
(*  True  *)

For extra security, you could wrap it in Block[{k},...].

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy