- #1
zenterix
- 423
- 60
- Homework Statement
- While calculating the Fourier series of a function I reached the following expression (for one class of Fourier coefficients):
- Relevant Equations
- $$\frac{1}{n\pi}\sin{\left ( \frac{n\pi}{2} \right )}$$
I could summarize this as
##\frac{1}{n\pi}## for ##n=1, 5, 9, \ldots##
##\frac{-1}{n\pi}## for ##n=3, 7, 11, \ldots##
and ##0## for all other ##n##.
How would I go about writing this in a single expression, with ##(-1)^{f(n)}## where ##f(n)## summarizes both cases above?
##\frac{1}{n\pi}## for ##n=1, 5, 9, \ldots##
##\frac{-1}{n\pi}## for ##n=3, 7, 11, \ldots##
and ##0## for all other ##n##.
How would I go about writing this in a single expression, with ##(-1)^{f(n)}## where ##f(n)## summarizes both cases above?