Calculating Fourier Series of $f(\theta)$ on $[\pi, -\pi]$

In summary, to calculate the Fourier series of the function $f$ defined on the interval $[\pi, -\pi]$ and given by $f(\theta) = \begin{cases} 1 & \text{if} \ 0\leq\theta\leq\pi\\ -1 & \text{if} \ -\pi < \theta < 0 \end{cases}$, we use the fact that $f$ is periodic with period $2\pi$ and odd. This means that $f(-\theta) = -f(\theta)$ and we can write $f(\theta) = \sum\limits_{n = -\infty}^{\infty}a
  • #1
Dustinsfl
2,281
5
Calculate the Fourier series of the function $f$ defined on the interval $[\pi, -\pi]$ by
$$
f(\theta) =
\begin{cases} 1 & \text{if} \ 0\leq\theta\leq\pi\\
-1 & \text{if} \ -\pi < \theta < 0
\end{cases}.
$$
$f$ is periodic with period $2\pi$ and odd since $f$ is symmetric about the origin.
So $f(-\theta) = -f(\theta)$.
Let $f(\theta) = \sum\limits_{n = -\infty}^{\infty}a_ne^{in\theta}$.
Then $f(-\theta) = \sum\limits_{n = -\infty}^{\infty}a_ne^{-in\theta} = \cdots + a_{-2}e^{2i\theta} + a_{-1}e^{i\theta} + a_0 + a_{1}e^{-i\theta} + a_{2}e^{-2i\theta}+\cdots$
$-f(\theta) = \sum\limits_{n = -\infty}^{\infty}a_ne^{-in\theta} = \cdots - a_{-2}e^{-2i\theta} - a_{-1}e^{-i\theta} - a_0 - a_{1}e^{i\theta} - a_{2}e^{2i\theta}-\cdots$

$a_0 = -a_0 = 0$

I have solved many Fourier coefficients but I can't think today.

What do I need to do next?
 
Physics news on Phys.org
  • #2
$$
a_n = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(\theta)e^{-im\theta}d\theta
$$
Since my function is defined piecewise, would I write it as
$$
a_n = \frac{1}{2\pi}\left[\int_0^{\pi}e^{-im\theta}d\theta - \int_{-\pi}^0e^{-im\theta}d\theta\right]
$$
 
  • #3
dwsmith said:
$$
a_n = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(\theta)e^{-im\theta}d\theta
$$
Since my function is defined piecewise, would I write it as
$$
a_n = \frac{1}{2\pi}\left[\int_0^{\pi}e^{-im\theta}d\theta - \int_{-\pi}^0e^{-im\theta}d\theta\right]
$$
Yes. (Yes)

(But since this is an odd function, you might find it easier to use the real rather than the complex Fourier series. The cosine terms will all be zero and you will only have to deal with the sine terms. To evaluate them, do just what you are doing with the complex terms, writing them as the difference between the integrals on the intervals [0,1] and [-1,0].)
 
  • #4
Opalg said:
Yes. (Yes)

(But since this is an odd function, you might find it easier to use the real rather than the complex Fourier series. The cosine terms will all be zero and you will only have to deal with the sine terms. To evaluate them, do just what you are doing with the complex terms, writing them as the difference between the integrals on the intervals [0,1] and [-1,0].)
When I solve, I have
$$
-\frac{1}{2\pi}\int_0^{\pi}\sin m\theta d\theta = \frac{1}{\pi m}
$$
and
$$
-\frac{1}{2\pi}\int_{-\pi}^0\sin m\theta d\theta = -\frac{1}{\pi m}
$$

I think the integral has to be
$$
-\frac{1}{\pi}\int_0^{\pi}\sin m\theta d\theta = \frac{2}{\pi m}
$$

Now what?
 
Last edited:
  • #5
dwsmith said:
When I solve, I have
$$
-\frac{1}{2\pi}\int_0^{\pi}\sin m\theta d\theta = \frac{1}{\pi m}
$$
and
$$
-\frac{1}{2\pi}\int_{-\pi}^0\sin m\theta d\theta = -\frac{1}{\pi m}
$$

I think the integral has to be
$$
-\frac{1}{\pi}\int_0^{\pi}\sin m\theta d\theta = \frac{2}{\pi m}
$$

Now what?
Try doing those integrals again. $$\begin{aligned}\int_0^\pi\sin m\theta\,d\theta &=\Bigl[-\tfrac1m\cos m\theta\Bigr]_0^\pi \\ &= -\tfrac1m\bigl(\cos m\pi - \cos 0\bigr) \\ &= -\tfrac1m\bigl((-1)^m - 1\bigr) \\ &= \begin{cases}0 &\text{ (if $m$ is even),} \\2/m &\text{ (if $m$ is odd).}\end{cases} \end{aligned}$$

The integral from -1 to 0 is the same but with a minus sign. You should then find that the Fourier series for $f(\theta)$ is $$\sum_{k=0}^\infty\frac4{(2k+1)\pi}\sin(2k+1) \theta.$$
 

FAQ: Calculating Fourier Series of $f(\theta)$ on $[\pi, -\pi]$

1. How do you calculate the coefficients for a Fourier Series of $f(\theta)$ on $[\pi, -\pi]$?

The coefficients for a Fourier Series of $f(\theta)$ on $[\pi, -\pi]$ can be calculated using the following formula:
$a_n = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(\theta)\cos(n\theta)d\theta$
$b_n = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(\theta)\sin(n\theta)d\theta$
where $a_n$ and $b_n$ are the coefficients for the cosine and sine terms, respectively.

2. What is the purpose of calculating the Fourier Series of $f(\theta)$ on $[\pi, -\pi]$?

The Fourier Series of $f(\theta)$ on $[\pi, -\pi]$ allows us to express a periodic function as a sum of sinusoidal functions. This is useful in many applications, such as signal processing and image reconstruction.

3. Can the Fourier Series of $f(\theta)$ on $[\pi, -\pi]$ be used to approximate non-periodic functions?

No, the Fourier Series of $f(\theta)$ on $[\pi, -\pi]$ is only applicable to periodic functions.

4. How does the number of terms in the Fourier Series affect the accuracy of the approximation?

The more terms included in the Fourier Series, the better the approximation will be. However, including too many terms can also lead to overfitting and loss of accuracy. It is important to choose an appropriate number of terms based on the complexity of the function being approximated.

5. Are there any special considerations when calculating the Fourier Series for discontinuous functions?

Yes, when calculating the Fourier Series for discontinuous functions, special techniques such as the Gibbs phenomenon must be taken into account to ensure accurate results. Additionally, the coefficients for discontinuous functions may be different from those for continuous functions.

Similar threads

Back
Top