\documentclass[11pt]{article}
\usepackage[sumlimits,namelimits]{amsmath}
\usepackage{amssymb,amsfonts,amsxtra,indentfirst}
\usepackage{array}
\usepackage[latin1]{inputenc}
\usepackage[francais]{babel}
\voffset -0.9in
\hoffset -1in
\oddsidemargin=2.5cm
\evensidemargin=2cm
\topmargin=1.0cm
\textwidth=16.5cm
\textheight=25.0cm
\footskip=2.0cm
\pagestyle{empty}
\begin{document}
\parindent0pt
\underline{Question posée :}
Calculer $\sum_{k=0}^{k=n}\cos(kx)$.\\

En utilisant une formule classique
\begin{align*}
\sin a \cos b &= \frac 1 2 ( \sin(a+b)+\sin(a-b)) \\
&=\frac 1 2 ( \sin(b+a) - \sin(b-a)) \\
\end{align*}
Avec $kx$ et $\frac x 2$ à la place de $b$ et de $a$ on obtient
\begin{align*}
\sum_{k=0}^{k=n}\cos(kx) \sin(\frac x 2)&=\sum_{k=0}^{k=n}\frac 1 2 (\sin(kx+\frac x 2)-\sin(kx-\frac x 2))\\
\sum_{k=0}^{k=n}\cos(kx) &= \frac 1 {2\sin(\frac x 2)}\sum_{k=0}^{k=n}\sin(kx+\frac x 2)-\sin(kx-\frac x 2)\\
\sum_{k=0}^{k=n}\cos(kx) &= \frac 1 {2\sin(\frac x 2)}\left(\sum_{k=0}^{k=n}\sin(kx+\frac x 2)-\sum_{k=0}^{k=n}\sin(kx-\frac x 2)\right)\\
&=\frac 1 {2\sin(\frac x 2)}\left(\sum_{k=0}^{k=n}\sin(kx+\frac x 2)-\sum_{k=-1}^{k=n-1}\sin(kx+\frac x 2)\right)\\
&=\frac 1 {2\sin\frac x 2}\left(\sum_{k=0}^{k=n-1}\sin(kx+\frac x 2)+\sin(nx+\frac x 2)-\sum_{k=0}^{k=n-1}\sin(kx+\frac x 2)-\sin(-\frac x 2)\right)\\
&=\frac 1 {2\sin(\frac x 2)}\left(\sin(nx+\frac x 2)-\sin(-\frac x 2)\right) \\
&=\frac 1 {2\sin(\frac x 2)}\left(\sin(nx+\frac x 2)+\sin\frac x 2\right) \\
\sum_{k=0}^{k=n}\cos(kx) &=\boxed{\dfrac {\sin(nx+\frac x 2)+\sin\frac x 2}{2\sin(\frac x 2)}}\\
&=\dfrac {2\sin\frac{nx + x}2  \cos\frac{nx} 2}{2\sin(\frac x 2)}\\
&=\dfrac {\sin\frac{nx + x}2  \cos\frac{nx} 2}{\sin(\frac x 2)}\\
\sum_{k=0}^{k=n}\cos(kx) &=\boxed{\frac{\sin\frac{(n+1)x}2  \cos\frac{nx} 2  }{\sin(\frac x 2)}}
\end{align*}
\end{document}

