The half-range sine series is the expansion for
![f(t)](https://tex.z-dn.net/?f=f%28t%29)
with the assumption that
![f(t)](https://tex.z-dn.net/?f=f%28t%29)
is considered to be an odd function over its full range,
![-1](https://tex.z-dn.net/?f=-1%3Ct%3C1)
. So for (a), you're essentially finding the full range expansion of the function
![f(t)=\begin{cases}2-t&\text{for }0\le t](https://tex.z-dn.net/?f=f%28t%29%3D%5Cbegin%7Bcases%7D2-t%26%5Ctext%7Bfor%20%7D0%5Cle%20t%3C1%5C%5C-2-t%26%5Ctext%7Bfor%20%7D-1%3Ct%3C0%5Cend%7Bcases%7D)
with period 2 so that
![f(t)=f(t+2n)](https://tex.z-dn.net/?f=f%28t%29%3Df%28t%2B2n%29)
for
![|t|](https://tex.z-dn.net/?f=%7Ct%7C%3C1)
and integers
![n](https://tex.z-dn.net/?f=n)
.
Now, since
![f(t)](https://tex.z-dn.net/?f=f%28t%29)
is odd, there is no cosine series (you find the cosine series coefficients would vanish), leaving you with
![f(t)=\displaystyle\sum_{n\ge1}b_n\sin\frac{n\pi t}L](https://tex.z-dn.net/?f=f%28t%29%3D%5Cdisplaystyle%5Csum_%7Bn%5Cge1%7Db_n%5Csin%5Cfrac%7Bn%5Cpi%20t%7DL)
where
![b_n=\displaystyle\frac2L\int_0^Lf(t)\sin\frac{n\pi t}L\,\mathrm dt](https://tex.z-dn.net/?f=b_n%3D%5Cdisplaystyle%5Cfrac2L%5Cint_0%5ELf%28t%29%5Csin%5Cfrac%7Bn%5Cpi%20t%7DL%5C%2C%5Cmathrm%20dt)
In this case,
![L=1](https://tex.z-dn.net/?f=L%3D1)
, so
![b_n=\displaystyle2\int_0^1(2-t)\sin n\pi t\,\mathrm dt](https://tex.z-dn.net/?f=b_n%3D%5Cdisplaystyle2%5Cint_0%5E1%282-t%29%5Csin%20n%5Cpi%20t%5C%2C%5Cmathrm%20dt)
![b_n=\dfrac4{n\pi}-\dfrac{2\cos n\pi}{n\pi}-\dfrac{2\sin n\pi}{n^2\pi^2}](https://tex.z-dn.net/?f=b_n%3D%5Cdfrac4%7Bn%5Cpi%7D-%5Cdfrac%7B2%5Ccos%20n%5Cpi%7D%7Bn%5Cpi%7D-%5Cdfrac%7B2%5Csin%20n%5Cpi%7D%7Bn%5E2%5Cpi%5E2%7D)
![b_n=\dfrac{4-2(-1)^n}{n\pi}](https://tex.z-dn.net/?f=b_n%3D%5Cdfrac%7B4-2%28-1%29%5En%7D%7Bn%5Cpi%7D)
The half-range sine series expansion for
![f(t)](https://tex.z-dn.net/?f=f%28t%29)
is then
![f(t)\sim\displaystyle\sum_{n\ge1}\frac{4-2(-1)^n}{n\pi}\sin n\pi t](https://tex.z-dn.net/?f=f%28t%29%5Csim%5Cdisplaystyle%5Csum_%7Bn%5Cge1%7D%5Cfrac%7B4-2%28-1%29%5En%7D%7Bn%5Cpi%7D%5Csin%20n%5Cpi%20t)
which can be further simplified by considering the even/odd cases of
![n](https://tex.z-dn.net/?f=n)
, but there's no need for that here.
The half-range cosine series is computed similarly, this time assuming
![f(t)](https://tex.z-dn.net/?f=f%28t%29)
is even/symmetric across its full range. In other words, you are finding the full range series expansion for
![f(t)=\begin{cases}2-t&\text{for }0\le t](https://tex.z-dn.net/?f=f%28t%29%3D%5Cbegin%7Bcases%7D2-t%26%5Ctext%7Bfor%20%7D0%5Cle%20t%3C1%5C%5C2%2Bt%26%5Ctext%7Bfor%20%7D-1%3Ct%3C0%5Cend%7Bcases%7D)
Now the sine series expansion vanishes, leaving you with
![f(t)\sim\dfrac{a_0}2+\displaystyle\sum_{n\ge1}a_n\cos\frac{n\pi t}L](https://tex.z-dn.net/?f=f%28t%29%5Csim%5Cdfrac%7Ba_0%7D2%2B%5Cdisplaystyle%5Csum_%7Bn%5Cge1%7Da_n%5Ccos%5Cfrac%7Bn%5Cpi%20t%7DL)
where
![a_n=\displaystyle\frac2L\int_0^Lf(t)\cos\frac{n\pi t}L\,\mathrm dt](https://tex.z-dn.net/?f=a_n%3D%5Cdisplaystyle%5Cfrac2L%5Cint_0%5ELf%28t%29%5Ccos%5Cfrac%7Bn%5Cpi%20t%7DL%5C%2C%5Cmathrm%20dt)
for
![n\ge0](https://tex.z-dn.net/?f=n%5Cge0)
. Again,
![L=1](https://tex.z-dn.net/?f=L%3D1)
. You should find that
![a_0=\displaystyle2\int_0^1(2-t)\,\mathrm dt=3](https://tex.z-dn.net/?f=a_0%3D%5Cdisplaystyle2%5Cint_0%5E1%282-t%29%5C%2C%5Cmathrm%20dt%3D3)
![a_n=\displaystyle2\int_0^1(2-t)\cos n\pi t\,\mathrm dt](https://tex.z-dn.net/?f=a_n%3D%5Cdisplaystyle2%5Cint_0%5E1%282-t%29%5Ccos%20n%5Cpi%20t%5C%2C%5Cmathrm%20dt)
![a_n=\dfrac2{n^2\pi^2}-\dfrac{2\cos n\pi}{n^2\pi^2}+\dfrac{2\sin n\pi}{n\pi}](https://tex.z-dn.net/?f=a_n%3D%5Cdfrac2%7Bn%5E2%5Cpi%5E2%7D-%5Cdfrac%7B2%5Ccos%20n%5Cpi%7D%7Bn%5E2%5Cpi%5E2%7D%2B%5Cdfrac%7B2%5Csin%20n%5Cpi%7D%7Bn%5Cpi%7D)
![a_n=\dfrac{2-2(-1)^n}{n^2\pi^2}](https://tex.z-dn.net/?f=a_n%3D%5Cdfrac%7B2-2%28-1%29%5En%7D%7Bn%5E2%5Cpi%5E2%7D)
Here, splitting into even/odd cases actually reduces this further. Notice that when
![n](https://tex.z-dn.net/?f=n)
is even, the expression above simplifies to
![a_{n=2k}=\dfrac{2-2(-1)^{2k}}{(2k)^2\pi^2}=0](https://tex.z-dn.net/?f=a_%7Bn%3D2k%7D%3D%5Cdfrac%7B2-2%28-1%29%5E%7B2k%7D%7D%7B%282k%29%5E2%5Cpi%5E2%7D%3D0)
while for odd
![n](https://tex.z-dn.net/?f=n)
, you have
![a_{n=2k-1}=\dfrac{2-2(-1)^{2k-1}}{(2k-1)^2\pi^2}=\dfrac4{(2k-1)^2\pi^2}](https://tex.z-dn.net/?f=a_%7Bn%3D2k-1%7D%3D%5Cdfrac%7B2-2%28-1%29%5E%7B2k-1%7D%7D%7B%282k-1%29%5E2%5Cpi%5E2%7D%3D%5Cdfrac4%7B%282k-1%29%5E2%5Cpi%5E2%7D)
So the half-range cosine series expansion would be
![f(t)\sim\dfrac32+\displaystyle\sum_{n\ge1}a_n\cos n\pi t](https://tex.z-dn.net/?f=f%28t%29%5Csim%5Cdfrac32%2B%5Cdisplaystyle%5Csum_%7Bn%5Cge1%7Da_n%5Ccos%20n%5Cpi%20t)
![f(t)\sim\dfrac32+\displaystyle\sum_{k\ge1}a_{2k-1}\cos(2k-1)\pi t](https://tex.z-dn.net/?f=f%28t%29%5Csim%5Cdfrac32%2B%5Cdisplaystyle%5Csum_%7Bk%5Cge1%7Da_%7B2k-1%7D%5Ccos%282k-1%29%5Cpi%20t)
![f(t)\sim\dfrac32+\displaystyle\sum_{k\ge1}\frac4{(2k-1)^2\pi^2}\cos(2k-1)\pi t](https://tex.z-dn.net/?f=f%28t%29%5Csim%5Cdfrac32%2B%5Cdisplaystyle%5Csum_%7Bk%5Cge1%7D%5Cfrac4%7B%282k-1%29%5E2%5Cpi%5E2%7D%5Ccos%282k-1%29%5Cpi%20t)
Attached are plots of the first few terms of each series overlaid onto plots of
![f(t)](https://tex.z-dn.net/?f=f%28t%29)
. In the half-range sine series (right), I use
![n=10](https://tex.z-dn.net/?f=n%3D10)
terms, and in the half-range cosine series (left), I use
![k=2](https://tex.z-dn.net/?f=k%3D2)
or
![n=2(2)-1=3](https://tex.z-dn.net/?f=n%3D2%282%29-1%3D3)
terms. (It's a bit more difficult to distinguish
![f(t)](https://tex.z-dn.net/?f=f%28t%29)
from the latter because the cosine series converges so much faster.)