The last time I dealt with that topic was over 45 years ago, and frankly I don't feel confident enough to answer.
Perhaps some of the other math experts might want to take a crack at it if they are on.
I'm trying to find the Fourier Series of a function which is 1 from -pi/2 to pi/2, and zero everywhere else
inside of -pi to pi. I realize this is a square wave and I began the problem with a piecewise function
s(t) = 1 abs(t) < pi/2
0 abs(t) > pi/2
Then I had
a_k = 1/pi integral(from -pi to pi) of [cos(kt)dt]
and
b_k = 1/pi integral(from -pi to pi) of [sin(kt)dt]
but I don't know what to do from here.
Any help is greatly appreciated, thank you!
Perhaps some of the other math experts might want to take a crack at it if they are on.
However this function has to be zero from - oo to - pi/2
Then it jumps up one at -pi/2
Then it jumps down one at +pi/2
That is a unit step up at -pi/2
minus
A unit step up at + pi/2
a_k = 1/pi integral(from -pi to pi) of [cos(kt)dt]
= 1/(k pi) [sin k pi - sin(-k pi)
= (2/k pi)sin k pi
which is the answer
and
b_k = 1/pi integral(from -pi to pi) of [sin(kt)dt]
= 1/(k pi) [-cos k pi + cos -k pi}
= 0 because cosine is even
a_k = (1/pi) ∫[from -pi to pi] cos(kt) dt
To evaluate the integral, you can use the trigonometric identity:
∫ cos(kt) dt = (1/k) sin(kt) + C
Where C is the constant of integration. Applying this identity, we get:
a_k = (1/pi) [ (1/k) sin(kt) ] [from -pi to pi]
Now, let's substitute the limits of integration:
a_k = (1/pi) [ (1/k) sin(k * pi) - (1/k) sin(-k * pi) ]
Since sin(-x) = -sin(x), we can simplify it further:
a_k = (1/pi) [ (1/k) sin(k * pi) + (1/k) sin(k * pi) ]
a_k = (2/pi) (1/k) sin(k * pi)
Now, let's find b_k:
b_k = (1/pi) ∫[from -pi to pi] sin(kt) dt
Using the same trigonometric identity from before:
∫ sin(kt) dt = (-1/k) cos(kt) + C
Applying this identity, we get:
b_k = (1/pi) [ (-1/k) cos(kt) ] [from -pi to pi]
Now, substitute the limits of integration:
b_k = (1/pi) [ (-1/k) cos(k * pi) - (-1/k) cos(-k * pi) ]
Again, using the fact that cos(-x) = cos(x):
b_k = (1/pi) [ (-1/k) cos(k * pi) - (-1/k) cos(k * pi) ]
b_k = 0
Since b_k evaluates to zero, we only need to consider the term for a_k in the Fourier series.
The Fourier series representation for the given square wave function is:
s(t) = (2/pi) ∑ [(1/k) sin(k * pi) cos(kt)]
The summation is taken over all odd values of k.
I hope this explanation helps you understand how to find the Fourier series of a square wave function. Let me know if you need any further clarification!