Colton B.
asked 01/04/22Fourier series Piecewise
I am trying to self teach Fourier series and can't seem to figure this one out.
How do I approach solving a Fourier series piecewise function f(x) = 1 if 0 < x < pi or f(x) = 2 if pi < x < 2pi . keeping in mind this is one whole piecewise function.
Thanks in advance.
1 Expert Answer
Bradford T. answered 01/11/22
MS in Electrical Engineering with 40+ years as an Engineer
Going back to basics
For piecewise integrals, you split the integration into two integrals. The first one from 0 to π and the second
from π to 2π.
a0 is the DC component or average of the function or a0 = (2+1)/2 = 3/2
an = (1/π)∫02πf(t)cos(nt)dt =0
bn = (1/π)∫02πf(t)sin(nt)dt = (1/(nπ) [ -cos(nπ)+1 -2(cos(2nπ)-cos(nπ))]
= 0 when n is even
=2/(nπ) when n is odd
∞
f(x) = 3/2 + (2/(nπ))∑n=1,3,5,...sin(nx)
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Stanton D.
I think what you are asking yourself to do is to generate a series which resembles this step function as closely as possible? You do that by multiplying the function by the prospective terms (all harmonics of 1.5 +- sin(nx) +- cos(nx)). The integrals you obtain (over 0 to 2pi) are coefficients of the terms in the series you are assembling. It does take quite a few terms to start settling down to a recognizable square wave! And you will notice that the sum "overshoots" the step, long after the middle portions look flattish. -- Cheers, --Mr. d.01/04/22