# [SOLVED]Fourier Series

#### nacho

##### Active member
Hi, please refer to the attached image.

I am having trouble when doing
Exercise 2
Here is what I did:

$\int_{-2}^{2}(f(x)\sin(\frac{m\pi x}{2}))dx = \sin(\frac{m\pi x}{2})a_{0} + \int_{-2}^{2} \sum\limits_{n=1}^\infty (a_{n}(\cos(\frac{n\pi x}{2})\sin(\frac{m\pi x}{2})+b_{n}\sin(\frac{n\pi x}{2})\sin(\frac{m\pi x}{2}))$

and we have to show that $b_n$ is equal to $0$, for all $n$. However
is it not true, that since the terms in the sum are mutually orthogonal, we will no longer have anything within the sum when it is integrated from -2 to 2?

In which case, we will not have a $b_{n}$? As I type this, I realise... that this is what makes $b_{n}$ = 0, but in case I am wrong, could someone please point me to the right direction?
Do I even need to evaluate the left hand side integral or the integral for $a_0$ for exercise 2?

exercise 3
I am confused what to do after using the orthogonality again.
I am left with:

$\int_{-2}^{2} f(x) \cos(\frac{m \pi x}{2})dx$ = $\int_{-2}^{2}a_0\cos(\frac{m \pi x}{2})dx$

how do i treat the f(x) ?
I am unsure how to get $a_n$ from this.

although, i know that since m is fixed, where m = n we will get a non-zero term. I feel like this has something to do with what I need.

Thanks

#### Attachments

• 69.8 KB Views: 21
Last edited:

#### nacho

##### Active member
Thanks for that, although

Could I just get verification if I am correct with my reasoning exercise 2?

as for exercise 3 I will check the notes. I have read through Differential Equations - Boyce et al which also had some very similar problems to my question, but am still a little unsure as to how to solve my question given the particular conditions.

#### dwsmith

##### Well-known member
The way you have it setup bn is not 0 since the length is from (-2, 2) the integral of $$\sin^2$$ is $$L/2$$ where $$L = 4$$.

However, $$a_n = 0$$ since sine and cosine are orthogonal.
$\int_{-\pi}^{\pi}\sin(nx)\cos(nx)dx = 0$
and
$\int_{-\pi}^{\pi}\sin(nx)\sin(nx)dx = \frac{2\pi}{2} = \pi$
As well as showing what you have done, you should also show the problem.

#### nacho

##### Active member
The question in regards to showing $b_n$ = 0 is exercise 2 of the attached image.

if you could refer to image attached to this post, could you explain why $b_n$ is not zero in my question?

It does indeed say that L = P/2 = 2, so L = 2. I think you were meaning to say that P=4 not L=4.

since this is the case,
that would make $b_n = 0$ because when integrating that term, it disappears?

The second thing i'm unsure about is how to integrate the term on the left hand side, with the $f(x)\sin(\frac{m\pi x}{2}$

Thanks once again edit: OKay, I think i have the answer. I overlooked that f(x) was a hybrid function.

since the bounds are between -2 and 2, 1<|x|<2 so f(x) = 0
thus $b_n = 0$ ?
Although using the same logic, I don't tihnk I could get an answer for exercise 3?

Could someone tell me where i am going wrong?

#### Attachments

• 80.5 KB Views: 16
Last edited:

#### topsquark

##### Well-known member
MHB Math Helper
You have to prove this (obviously) but the $$\displaystyle b_n$$ are, in fact, all 0. The signal function is even, so no odd parity terms will be in the Fourier expansion. Just my two cents about that comment.

-Dan

#### dwsmith

##### Well-known member
For 3, we have that
$\int_{-2}^2a_n\cos\left(\frac{n\pi x}{2}\right)\cos\left(\frac{m\pi x}{2}\right)dx$
This integral is 0 if $$m\neq n$$. So the summation is only nonzero when $$n = m$$ so the integral we are solving is then
$\int_{-2}^2a_n\cos^2\left(\frac{n\pi x}{2}\right)dx$
Using trig, we know that $$\cos^2(x) = \frac{1}{2} + \frac{\cos(2x)}{2}$$.
$\int_{-2}^2\frac{a_n}{2}dx = 2a_n$
That is, $$2a_n = \int_{-2}^2f(x)\cos\left(\frac{n\pi x}{2}\right)dx$$.
$a_n = \int_{-1}^1\cos\left(\frac{n\pi x}{2}\right)dx = \left.\frac{2}{n\pi}\sin \left(\frac{n\pi x}{2}\right)\right|_{-1}^1 = \frac{2}{n\pi} \left( \sin \left(\frac{n\pi}{2}\right) - \sin \left(-\frac{n\pi}{2}\right) \right)$
Sine is odd so $$\sin(-x) = -\sin(x)$$. Using this fact, we have
$a_n = \frac{4}{n\pi}\sin \left(\frac{n\pi}{2}\right).$