Where is this (1/2) coming from in Fourier series - Page 1
Forum section: electronics / projects

author: MathWizard
author_rank: Super Contributor
timestamp: August 28, 2022, 04:01:45 pm
content: I'm just learning some Fourier analysis, and it's nothing new so far. I did the problem in the picture and I get a_n and b_n right, but I don't know why the a_0 is divided by 2, in the setup equation, with the red box around it." alt="" class="bbc_img" />Searching Fourier series in images, I see the equation's I used, and I'm still missing why that (1/2) is there. I had a_0=(2+4)/4=3/2https://www.google.com/search?q=Fourier+Series+a0&tbm=isch&ved=2ahUKEwj-wvXj6-n5AhURtXIEHYwRDK0Q2-cCegQIABAA&oq=Fourier+Series+a0&gs_lcp=CgNpbWcQAzIFCAAQgAQyBQgAEIAEMgUIABCABDIECAAQGDIECAAQGDoHCAAQsQMQQzoECAAQQzoGCAAQHhAFOgYIABAeEAhQsQlY3TpgnlZoAnAAeACAAb4CiAG2BpIBBzIuMy4wLjGYAQCgAQGqAQtnd3Mtd2l6LWltZ8ABAQ&sclient=img&ei=j4gLY76_FZHqytMPjKOw6Ao&bih=1200&biw=1136&client=firefox-b-dI can also see if it was adding the lower area as negative, then (-2+4)/4=1=a_0, I need to do more examples, but I thought a_0 was just a_0*cos(0*wt), and a constant make sense to allow for translations up/down.And the average value above zero is 0.5=-1+(2-(-1))/2 = -1+3/2=0.5. So I'm missing something in the definitions, and I know the duty cycle is 0.5, , and (A_hi-A_lo)*D=3/2

author: ledtester
author_rank: Super Contributor
timestamp: August 28, 2022, 04:50:34 pm
content: Mathworld says:https://mathworld.wolfram.com/FourierSeries.htmlQuoteThat is, to preserve symmetry a_0, a_n and b_n are all defined using similar integrals.However, note that the Fourier series of a constant function is just the constant itself. So if you define \$a_0\$ as:$$a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\,dx$$then the constant term of the Fourier series will have to be \$a_0/2\$.Ultimately it has to do with the fact that inner product of, say, \$\cos(nx) \$ with itself is \$\pi\$ but the inner product of the constant 1 with itself is \$2\pi\$:$$\int_{-\pi}^\pi \cos^2 nx\,dx = \pi \quad\quad\text{but}\quad\quad \int_{-\pi}^\pi 1\cdot 1 \,dx = 2\pi$$Mathworld's page on Generalized Fourier Series has all of the details:https://mathworld.wolfram.com/GeneralizedFourierSeries.htmlThe constants \$c_n\$ are not all the same -- \$c_0 = 2\pi\$ and \$c_n = \pi\$ for \$n > 0\$ in eq (4).

author: bson
author_rank: Unknown
timestamp: August 28, 2022, 08:59:20 pm
content: But this is the function to calculate the series on, not the resulting Fourier series. To me it just looks like they normalize x in f(x) to [-1,1].

author: AlcidePiR2
author_rank: Regular Contributor
timestamp: August 29, 2022, 02:34:47 am
content: First of all, the text of the exercise is not written properly. It should be said that \$ f(x)\$ is a periodic function of period 4 defined on \$ [-2:2[\$by .....Then, the expression given by \$ f(x)\$ is just a definition for \$ a_0 \$. You could as well state$$f(x) = a_0 + \sum_{n=1}^\infty \left( a_n \cos (nx\frac{\pi }{2}) +b_n \sin (nx\frac{\pi }{2})\right)$$In this case you would have$$a_0 = \frac{1}{4}\int_{-2}^2 f(x) dx = \frac{1}{2}$$with the same final result.To justify the above formula, you just compute$$\int_{-2}^2 f(x) dx = \int_{-2}^2 a_0 dx + \sum_{n=1}^\infty \left( a_n \int_{-2}^2 \cos (nx\frac{\pi }{2}) dx +b_n \int_{-2}^2\sin (nx\frac{\pi }{2}) dx\right)$$but all the integrals, except the first one are null, and you are left with$$\int_{-2}^2 f(x) dx = 4 a_0 \ ,$$that is$$a_0=\frac{1}{4} \int_{-2}^2 f(x) dx \ .$$For the computation of a coefficient \$ a_k\$ with \$ k \neq 0 \$, you compute$$\int_{-2}^2 f(x) \cos (kx\frac{\pi }{2}) dx$$as above, all terms will cancel, and you are left with$$\int_{-2}^2 f(x) \cos (kx\frac{\pi }{2}) dx = a_k \int_{-2}^2 \cos^2 (kx\frac{\pi }{2}) dx =a_k \frac{2}{\pi}\int_{-\pi}^\pi \cos^2 (ku) du= 2 a_k$$with the change of variable \$ u= x\frac{\pi}{2}\$.(remember that \$ \int_{-\pi}^{\pi} \cos^2 (ku) du = \pi \$ ).hence the result$$a_k = \frac{1}{2} \int_{-2}^2 f(x) \cos (kx\frac{\pi }{2}) dx$$

author: MathWizard
author_rank: Super Contributor
timestamp: September 01, 2022, 02:51:41 pm
content: Ok I can get a few examples right now, I've been using a few different pdf's and they aren't all the same, or for the same subject. There's some good video's on youtube too.There's lot's to learn but at least I remember most the calculus. But I need to brush up on finding infinite sums, I can't remember how to solve most of them, like (1-1/3+1/5-1/7....I wanted to make a basic FtoV op-amp circuit, for a fan without PWM. So it's about time I learn how to model more complex waveforms. But I bet plugging a Fourier series into a mosfet eq, will be another matter altogether.

author: MathWizard
author_rank: Super Contributor
timestamp: September 22, 2022, 11:42:09 pm
content: Now I forget I know step functions, and I was just going over that and ramp functions. But I've never tried those as actual signals like that in a circuit analysis with transistors.