Equality involving cosine and binomial coefficients - check if true for every $n$ While doing some computations with complex numbers I think I proved that
$$(\cos{ \frac{n \cdot \pi}{4} )\cdot 2^{n/2}} = \binom{n}{0} - \binom{n}{2} + \binom{n}{4} - \binom{n}{6} + ... $$
How? Well, these are two different forms of
$$\frac{1}{2} \cdot ((1+i)^n + (1-i)^n)$$
But because of the late hour, I am not sure if I didn't make some mistake.
Is this equality really true for every natural n?
Also, I wonder how can one prove it without using complex numbers. I mean is these some sort of elementary (high-school) proof?
 A: Can be proven via DeMoivre's theorem.
$[\cos(\pi/4) + i\sin(\pi/4)]^n = [\cos(n\pi/4) + i\sin(n\pi/4)]$.
The alternative computation, which must yield identical results, is via binomial expansion:
$[\cos(\pi/4) + i\sin(\pi/4)]^n
= \sum_{k=0}^n \binom{n}{k}\cos(\pi/4)^k ~~i^{(n-k)}\sin(\pi/4)^{(n-k)}.$
The (true) conjecture, which is close to the conjecture that you are focusing on yields to:

*

*If two complex analysis expressions are equivalent, the real portion of each expression must be equivalent.


*In the binomial expansion, the real terms will be precisely those terms where $(n-k)$ are even.


*Since $\cos(\pi/4) = (1/\sqrt{2}) = \sin(\pi/4)$, you have that for all $k \in \{0,1,2,\cdots n\}$,
$~\cos(\pi/4)^k \sin(\pi/4)^{(n-k)} = (1/\sqrt{2})^n.$
So the actual (true) conjecture, which will hold for any positive integer $n$ is that
$$[\cos(n\pi/4)] \times 2^{(n/2)}
~=~ \sum_{k=0}^n \binom{n}{k}i^{(n-k)}$$
with the understanding that only those terms in the RHS summation above where $(n-k)$ is even will be counted.
The intended RHS summation can be more tidily expressed by noting that $\binom{n}{k} = \binom{n}{n-k}$ and letting $c$ denote the largest integer such that $c \leq \frac{n}{2}.$
Then the re-expression of the RHS summation becomes
$$\sum_{k=0}^c \binom{n}{2k}(-1)^k.$$
A: Without complex numbers, by induction, assume that for some integer $n\ge 0$,
$$\begin{align*}
2^{n/2}\cos\frac{n\pi}{4} = \binom{n}{0}-\binom n2+\binom{n}{4}-\binom n6+\cdots\\
2^{n/2}\sin\frac{n\pi}{4} = \binom{n}{1}-\binom n3+\binom{n}{5}-\binom n7+\cdots\\
\end{align*}$$
Then by compound angle formulae,
$$\begin{align*}
\cos\frac{(n+1)\pi}{4} &= \cos\frac{n\pi}{4}\cos\frac\pi 4 - \sin\frac{n\pi}{4}\sin\frac\pi 4\\
&= \frac1{\sqrt2} \left(\cos\frac{n\pi}{4} - \sin\frac{n\pi}{4}\right)\\
2^{(n+1)/2}\cos\frac{(n+1)\pi}{4} &= 2^{n/2} \left(\cos\frac{n\pi}{4} - \sin\frac{n\pi}{4}\right)\\
&= \left[\binom{n}{0}-\binom n2+\cdots\right] - \left[\binom{n}{1}-\binom n3+\cdots\right]\\
&= \binom n0 + \left[-\binom n2+\binom n4 -\cdots\right] + \left[-\binom{n}{1}+\binom n3-\cdots\right]\\
&= \binom{n+1}0 - \binom{n+1}2 + \binom{n+1}4-\cdots
\end{align*}$$
Similarly
$$\begin{align*}
\sin\frac{(n+1)\pi}{4} &= \frac1{\sqrt2} \left(\cos\frac{n\pi}{4} + \sin\frac{n\pi}{4}\right)\\
2^{(n+1)/2}\sin\frac{(n+1)\pi}{4} &= \left[\binom{n}{0}-\binom n2+\cdots\right] + \left[\binom{n}{1}-\binom n3+\cdots\right]\\
&= \binom{n+1}{1}-\binom {n+1}3+\binom{n+1}{5}-\cdots
\end{align*}$$
What remains is to prove that the base case when $n=0$ is true.
