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:(adsbygoogle = window.adsbygoogle || []).push({});

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 Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Fourier series for (sin(x))^2

**Physics Forums | Science Articles, Homework Help, Discussion**