2
$\begingroup$

I have this function for $n=\{1,2,3,4,5,6,7,8,9,10\}$. Is there any hope to significantly simplify this function (make it shortened) for general $n$? I use Simplify and FullSimplify, but it does not help much.

f[n_]:=11 + 2 E^((2 I n \[Pi])/11) + 5 E^((4 I n \[Pi])/11) + 8 E^((6 I n \[Pi])/11) + 14 E^((8 I n \[Pi])/11) + 20 E^((10 I n \[Pi])/11) + 30 E^((12 I n \[Pi])/11) + 22 E^((18 I n \[Pi])/11) + 17 E^((20 I n \[Pi])/11) +  6 E^((24 I n \[Pi])/11) - 2 E^((26 I n \[Pi])/11) - 
 8 E^((28 I n \[Pi])/11) - 20 E^((30 I n \[Pi])/11) - 
 31 E^((32 I n \[Pi])/11) - 60 E^((34 I n \[Pi])/11) - 
 31 E^((40 I n \[Pi])/11) - 20 E^((42 I n \[Pi])/11) - 
 2 E^((46 I n \[Pi])/11) + 6 E^((48 I n \[Pi])/11) + 
 10 E^((50 I n \[Pi])/11) + 17 E^((52 I n \[Pi])/11) + 
 22 E^((54 I n \[Pi])/11) + 30 E^((56 I n \[Pi])/11) + 
 20 E^((62 I n \[Pi])/11) + 14 E^((64 I n \[Pi])/11) + 
 5 E^((68 I n \[Pi])/11) + 2 E^((70 I n \[Pi])/11) + E^(( 72 I n \[Pi])/11)

$$ f(n)=2 e^{\frac{2 i \pi n}{11}}+5 e^{\frac{4 i \pi n}{11}}+8 e^{\frac{6 i \pi n}{11}}+14 e^{\frac{8 i \pi n}{11}}+20 e^{\frac{10 i \pi n}{11}}+30 e^{\frac{12 i \pi n}{11}}+22 e^{\frac{18 i \pi n}{11}}+17 e^{\frac{20 i \pi n}{11}}+6 e^{\frac{24 i \pi n}{11}}-2 e^{\frac{26 i \pi n}{11}}-8 e^{\frac{28 i \pi n}{11}}-20 e^{\frac{30 i \pi n}{11}}-31 e^{\frac{32 i \pi n}{11}}-60 e^{\frac{34 i \pi n}{11}}-31 e^{\frac{40 i \pi n}{11}}-20 e^{\frac{42 i \pi n}{11}}-2 e^{\frac{46 i \pi n}{11}}+6 e^{\frac{48 i \pi n}{11}}+10 e^{\frac{50 i \pi n}{11}}+17 e^{\frac{52 i \pi n}{11}}+22 e^{\frac{54 i \pi n}{11}}+30 e^{\frac{56 i \pi n}{11}}+20 e^{\frac{62 i \pi n}{11}}+14 e^{\frac{64 i \pi n}{11}}+5 e^{\frac{68 i \pi n}{11}}+2 e^{\frac{70 i \pi n}{11}}+e^{\frac{72 i \pi n}{11}}+11 $$

$\endgroup$
5
  • 1
    $\begingroup$ Is a general n an integer? Or by general do you mean real or even complex? $\endgroup$
    – Hugh
    Commented Nov 7, 2022 at 16:19
  • $\begingroup$ @Hugh $n$ is a positive integer taking the values $1$ to $10$ as I have written in the question. $\endgroup$
    – charmin
    Commented Nov 7, 2022 at 16:21
  • 1
    $\begingroup$ it will simplify $e^{\frac{k n }{m} i \pi}$ when $\frac{k n }{m}$ comes out to have special values. These are multiple of integers or multiple half integers. I do not see how it will simplify any more for general cases. $\endgroup$
    – Nasser
    Commented Nov 7, 2022 at 16:35
  • 2
    $\begingroup$ A more specific title could be helpful to future users searching for a similar question. Perhaps: " Simplifying a sum of complex exponential terms". Maybe more specific titles also lead to better duplicate suggestions by stack exchange when writing the question. $\endgroup$ Commented Nov 7, 2022 at 17:52
  • $\begingroup$ @userrandrand Thanks; I leave this to you to change the title. $\endgroup$
    – charmin
    Commented Nov 7, 2022 at 21:38

2 Answers 2

2
$\begingroup$
(expression /. {n -> Log[x]/(2*Pi*I/11)}) /. 
 {x^m_ -> x^Mod[m,11]} //Factor //InputForm
(* 11*(1 + x)*(1 + x^2 + x^4 + x^9) *)
$\endgroup$
2
  • $\begingroup$ @charmin Which answer is simpler and are you likely to come up with it yourself and use in the future? $\endgroup$
    – Somos
    Commented Nov 8, 2022 at 1:33
  • $\begingroup$ @charmin Don't sweat it. Your question. Your choice. It's all good. $\endgroup$
    – Somos
    Commented Nov 9, 2022 at 0:08
8
$\begingroup$
expression = 
 11 + 2 E^((2 I n π)/11) + 5 E^((4 I n π)/11) + 
  8 E^((6 I n π)/11) + 14 E^((8 I n π)/11) + 
  20 E^((10 I n π)/11) + 30 E^((12 I n π)/11) + 
  22 E^((18 I n π)/11) + 17 E^((20 I n π)/11) + 
  6 E^((24 I n π)/11) - 2 E^((26 I n π)/11) - 
  8 E^((28 I n π)/11) - 20 E^((30 I n π)/11) - 
  31 E^((32 I n π)/11) - 60 E^((34 I n π)/11) - 
  31 E^((40 I n π)/11) - 20 E^((42 I n π)/11) - 
  2 E^((46 I n π)/11) + 6 E^((48 I n π)/11) + 
  10 E^((50 I n π)/11) + 17 E^((52 I n π)/11) + 
  22 E^((54 I n π)/11) + 30 E^((56 I n π)/11) + 
  20 E^((62 I n π)/11) + 14 E^((64 I n π)/11) + 
  5 E^((68 I n π)/11) + 2 E^((70 I n π)/11) + 
  E^((72 I n π)/11)

Notice that the argument of every exponential is imaginary which can be checked with:

And @@ (Re[#/n] == 0 &) /@ Cases[expression, Exp[s_] -> s, All]

(* True *)

It is then sufficient to consider the imaginary argument of each exponential modulo $2\pi$ which, for integer n, allows the simplification:

Note: below …=\[Ellipsis]

simplified…expression=expression /. Exp[n*v_] :> Exp[n*Mod[v, 2*Pi]] 
// FullSimplify

(* 11 (1 + E^((2 I n π)/11)) (1 + E^((4 I n π)/11) + E^(( 8 I n π)/11) + E^((18 I n π)/11)) *)

In LaTex:

$$11 \left(1+e^{\frac{2 i \pi n}{11}}\right) \left(e^{\frac{4 i \pi n}{11}}+e^{\frac{8 i \pi n}{11}}+e^{\frac{18 i \pi n}{11}}+1\right)$$

Verification:

 And @@ Table[
  simplified…expression == expression, {n, 0, 10}]

(* True *)

$\endgroup$

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.