What is the process for determining the Fourier series of (sin(x))^2?

In summary, you were working on a function that includes a Fourier series. You found a way to simplify the function by taking advantage of symmetry.
  • #1
Gza
449
0
Hey guys i was working on an algorithm for one of my CS classes that included working out the Fourier series for the function f(x) = (sin(x))^2. it's been a few years since I've done anything like this, so I did some googling to refresh my memory of how to determine the Fourier coefficients, and after some integrals and calculations, came up with:


f(x) = (1/2) + (1/2)cos(2x) + (1/2)sin(2x)

I graphed this along with f(x) = (sin(x))^2 and it looked different from it. I was wondering if someone can give me a correct answer to compare with what i came up with, or help with giving me a rough walkthru of the process. Thanks again.
 
Physics news on Phys.org
  • #2
The answer you got is incorrect.

The two identities you need are:

(sin(x))^2 + (cos(x))^2 =1

and

cos(2x) = 2(cos(x))^2 - 1

Use both of these to solve for (sin(x))^2 in terms of cos(2x).
 
  • #3
Gza said:
Hey guys i was working on an algorithm for one of my CS classes that included working out the Fourier series for the function f(x) = (sin(x))^2. it's been a few years since I've done anything like this, so I did some googling to refresh my memory of how to determine the Fourier coefficients, and after some integrals and calculations, came up with:


f(x) = (1/2) + (1/2)cos(2x) + (1/2)sin(2x)

I graphed this along with f(x) = (sin(x))^2 and it looked different from it. I was wondering if someone can give me a correct answer to compare with what i came up with, or help with giving me a rough walkthru of the process. Thanks again.

One thing you should always check is to see if the symmetry of the component functions matches the symmetry of the function you are decomposing. The function you started with is an even function

f(-x) = f(x)

All the component functions must also be even functions. One of yours is not. You can often take advantage of symmetry to eliminate performing many of the integrals that have to be calculated to decompose a function.
 
  • #4
No integrals at all required here. You can either use the identities learningphysics gave, or use the exponential form of sine:

[tex]\sin{x} = \frac{e^{ix}-e^{-ix}}{2i}[/tex]

and just square it (and then convert back to sines and cosines).
 
  • #5
Data said:
No integrals at all required here. You can either use the identities learningphysics gave, or use the exponential form of sine:

[tex]\sin{x} = \frac{e^{ix}-e^{-ix}}{2i}[/tex]

and just square it (and then convert back to sines and cosines).

That is true. My comment about integrals was a general comment about Fourier series where one often does have integrals to perform, and taking advatange of the symmetry can save work.
 
  • #6
Indeed, I wasn't criticizing your reply at all :smile:

If you want to find the Fourier series for x^n, for example, that symmetry can help a lot!
 

FAQ: What is the process for determining the Fourier series of (sin(x))^2?

What is a Fourier series?

A Fourier series is a mathematical representation of a periodic function as a sum of sine and cosine functions. It allows us to break down a complex function into simpler components and study its behavior.

How is a Fourier series used for (sin(x))^2?

In the case of (sin(x))^2, a Fourier series can be used to represent the function as a sum of sine functions with different frequencies and amplitudes. This allows us to better understand the behavior of the function and make predictions about its values.

What is the formula for the Fourier series of (sin(x))^2?

The formula for the Fourier series of (sin(x))^2 is: 1/2 + (1/2)cos(2x) + (1/4)cos(4x) + (1/4)cos(6x) + ...

What is the significance of the coefficients in the Fourier series of (sin(x))^2?

The coefficients in the Fourier series of (sin(x))^2 represent the amplitudes of the sine functions with different frequencies. They determine the contribution of each frequency to the overall function.

How is the accuracy of a Fourier series for (sin(x))^2 determined?

The accuracy of a Fourier series for (sin(x))^2 depends on the number of terms included in the series. The more terms that are included, the closer the approximation will be to the actual function. However, the accuracy is also affected by how well the function can be represented by a finite number of sine functions.

Similar threads

Replies
3
Views
1K
Replies
1
Views
1K
Replies
6
Views
2K
Replies
4
Views
1K
Replies
4
Views
1K
Back
Top