Solving Even Function Integrals: $a_0$ & $a_n$

Click For Summary

Discussion Overview

The discussion revolves around solving integrals related to the Fourier coefficients of an even function defined by the absolute value of the sine function. Participants explore the calculations for the coefficients \(a_0\) and \(a_n\) and address issues arising from the evaluation of these integrals.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants assert that the function \(f(\theta) = |\sin\theta|\) is even and provide the expression for its Fourier series.
  • There is a claim that the integral for \(a_0\) evaluates to zero, which is challenged by others who calculate it as \(2\) and suggest that \(a_0 = \frac{4}{\pi}\).
  • Participants discuss the integral for \(a_n\) and present different approaches to evaluate it, including integration by parts.
  • Some participants express confusion over the derivation of certain integrals, questioning why a specific form appears instead of a simpler expression.
  • There are multiple references to the Fourier series representation, with some participants noting the need to multiply by \(\frac{2}{\pi}\) to obtain the correct coefficients.
  • Disagreements arise regarding the correctness of certain steps in the calculations, with participants asserting their confidence in their respective answers.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the evaluation of the integrals, with multiple competing views on the correct values of \(a_0\) and \(a_n\). The discussion remains unresolved regarding the specific calculations and interpretations of the integrals.

Contextual Notes

Some participants note that the evaluation of integrals depends on careful application of integration techniques, and there are unresolved issues regarding the assumptions made in the calculations.

Dustinsfl
Messages
2,217
Reaction score
5
$f(-\theta) = |\sin(-\theta)| = |-\sin\theta| = |\sin\theta| = f(\theta)$.
Hence, $f$ is even, and we need to only consider.
$$
f(\theta) = \frac{a_0}{2} + \sum_{n = 1}^{\infty}a_n\cos n\theta.
$$

$$
a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi}|\sin\theta|d\theta = \frac{1}{\pi}\int_{0}^{\pi}\sin\theta d\theta - \frac{1}{\pi}\int_{-\pi}^0\sin\theta d\theta = \frac{2}{\pi}\int_{0}^{\pi}\sin\theta d\theta
$$
but when I solve this integral, I get 0.
How do I solve this integral?
$$
a_n =\frac{1}{\pi}\int_{-\pi}^{\pi}|\sin\theta|\cos n\theta d\theta = \frac{2}{\pi}\int_{-\pi}^{\pi}\sin\theta\cos n\theta d\theta
$$
 
Physics news on Phys.org
Hi dwsmith, :)

dwsmith said:
$f(-\theta) = |\sin(-\theta)| = |-\sin\theta| = |\sin\theta| = f(\theta)$.
Hence, $f$ is even, and we need to only consider.
$$
f(\theta) = \frac{a_0}{2} + \sum_{n = 1}^{\infty}a_n\cos n\theta.
$$

$$
a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi}|\sin\theta|d\theta = \frac{1}{\pi}\int_{0}^{\pi}\sin\theta d\theta - \frac{1}{\pi}\int_{-\pi}^0\sin\theta d\theta = \frac{2}{\pi}\int_{0}^{\pi}\sin\theta d\theta
$$
but when I solve this integral, I get 0.

\[\int_{0}^{\pi}\sin\theta d\theta=\left. -\cos\theta\right|^{\pi}_{0}=-\cos\pi+\cos 0=1+1=2\]

dwsmith said:
How do I solve this integral?
$$
a_n =\frac{1}{\pi}\int_{-\pi}^{\pi}|\sin\theta|\cos n\theta d\theta = \frac{2}{\pi}\int_{-\pi}^{\pi}\sin\theta\cos n\theta d\theta
$$

\begin{eqnarray}

\int_{-\pi}^{\pi}|\sin\theta|\cos n\theta d\theta&=&-\int_{-\pi}^{0}\sin\theta\cos n\theta d\theta+\int_{0}^{\pi}\sin\theta\cos n\theta d\theta\\

&=&\int_{0}^{\pi}\sin\theta\cos (n\pi-n\theta) d\theta+\int_{0}^{\pi}\sin\theta\cos n\theta d\theta\\

&=&(-1)^{n}\int_{0}^{\pi}\sin\theta\cos n\theta d\theta+\int_{0}^{\pi}\sin\theta\cos n\theta d\theta\\

\end{eqnarray}

\[\therefore a_{2n}=\frac{2}{\pi}\int_{0}^{\pi}\sin\theta\cos 2n\theta d\theta\mbox{ and }a_{2n+1}=0\mbox{ where }n\geq 1\]

Use integration by parts to evaluate this integral. Solution can be found >>here<<.

Kind Regards,
Sudharaka.
 
Last edited:
Sudharaka said:
$$
\int_{0}^{\pi}\sin\theta\cos (n\pi+n\theta) d\theta+\int_{0}^{\pi}\sin\theta\cos n\theta d\theta
$$
$$
(-1)^{n}\int_{0}^{\pi}\sin\theta\cos n\theta d\theta+\int_{0}^{\pi}\sin\theta\cos n\theta d\theta
$$

Why do you have this instead of
$$
2\int_{0}^{\pi}\sin\theta\cos n\theta d\theta
$$
 
dwsmith said:
$f(-\theta) = |\sin(-\theta)| = |-\sin\theta| = |\sin\theta| = f(\theta)$.
Hence, $f$ is even, and we need to only consider.
$$
f(\theta) = \frac{a_0}{2} + \sum_{n = 1}^{\infty}a_n\cos n\theta.
$$

$$
a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi}|\sin\theta|d\theta = \frac{1}{\pi}\int_{0}^{\pi}\sin\theta d\theta - \frac{1}{\pi}\int_{-\pi}^0\sin\theta d\theta = \frac{2}{\pi}\int_{0}^{\pi}\sin\theta d\theta
$$
but when I solve this integral, I get 0.
$\displaystyle \int_{0}^{\pi}\sin\theta\, d\theta = 2$, so you should get $a_0 = 4/\pi.$

dwsmith said:
How do I solve this integral?
$$
a_n =\frac{1}{\pi}\int_{-\pi}^{\pi}|\sin\theta|\cos n\theta d\theta = \frac{2}{\pi}\int_{\color{red}0}^{\pi}\sin\theta \cos n\theta d\theta
$$
Integrate by parts twice, to get $$\int_{0}^{\pi}\sin\theta\cos n\theta\, d\theta = \begin{cases}\frac{-2}{n^2-1} & (n \text{ even}), \\ 0 & (n \text{ odd}). \end{cases}$$
 
dwsmith said:
Why do you have this instead of
$$
2\int_{0}^{\pi}\sin\theta\cos n\theta d\theta
$$

Both answers are fine, I didn't realize that first and made a confusion by thinking your answer is wrong. Opalg's post seem to answer your question directly.

Kind Regards,
Sudharaka.
 
The Fourier series is
$$
\frac{2}{\pi} - 2\sum_{n = 1}^{\infty}\frac{1}{4n^2 - 1}\cos 2n\theta.
$$
 
dwsmith said:
The Fourier series is
$$
\frac{2}{\pi} - 2\sum_{n = 1}^{\infty}\frac{1}{4n^2 - 1}\cos 2n\theta.
$$
Getting there! But you have still forgotten to multiply the integral by $2/\pi$ to get $a_n.$ The answer should be $$\frac{2}{\pi} - \frac4\pi\sum_{n = 1}^{\infty}\frac{1}{4n^2 - 1}\cos 2n\theta.$$
 
Opalg said:
Getting there! But you have still forgotten to multiply the integral by $2/\pi$ to get $a_n.$ The answer should be $$\frac{2}{\pi} - \frac4\pi\sum_{n = 1}^{\infty}\frac{1}{4n^2 - 1}\cos 2n\theta.$$

I had
$$
\frac{-2}{n\pi}\left[\left.\frac{\cos\theta\cos n\theta}{n}\right|_0^{\pi} - \frac{1}{n}\int_0^{\pi}\cos n\theta\sin\theta d\theta\right] = \frac{2}{\pi}\int_0^{\pi}\cos n\theta\sin\theta d\theta
$$
The $2/\pi$ canceled.
 
dwsmith said:
The $2/\pi$ canceled.
Huh? What did it cancel with? I can guarantee that the answer I gave in my previous comment is correct.
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 29 ·
Replies
29
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 19 ·
Replies
19
Views
2K