Does anyone know of a closed formula for $cos(\displaystyle\sum_{n=0}^m a_{n})$? I've seen formulas for $cos(\displaystyle\sum_{n=0}^\infty a_{n})$ and $tan(\displaystyle\sum_{n=0}^m a_{n})$, but the former remains elusive. I can only think of two ways to approach the problem, either by taking the real part of complex exponentials or defining a recurrence relation, viz.

$cos(\displaystyle\sum_{n=0}^m a_{n})$
$=Re[exp(i\displaystyle\sum_{n=0}^m a_{n})]$
$=\frac{1}{2}[exp(i\displaystyle\sum_{n=0}^m a_{n})+exp(-i\displaystyle\sum_{n=0}^m a_{n})]$
$=\frac{1}{2}[\displaystyle\prod_{n=0}^mexp(ia_{n})+\displaystyle\prod_{n=0}^mexp(-ia_{n})]$
$=\frac{1}{2}[\displaystyle\prod_{n=0}^m[cos(a_{n})+isin(a_{n})])+\displaystyle\prod_{n=0}^m[cos(a_{n})-isin(a_{n})]]$

which amounts to finding a closed-form expression for

$(A_{0}+B_{0})(A_{1}+B_{1})(A_{2}+B_{2})...(A_{m}+B_{m})$

similar to finding binomial coefficients, albeit more general. I know there should be $2^m$ unique terms arising from choosing either $A_{0}$ or $B_{0}$, then choosing either $A_{1}$ or $B_{1}$, etc. until you've chosen every combination. The recurrence relation would go as follows:

$cos(\displaystyle\sum_{n=0}^m a_{n}) = cos(a_{m}+\displaystyle\sum_{n=0}^{m-1} a_{n}) = cos(a_{m})cos(\displaystyle\sum_{n=0}^{m-1} a_{n})-sin(a_{m})sin(\displaystyle\sum_{n=0}^{m-1} a_{n})$

Jackson