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

In summary: If you don't believe me, you can double-check using the substitutions $u = \cos\theta$ and $du = -\sin\theta\, d\theta.$Kind Regards,Sudharaka.In summary, the given function $f(-\theta) = |\sin(-\theta)| = |-\sin\theta| = |\sin\theta| = f(\theta)$ is even and can be represented by the Fourier series $f(\theta) = \frac{a_0}{2} + \sum_{n=1}^{\infty}a_n\cos n\theta$, where $a_0 = \frac{2}{\pi}\int_{0}^{\pi
  • #1
Dustinsfl
2,281
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
  • #2
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:
  • #3
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
$$
 
  • #4
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}$$
 
  • #5
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.
 
  • #6
The Fourier series is
$$
\frac{2}{\pi} - 2\sum_{n = 1}^{\infty}\frac{1}{4n^2 - 1}\cos 2n\theta.
$$
 
  • #7
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.$$
 
  • #8
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.
 
  • #9
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.
 

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

What is an even function integral?

An even function integral is an integral where the function being integrated is symmetric about the y-axis. This means that if you were to fold the graph of the function along the y-axis, the two halves would overlap perfectly. Examples of even functions include cos(x), x^2, and |x|.

What is the significance of $a_0$ and $a_n$ in solving even function integrals?

In solving even function integrals, $a_0$ represents the constant term in the Fourier series expansion of the function, while $a_n$ represents the coefficient of the cosine term. These values are important because they allow us to express the even function as a sum of cosine functions, making it easier to integrate.

How do you find the value of $a_0$ and $a_n$ in even function integrals?

To find the value of $a_0$, you can use the formula a_0 = 1/π ∫f(x)dx, where f(x) is the even function being integrated. To find the value of $a_n$, you can use the formula a_n = 1/π ∫f(x)cos(nx)dx. These integrals can be evaluated using integration by parts or other integration techniques.

Can you use $a_0$ and $a_n$ to solve any even function integral?

Yes, $a_0$ and $a_n$ can be used to solve any even function integral. However, in some cases, it may be more efficient to use other integration techniques such as substitution or trigonometric identities.

Are there any limitations to using $a_0$ and $a_n$ in solving even function integrals?

One limitation of using $a_0$ and $a_n$ is that they can only be used for even functions. This means that if the function being integrated is not symmetric about the y-axis, these techniques cannot be applied. Additionally, the Fourier series representation may not converge for some functions, making it difficult to find the values of $a_0$ and $a_n$.

Similar threads

  • Topology and Analysis
Replies
16
Views
668
  • Topology and Analysis
Replies
4
Views
449
  • Calculus
Replies
29
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
781
Replies
4
Views
512
Replies
4
Views
463
Replies
4
Views
643
  • Calculus and Beyond Homework Help
Replies
4
Views
383
  • Calculus and Beyond Homework Help
Replies
3
Views
662
Replies
2
Views
501
Back
Top