Consider the following article: https://en.wikipedia.org/wiki/Fourier_series At definition, they say that an = An*sin() and bn = An*cos() So with these notations you can go from a sum having sin and cos to a sum having only sin but with initial phases. Why can I write an = An*sin() and bn = An*cos() ? It seems out of the blue.
It is not that difficult. Look at this figure: In the first image we have square signal. But a radio device receives a sine wave. LC oscillate as Sin(): https://en.wikipedia.org/wiki/RLC_circuit So in the first image signal approaches with Sin() drew orange.
It is the main component of which will receive a radio, if you give a rectangular signal as in the first image. In fact, RLC react to a growth rate (di/dt): And the margins are 'very steep', that means I had very high frequency component. So, what I could add up to that SIN ()(orange line) to drown the steep edges? corners. This is the case sinusoids of blue and green. Because we can not hatching the entire rectangle so, something must also substracted. Therefore we have cosine.