How can I get Mathematica to prove $\sum_{k=0}^{n-1}\tan\left(\theta+\frac{k\pi}{n}\right)=−n\cot\left(\frac{n\pi}{2}+n\theta\right)$ (1)?
Sum[Tan[T + (k \[Pi])/m], {k, 0, m - 1}]
This can be done with Mathematica as follows. First, on the domain of the function of \[Theta]
defined by Sum[Tan[\[Theta] + k*Pi/n], {k, 0, n - 1}] + n*Cot[n*Pi/2 + n*\[Theta]]
its derivative equals zero as the result of
FullSimplify[D[Sum[Tan[\[Theta] + k*Pi/n], {k, 0, n - 1}] +
n*Cot[n*Pi/2 + n*\[Theta]], \[Theta]], Assumptions -> n \[Element] PositiveIntegers]
0
assures us. Second, let us determine
FunctionDomain[n*Cot[n*Pi/2 + n*\[Theta]], \[Theta]]
NotElement[((n*Pi)/2 + n*\[Theta])/Pi, Integers]
and
FunctionPeriod[n*Cot[n*Pi/2 + n*\[Theta]], \[Theta]]
Pi/n
In any case, the point \[Theta]=Pi/(4n)
belongs to this domain as well as to the domain of Sum[Tan[\[Theta] + k*Pi/n], {k, 0, n - 1}]
. The latter statement follows from
FunctionDomain[Tan[\[Theta] + k*Pi/n], \[Theta]]
1/2 + ((k \[Pi])/n + \[Theta])/\[Pi] \[NotElement] Integers
Third, Sum[Tan[\[Theta] + k*Pi/n], {k, 0, n - 1}] + n*Cot[n*Pi/2 + n*\[Theta]]
is a constant (perhaps, depending on n
) on each interval of its domain (which is a periodic set). We find this constant by substituting \[Theta]==Pi/(4n)
into the sum:
FindSequenceFunction[Table[FullSimplify[Sum[Tan[Pi/(4 n) + k*Pi/n], {k, 0, n - 1},
Assumptions -> n \[Element] PositiveIntegers] +
n*Cot[n*Pi/2 + n*Pi/(4 n)]], {n, 1, 10}], n]
0
SumConvergence[Tan[T + (k \[Pi])/n], k]
it yieldsFalse
. Is it possible that there assumption for some quantities that you forgot to mention? $\endgroup$test1[n_] := Sum[Tan[T + (k \[Pi])/n], {k, 0, n - 1}] test2[n_] := -n Cot[(n \[Pi])/2 + n T]
and then checkTable[test1[n], {n, 1, 2}] - Table[test2[n], {n, 1, 2}] // TrigExpand
which gives{0, 0}
and higher specific values forn
which give{0, 0,0,...,0,0,....0}
. $\endgroup$Integrate[Sum[D[Tan[\[Theta] + k*Pi/n], \[Theta]], {k, 0, n - 1}], \[Theta]] // ExpandAll
$\endgroup$