While we look at Fourier Series there are both $\sin$ and $\cos$ components.But I think $\sin$ component is ony needed to describe wave.why there is also an $\cos$ component in Fourier Series?

$S_n(x)$=$A_0 + \sum_{n = 1}^{\infty} (A_n\cos(nx) + B_n\sin(nx))$

  • $\begingroup$ Hai Justin I'm Kevin I have joined stackexchange. I hope it has something to do with phase difference but keep on looking for other comments $\endgroup$
    – user11629
    Nov 7 '14 at 7:04

Note that the value of the series


for $x=0$ is always zero, regardless of the coefficients $B_n$ (assuming convergence). Furthermore, since the functions $\sin(nx)$ are odd, (1) can only represent odd functions. So you cannot represent general functions with the series (1). This is why you also need the cosine terms. As an alternative, you could as well use a representation with phases in the argument of the sine:


In this case you don't need any cosine terms because of the phases $\phi_n$. The representation in (2) is equivalent to the series in your question using sine and cosine terms. You can see this by using the identity $\sin(\alpha+\beta)=\cos\alpha\sin\beta+\sin\alpha\cos\beta$:


So the coefficients $A_n$ and $B_n$ in your question are

$$A_n=C_n\sin\phi_n\\ B_n=C_n\cos\phi_n$$

And the other way around you have

$$C_n=\sqrt{A_n^2+B_n^2}\\ \phi_n=\arctan\left(\frac{A_n}{B_n}\right)\quad(\pm\pi)$$

  • $\begingroup$ whether there would be a case in which we have to use both the $\cos$ and $\sin$ components in fourier series? $\endgroup$
    – justin
    Nov 7 '14 at 9:21
  • $\begingroup$ @justin: As I said in my answer, if you have a function that is not odd (and also not even), then you need both terms, or only one term with phases, as in Eq. (2) of my answer. $\endgroup$
    – Matt L.
    Nov 7 '14 at 9:22
  • $\begingroup$ could you cite a function that wouldn't neither be odd nor even. $\endgroup$
    – justin
    Nov 7 '14 at 9:24
  • $\begingroup$ @justin: $f(x)=\sin(x+\pi/4)$ $\endgroup$
    – Matt L.
    Nov 7 '14 at 9:25
  • $\begingroup$ :could you say why it is neither even nor odd. $\endgroup$
    – justin
    Nov 7 '14 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.