expression =
E^((10 I π n)/11) (112960 Cos[(2 π n)/11] +
112896 Cos[(4 π n)/11] + 112714 Cos[(6 π n)/11] +
111828 Cos[(8 π n)/11] + 117404 Cos[(10 π n)/11] +
I (-56491 I + 22 Sin[(2 π n)/11] + 42 Sin[(4 π n)/11] +
140 Sin[(6 π n)/11] + 746 Sin[(8 π n)/11] -
6322 Sin[(10 π n)/11]));
The purpose of the following answer is to verify that the expression is real and to re-write it in such a way that it is explicitly real for integer n
.
Outline:
Verifying that the expression is real for integer n
It is easier to check that the expression is real when each term is in its exponential form:
Note: in the variable names below …= \[Ellipsis]
expression$only…exponentials = TrigToExp[expression]
$$55541 e^{\frac{2 i \pi n}{11}}+56287 e^{\frac{4 i \pi n}{11}}+56427 e^{\frac{6 i \pi n}{11}}+56469 e^{\frac{8 i \pi n}{11}}+56491 e^{\frac{10 i \pi n}{11}}+56491 e^{\frac{12 i \pi n}{11}}+56469 e^{\frac{14 i \pi n}{11}}+56427 e^{\frac{16 i \pi n}{11}}+56287 e^{\frac{18 i \pi n}{11}}+55541 e^{\frac{20 i \pi n}{11}}+61863$$
Then, the operation of conjugation changes an angle $\theta$ by $2\pi k-\theta$. A convenient choice for $k$ here is n
:
expression$only…exponentials$conjugated =
expression$only…exponentials /.
Exp[iθ_] :> Exp[2*Pi*n*I - iθ]
$$55541 e^{\frac{2 i \pi n}{11}}+56287 e^{\frac{4 i \pi n}{11}}+56427 e^{\frac{6 i \pi n}{11}}+56469 e^{\frac{8 i \pi n}{11}}+56491 e^{\frac{10 i \pi n}{11}}+56491 e^{\frac{12 i \pi n}{11}}+56469 e^{\frac{14 i \pi n}{11}}+56427 e^{\frac{16 i \pi n}{11}}+56287 e^{\frac{18 i \pi n}{11}}+55541 e^{\frac{20 i \pi n}{11}}+61863$$
Check:
expression$only…exponentials$conjugated == expression$only…exponentials
(* True *)
Re-writing the expression to explicitly see that it is real for integer n
The expression is real as every integer coefficient is multiplied by a complex number and its conjugate. A natural re-writing of the expression can be obtained by collecting/grouping the complex conjugate pairs and factoring the common numerical coefficient. Collect
is a natural candidate but it only collects variables. We will wrap the coefficients around an arbitrary function c
to replace the integer coefficients with variables:
Note: c
is a global variable that might conflict with other variables in your notebook.
to…variables =
f_?NumericQ*Exp[iθ_] :> c[f]*Exp[iθ];
expression$only…exponentials$mod =
expression$only…exponentials /. to…variables
The expression can be simplified using that modification and we may then remove the wrapper c
:
expression$only…exponentials$mod //
Collect[#, Cases[#, c[_], All], FullSimplify] & //
ReplaceAll[c -> Identity]
$$ 112982 e^{i \pi n} \cos \left(\frac{\pi n}{11}\right)+112938 e^{i \pi n} \cos \left(\frac{3 \pi n}{11}\right)+112854 e^{i \pi n} \cos \left(\frac{5 \pi n}{11}\right)+112574 e^{i \pi n} \cos \left(\frac{7 \pi n}{11}\right)+111082 e^{i \pi n} \cos \left(\frac{9 \pi n}{11}\right)+61863 $$
Note the $e^{i \pi n}$ which is real for integer n
. Adding // FullSimplify[#, n ∈ Integers] &
at the end of that last code makes the expression even more clearly real for integer n
:
$$2 (-1)^n \left(56491 \cos \left(\frac{\pi n}{11}\right)+56469 \cos \left(\frac{3 \pi n}{11}\right)+56427 \cos \left(\frac{5 \pi n}{11}\right)+56287 \cos \left(\frac{7 \pi n}{11}\right)+55541 \cos \left(\frac{9 \pi n}{11}\right)\right)+61863 $$