Aruwin
Branch Unspecified
27 Jan 2012

# Fourier series

Please explain to me where does am come from? I dont understand the last part of the calculation where it becomes am Int(-pi-->pi)cos^2mxdx=piam

Arnav Joshi

Branch Unspecified
27 Jan 2012
Any integral of the form
$image=http://latex.codecogs.com/gif.latex?\int_{-\pi}^{\pi}cos(mx)cos(nx)dx%20=%200&hash=407708753bf893c7a26abe7a6e017ca9$ whenever m not equal to n and m,n are integers.

$image=http://latex.codecogs.com/gif.latex?\int_{-%20\pi%20}^{\pi}%20cos(mx)sin(nx)%20=%200&hash=dbd63d3cb28bf50e884f1d01b7306b7b$ for all values of m,n where m,n are integers.

whereas $image=http://latex.codecogs.com/gif.latex?\int_{-%20\pi%20}^{\pi}%20cos(mx)cos(mx)%20=%20\pi&hash=e00e792dce0838911f187f03f10c0424$

(If you notice there is a summation from n = 1 to infinity.)
Thus in the summation whenever n doesn't equal m we get zero. And in only one case n equals m. In that case the integral becomes pi. And this integral is multiplied by a[sub]n[/sub] , but since n = m hence
a[sub]n[/sub] = a[sub]m[/sub].

Note -
$image=http://latex.codecogs.com/gif.latex?\int_{-\pi}^{\pi}cos(mx)cos(nx)%20=%20\frac{1}{2}\int_{-\pi}^{\pi}(cos((m+n)x)%20+%20cos((m-n)x))&hash=598b44a86f93b135739ec4a57bf6c461$

integrate both the cos terms in the integral you will get zero.

when m = n ,
$image=http://latex.codecogs.com/gif.latex?\int_{-\pi}^{\pi}cos(mx)cos(mx)%20=%20\frac{1}{2}\int_{-\pi}^{\pi}(cos((m+m)x)%20+%20cos((m-m)x))&hash=95d71fa0387bf7e795369773bc3bef36$

= $image=http://latex.codecogs.com/gif.latex?\frac{1}{2}\int_{-\pi}^{\pi}%20cos(0)%20dx%20=%20\frac{1}{2}(2\pi)&hash=cd912165475399e97c40b98ccba234e6$

Reya

Branch Unspecified
27 Jan 2012
Integration results become zero when m&n are non negative(positive) integers.

Aruwin

Branch Unspecified
27 Jan 2012
Thanks for the explanations. I got it now. Now I have another question here.

And I don't get this part of the solution:

Isn't bn supposed to be 2/pi ???

Reya

Branch Unspecified
27 Jan 2012
Bn is 2/pi only when n=1.

Value of bn changes when n changes.

Aruwin

Branch Unspecified
27 Jan 2012
Reya
Bn is 2/pi only when n=1.

Value of bn changes when n changes.
It a bit complicated at first.Now I get what you mean 😀

Arnav Joshi

Branch Unspecified
27 Jan 2012
cos (n pi) = 1 when n is even and it is -1 when n is odd. Thus it is convenient to write cos (n pi) = (-1)[sup]n[/sup].
Thus b[sub]n[/sub] equals 2/(nπ) when (n-1) is odd and 0 when (n - 1) is even.

Aruwin
But even if n is not equals to 1, i got both n as the numerator and denominator so doesn't that make it equals to 1?And hence,times it with 2/pi I get Bn=2/pi
There isn't an n in numerator see the equation of bn again.

Aruwin

Branch Unspecified
27 Jan 2012
Arnav Joshi
cos (n pi) = 1 when n is even and it is -1 when n is odd. Thus it is convenient to write cos (n pi) = (-1)[sup]n[/sup].
Thus b[sub]n[/sub] equals 2/(nπ) when (n-1) is odd and 0 when (n - 1) is even.

There isn't an n in numerator.
And what about f(x)??I don't understand how the answer turned out like that 😔

Arnav Joshi

Branch Unspecified
27 Jan 2012
Aruwin
And what about f(x)??I don't understand how the answer turned out like that 😔
That is just the fourier expansion of f(x) in terms of bn.
The fourier series expression is a summation in terms of bn.
$image=http://latex.codecogs.com/gif.latex?f(x)%20=%20a_{0}%20+%20\sum_{n%20=%201}^{\infty}b_{n}%20sin(nx)%20+%20\sum_{n%20=%201}^{\infty}a_{n}%20cos(nx)&hash=5414a499e94a70f7a42dd8d6930ee104$
That summation is expanded.
All the a[sub]n[/sub] terms will be zero.

Reya

Branch Unspecified
27 Jan 2012
How come?

If you give even values for n, bn=0.

Arnav Joshi

Branch Unspecified
27 Jan 2012
Reya
How come?

If you give even values for n, bn=0.
bn has a term 1 - (-1)^n in numerator. When n is even you get 1 - 1. When n is odd you get 1 - (- 1). Odd Powers of -1 will give you -1 whereas even powers will give you 1.

Reya

Branch Unspecified
27 Jan 2012
Er..I asked how come to aruwin. Sorry for not quoting or mentioning his name 😛

Arnav Joshi

Branch Unspecified
27 Jan 2012
Reya
Er..I asked how come to aruwin. Sorry for not quoting or mentioning his name 😛
The posts were coming in quick succession in this thread so I also got confused who was asking what. You could say that I had lost the 'thread'.👍

Aruwin

Branch Unspecified
27 Jan 2012
Arnav Joshi
That is just the fourier expansion of f(x) in terms of bn.
The fourier series expression is a summation in terms of bn.
$image=http://latex.codecogs.com/gif.latex?f(x)%20=%20a_{0}%20+%20\sum_{n%20=%201}^{\infty}b_{n}%20sin(nx)%20+%20\sum_{n%20=%201}^{\infty}a_{n}%20cos(nx)&hash=5414a499e94a70f7a42dd8d6930ee104$
That summation is expanded.
All the a[sub]n[/sub] terms will be zero.
In the final part, the summation becomes 1/2 + 2/pi[(sinx)/1 + (sin3x/1)....]

Can you explain why it becomes 2/pi instead of 1/pi and why only sin(odd number)x are the only ones shown??what happened when n is an even number?? Is sin nx = 0 whenever n is an even number???

Arnav Joshi

Branch Unspecified
27 Jan 2012
Aruwin
In the final part, the summation becomes 1/2 + 2/pi[(sinx)/1 + (sin3x/1)....]

Can you explain why it becomes 2/pi instead of 1/pi and why only sin(odd number)x are the only ones shown??what happened when n is an even number?? Is sin nx = 0 whenever n is an even number???
No , sin nx won't be zero when n is even number. But instead bn will be zero when n is even number.

First aim is to calculate bn using f(x). As you can see from image you posted first :-

bn comes out to be
1 -(-1)[sup]n[/sup] /(n*pi). When n is even -1[sup]n[/sup] becomes 1 hence b[sub]n[/sub] becomes (1-1)/n*pi. Thus it becomes zero when n is even. And when n is odd it becomes (1 - (-1)) / (n pi) = 2/(n pi).

Now our job is to put these values of bn in the formula for f(x).
$image=http://latex.codecogs.com/gif.latex?f(x)%20=%20\frac{a_{0}}{2}%20+%20\sum_{n%20=%201}^{\infty}b_{n}%20sin(nx)%20+%20\sum_{n%20=%201}^{\infty}a_{n}%20cos(nx)&hash=d736522522731929389b9786a3b74feb$

(a[sub]n[/sub] terms are all zero. Other than a[sub]0[/sub]/2 which is 1/2)

Because b[sub]n[/sub] is zero for even n , even terms won't be present in the summation for b[sub]n[/sub]. And all odd terms will be of form 2/(n pi). Hence you will see b[sub]n[/sub]sin (nx) becomes 2sin(3x)/(3 pi) when n =3 . When n = 5 b[sub]n[/sub]sin (nx) becomes 2sin(5x)/(5 pi). And so on for all odd values of n. 2/pi is taken out of bracket as it is common in all sin (nx) terms.

Aruwin

Branch Unspecified
27 Jan 2012
Arnav Joshi
No , sin nx won't be zero when n is even number. But instead bn will be zero when n is even number.

First aim is to calculate bn using f(x). As you can see from image you posted first :-
Ok,I got the drift now but there is still one more thing that is bugging me. Now that the equation for Bn can be simplified as (1 - (-1)^n)/n*pi.
But at the very end, the summation becomes different. I don't understand why it becomes
(1+(-1)^n-1).

Arnav Joshi

Branch Unspecified
28 Jan 2012
Aruwin
Ok,I got the drift now but there is still one more thing that is bugging me. Now that the equation for Bn can be simplified as (1 - (-1)^n)/n*pi.
But at the very end, the summation becomes different. I don't understand why it becomes
(1+(-1)^n-1).
That is because of (-1). (-1)[sup]n[/sup] means -1 has been multiplied by itself n times , that is what 'raised to n' means ,right ? Now all we are doing is taking one '-1' from these n '-1's and are multiplying it with that ' - 'sign , hence that - becomes + and we get 1 + (-1)[sup]n-1[/sup] , as we are now left with (n-1) '-1's.

Aruwin

Branch Unspecified
28 Jan 2012
Arnav Joshi
That is because of (-1). (-1)[sup]n[/sup] means -1 has been multiplied by itself n times , that is what 'raised to n' means ,right ? Now all we are doing is taking one '-1' from these n '-1's and are multiplying it with that ' - 'sign , hence that - becomes + and we get 1 + (-1)[sup]n-1[/sup] , as we are now left with (n-1) '-1's.
AAAaaa...now I realize that.Thank you so much! But is it ok if I just leave the answer as it is in the first one? I mean, is it ok if I don't take out one of the (-1) out??The value is gonna be the same after all,isn't it?