Captain1024
- 44
- 2
Homework Statement
Link: http://i.imgur.com/klFmtTH.png
Homework Equations
a_0=\frac{1}{T_0}\int ^{T_0}_{0}x(t)dt
a_n=\frac{2}{T_0}\int ^{\frac{T_0}{2}}_{\frac{-T_0}{2}}x(t)cos(n\omega t)dt
\omega =2\pi f=\frac{2\pi}{T_0}
The Attempt at a Solution
Firstly, x(t) is an even function because x=1/2 when t=-t_0 and t=t_0. Therefore, all bn coefficients of the Fourier series will be zero.
T_0=4, \omega =\frac{2\pi}{4}=\frac{\pi}{2}, t_0=1
a0 is basicly the average value of x(t) over the period. By inspection a0 = 2/4 = 1/2
It makes sense to me to split up x(t) into regions:
x(t) = 0 when \frac{-T_0}{2}<t<-t_0, t_0<t<\frac{T_0}{2}
x(t) = 1/2 when t=^+_-t_0
x(t) = 1 when -t_0<t<t_0
a_n=\frac{2}{T_0}[\frac{1}{2}\int ^{-t_0}_{-t_0}cos(n\omega t)dt+\int ^{t_0}_{-t_0}cos(n\omega t)dt+\frac{1}{2}\int ^{t_0}_{t_0}cos(n\omega t)]
=\frac{2}{n\omega T_0}(1+[sin(\frac{\pi}{2}nt)]^{t_0}_{-t_0})
=\frac{2}{n\omega T_0}[1+(sin(\frac{\pi}{2}nt_0)-sin(\frac{-\pi}{2}nt_0)]
=\frac{2}{n\omega T_0}[1+2sin(\frac{\pi n}{2})]
a_0=\frac{1}{2}, a_1=\frac{3}{\pi}, a_2=\frac{1}{2\pi}, a_3=\frac{-1}{3\pi}, a_4=\frac{1}{4\pi}, a_5=\frac{3}{5\pi}, a_6=\frac{1}{6\pi}
(1) asks for coefficients in exponential and trigonometric forms. Are the coefficients I calculated above correct for either of those forms? How do I get the coefficients in the other form?
(2) & (3) ask for a MatLab plots. We haven't gone over any MatLab in class. If someone could point me in the right direction I think I can figure it out. I've worked with MatLab in the past.
Thanks for your time.
-Captain1024