# Mistake in fourier series

I've the following function $\text{U}\left(t\right)$ that is defined as posted in the picture: My book tells me that the Fourier series looks like:

$$\tag{1}U(t)=\sum_{n=1}^{\infty}2 \hat{u} \dfrac{\tau}{T}\dfrac{\sin(\dfrac12 n \omega \tau)}{\dfrac12 n \omega \tau}\cos(n \omega t-\dfrac12 n \omega \tau) \ \ \ \text{with} \ \ \omega:=\dfrac{2 \pi}{T}.$$

Now, I used Mathematica to plot the function given by formula $(1)$ but I got something else (I set some values for the constants in the function and plot it for $t$) so not the thing I was supposed to get.

Where is the mistake in the series?

• would you mind to include the picture directly and describe it properly? – tired Nov 20 '16 at 15:25
• I can not I've not enougth + – asdasd Nov 20 '16 at 15:26
• i uploaded the picture for you, but now it is your turn to give a proper description – tired Nov 20 '16 at 15:29
• What is $\omega$? What is the $x$-coordinate of the first square wave? – rogerl Nov 20 '16 at 15:29
• I have done it. But something is missing : picture 2. – Jean Marie Nov 20 '16 at 15:29

Understanding that $\omega=2*\pi /T$, then the formula in the book is just missing the constant term ${\hat u\,\frac{\tau }{T}}$.
The correct formula is in fact: $$u(t) = \hat u\,\frac{\tau }{T} + \sum\limits_{1\, \le \,n} {2\,\hat u\,\frac{\tau }{T}\frac{{\sin \frac{1}{2}n\,\omega \,\tau }}{{\frac{1}{2}n\,\omega \,\tau }}} \cos \left( {n\,\omega \,t - \frac{1}{2}n\,\omega \,\tau } \right)$$
with the further understanding that the function actually be: $$u(t)\quad \left| {\;0 \le t < T} \right.\quad = \left\{ {\begin{array}{*{20}c} {\,\hat u} & {0 \le t < \tau } \\ 0 & {\tau \le t < T} \\ \end{array}} \right.$$ i.e. that the step starts from $t=0$, which from the picture is not so evident
• So it is right but I've to add: $\hat u\,\frac{\tau }{T}$? – asdasd Nov 20 '16 at 15:44