The sketch of the function:

We need to find the Fourier coefficients a0, an and bn before we can determine the series.
Note 1: We could have found this value easily by observing that the graph is totally above the t-axis and finding the area under the curve from t = 4 to t = 4. It is just 2 rectangles, one with height 0 so the area is 0, and the other rectangle has dimensions 4 by 5, so the area is 20. So the integral part has value 20; and 1/4 of 20 = 5.
Note 2: The mean value of our function is given by a0/2. Our function has value 5 for half of the time and value 0 for the other half, so the value of a0/2 must be 2.5. So a0 will have value 5.
These points can help us check our work and help us understand what is going on. However, it is good to see how the integration works for a split function like this.
Note: In the next section, Even and Odd Functions, we'll see that we don't even need to calculate an in this example. We can tell it will have value 0 before we start.
At this point, we can substitute this into our Fourier Series formula:

Now, we substitute n = 1, 2, 3,... into the expression inside the series:
Now we can write out the first few terms of the required Fourier Series: