<s>[INST] Find the sum: $\sum_{i=1}^{n}\dfrac{1}{4^i\cdot\cos^2\dfrac{a}{2^i}}$ Find the sum of the following :
$S=\dfrac{1}{4\cos^2\dfrac{a}{2}}+\dfrac{1}{4^2\cos^2\dfrac{a}{2^2}}+...+\dfrac{1}{4^n\cos^2\dfrac{a}{2^n}}$
 [/INST] A very different approach to calculate the sum. Note that
$$
\frac{1}{4^k\cos^2\frac{x}{2^k}}=\left(-\ln\cos\frac{x}{2^k}\right)''.
$$
Let's calculate (using in the $3^\text{d}$ equality the general form of Morrie's law for $\alpha=\frac{x}{2^n}$)
$$
F(x)=\sum_{k=1}^n-\ln\cos\frac{x}{2^k}=-\ln\prod_{k=1}^n\cos\frac{x}{2^k}=-\ln\frac{\sin x}{2^n\sin\frac{x}{2^n}}=\ln\sin\frac{x}{2^n}-\ln\sin x+n\ln 2.
$$
Finally, our sum is
$$
F''(a)=\frac{1}{\sin^2a}-\frac{1}{4^n\sin^2\frac{a}{2^n}}.
$$
</s>