# How to obtain the form of sin(nx) and cos(nx) from the result of FourierSeries [closed]

How to obtain the form of sin(nx) and cos(nx) from the result of FourierSeries[].

For Example,

$$\text{FourierSeries}[x,x,5]=i e^{-i x}-i e^{i x}-\frac{1}{2} i e^{-2 i x}+\frac{1}{2} i e^{2 i x}+\frac{1}{3} i e^{-3 i x}-\frac{1}{3} i e^{3 i x}-\frac{1}{4} i e^{-4 i x}+\frac{1}{4} i e^{4 i x}+\frac{1}{5} i e^{-5 i x}-\frac{1}{5} i e^{5 i x}$$

How do I obtain the form $$a_1 \cos (x)+a_2 \cos (2 x)+a_3 \cos (3 x)+a_4 \cos (4 x)+a_5 \cos (5 x)+a_0+b_1 \sin (x)+b_2 \sin (2 x)+b_3 \sin (3 x)+b_4 \sin (4 x)+b_5 \sin (5 x)$$

from the result of

  FourierSeries[x,x,5]


Thanks!

-

## closed as off-topic by belisarius, Artes, bobthechemist, Michael E2, Mr.Wizard♦Jan 28 '14 at 5:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – belisarius, Artes, bobthechemist, Michael E2, Mr.Wizard
If this question can be reworded to fit the rules in the help center, please edit the question.

Try: ExpToTrig[FourierSeries[x, x, 5]] –  RunnyKine Jan 28 '14 at 0:00
ComplexExpand@Re@FourierSeries[t, t, 5] –  belisarius Jan 28 '14 at 0:01

Use FourierTrigSeries[x, x, 5]
If you need just $sin$ or $cos$ terms, FourierSinSeries and FourierCosSeries do that.
ExpToTrig[FourierSeries[x, x, 5]]