Difficulty understanding a Fourier sine series problem 
Suppose a Fourier sine series $A\sin x+B\sin2x+C\sin3x+\cdots$ adds up to $x$ on the interval from $0$ to $\pi$. The series also equals $x$ from $-\pi$ to $0$, because all functions are odd. Sketch the "sawtooth function", which equals $x$ from $-\pi$ to $\pi$ and then has period $2\pi$. What is the sum of the sine series at $x=\pi$?

The problem states that the series equals $x$ on $[0,\pi]$ and $[-\pi,0]$. I cannot even imagine that the series equals $x$ on these intervals. Then, it asks me to sketch the "sawtooth function" that equals $x$ on $[-\pi,\pi]$. I tried to plot $\sum_{i=1}^5i\sin{ix}$ to see an example, as shown below. But I still do not understand what the problem means, and the phrase "equals $x$" sounds cryptic to me, because I cannot see the series approaching $y=x$. Can anyone explain it to me?

 A: Note that  $\sum_{i=1}^5i\sin{ix}$ is not the first five terms of the Fourier sine series of $x$. It does not make sense to try it. 
Exercises: 


*

*Find  first the Fourier series for $f(x)=x$ on $[-\pi,\pi]$. It is something like
$$
x=\sum_{n=1}^\infty a_n\sin(nx)
$$
Do you know how to find the $a_n$'s? They are called the Fourier coefficients. 

*Now can you sketch for instance
$$
\sum_{n=1}^5a_n\sin(nx)?
$$



Here is what they should look like

A: The question asks you to define a series of coefficients $a_1, a_2, a_3, \ldots$ such that for $-\pi < x < \pi$,
$$
a_1 \sin(x) + a_2 \sin(2x) + a_3 \sin(3x) + \cdots = x.
$$
(The question actually names the coefficients $A,B,C,...$, but the naming of these symbols is arbitrary and I prefer a sequence of names that continues forever in an obvious way.)
That is, you want a function whose output is exactly equal to its input,
provided the input is in the given interval.
The only way to satisfy this is by adding up infintely many terms on the 
left-hand side of the equation (or, to put it in more mathematical
language, treating the left side as a
limit of an infinite sequence of functions that converges pointwise to the
function $f(x) = x$ on the interval $(-\pi, \pi)$).
If you take only a finite number of terms, there will
always be some "bumps" in the function that cause the output of the
function not to be exactly equal to the input.
For the instructions "sketch the sawtooth function" I would interpret this
as not asking you to sketch any partial sum of the Fourier series,
that is, don't actually plot a sum of sine functions.
Simply sketch the "target" function $f(x) = x$ for $-\pi < x < \pi,$
and then sketch the rest of the function under the assumption that
$f(x+\pi) = f(x)$ for every $x$.
For "the sum of the sine series at $x=\pi$,"
I think it literally does want the value of a sum of sine functions
rather than the "target" function.
In other words, you need to find the value of 
$$
a_1 \sin(\pi) + a_2 \sin(2\pi) + a_3 \sin(3\pi) + \cdots.
$$
Hint: What is $\sin\pi$? What is $\sin(2\pi)$? What is $\sin(3\pi)$?
