Use fourier series to find sum of infinite series

  • #1
1,734
13

Homework Statement



wkbow.png


Find the value of An and given that f(x) = 1 for 0 < x < L/2, find the sum of the infinite series.

Homework Equations





The Attempt at a Solution



The basis is chosen to be ##c_n = \sqrt{\frac{2}{L}}cos (\frac{n\pi }{L}x)## for cosine, and ##s_n = \sqrt{\frac{2}{L}}sin (\frac{n\pi}{L}x)## for sine.

[tex]|f\rangle = \sum_0^{\infty} \langle c_n|f\rangle |c_n\rangle + \sum_1^{\infty}\langle s_n|f\rangle|s_n\rangle[/tex]

Compare this with:

[tex]f = \sum_0^{\infty}c_n' cos(\frac{n\pi }{L}x) + \sum_1^{\infty}A_n sin(\frac{n\pi}{L}x)[/tex]

We are given that f(x) = 1 for 0 < x < L/2.

Therefore,
[tex]A_n = \sqrt{\frac{2}{L}}\langle s_n|f\rangle = \frac{2}{L}\int_0^{L/2}f_{(x)} sin(\frac{2\pi n}{L}x) dx[/tex]
[tex]A_n = \frac{1}{n\pi}\left[1 - cos(n\pi)\right][/tex]
[tex]A_n = \frac{1}{n\pi}\left[1 - (-1)^n\right][/tex]

For odd n, ##A_n = \frac{2}{(2n-1)\pi}##

Either the first series or the third series works for ##A_n##:

For 0 < x < L/2, f(x) = 1:

[tex]1 = \sum_{n=1}^{\infty} \frac{2}{(2n-1)\pi}sin\left(\frac{2\pi n}{L}x\right)[/tex]

Choosing x = L/4:
[tex]1 = \sum_{n=1}^{\infty} \frac{2}{(2n-1)\pi}sin\left(\frac{n\pi}{2}\right)[/tex]
[tex]1 = \sum_{n=1}^{\infty} \frac{2}{(2n-1)\pi} (-1)^{n+1}[/tex]
[tex]\frac{\pi}{2} = \sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{(2n-1)} = 1 - \frac{1}{3} + \frac{1}{5} - ...[/tex]
 
Last edited:

Answers and Replies

  • #2
BvU
Science Advisor
Homework Helper
14,480
3,752
The exercise asks for an expression for ##k_n##

From your ##s_n = \sqrt{\frac{2}{L}}sin (\frac{n\pi}{L}x)## I get the impression that n = 1 is also allowed. But then the period definitely isn't L !

Furthermore, for periodic functions the integral isn't from ##-\infty## to ##\infty## or from ##0## to ##\infty## but from ## 0 ## to ## L##
 
  • #3
1,734
13
The exercise asks for an expression for ##k_n##

From your ##s_n = \sqrt{\frac{2}{L}}sin (\frac{n\pi}{L}x)## I get the impression that n = 1 is also allowed. But then the period definitely isn't L !

Furthermore, for periodic functions the integral isn't from ##-\infty## to ##\infty## or from ##0## to ##\infty## but from ## 0 ## to ## L##

Oops, the correct value for kn should be ##k_n = \frac{2\pi n}{L}##.

And I've updated my answers above. Now I'm missing a factor of 1/2 on the LHS.
 
Last edited:
  • #4
BvU
Science Advisor
Homework Helper
14,480
3,752
Missing 1/2 on the LHS of what, exactly?
Remind me of the relevant eqn for ##A_n##...
 
  • #5
1,734
13
Missing 1/2 on the LHS of what, exactly?
Remind me of the relevant eqn for ##A_n##...

[tex]f_{(x)} = \sum_{n=1}^{\infty} \frac{1}{(2n-1)\pi}sin\left(\frac{2\pi n}{L}x\right)[/tex]

If I choose x = L/4 or L/8, LHS should be = 1, given f(x) = 1 for 0< x < L/2. But the RHS is different.
 
Last edited:
  • #6
1,734
13
So, if ##A_n = \frac{1}{n\pi}\left[1 - (-1)^n\right]##, then for odd n: ##A_n = \frac{1}{n\pi}\left[1 - (-1)^n\right]##.

Plugging this into the fourier series:

[tex]1 = \sum_{n=1}^{\infty} \frac{2}{(2n-1)\pi}sin\left(\frac{n\pi}{2}\right)[/tex]

Still the LHS isn't ##\frac{\pi}{4}##..
 
  • #7
100
15
What do you get when you do the following integration ##A_n=\frac{2}{L/2}\int_0^{L/2}sin(\frac{n\pi x}{L/2})dx##? You just made a silly mistake in your calculation. Show your calculations step by step.
 
  • #8
3,816
92
I have no idea about the fourier series but the problem doesn't state any restriction about using it to evaluate the given sum. I have two methods.

Method 1:
The given sum is:
$$\begin{aligned}
\\
\sum_{r=0}^{\infty} \frac{(-1)^r}{2r+1} & =\sum_{r=0}^{\infty} (-1)^r\int_0^1 x^{2r}\,dx\\
& =\int_0^1 \frac{dx}{1+x^2}\\ & =\left(\arctan(x)\right|_0^{1}\\ &=\frac{\pi}{4} \end{aligned} $$

Method 2:
Use the series of ##\ln(1+x)## at ##x=i## where ##i=\sqrt{-1}## i.e
$$\ln(1+i)=\ln(\sqrt{2}e^{i \pi/4})=i-\frac{1}{2}-\frac{i}{3}+\frac{1}{4}+\frac{i}{5}-\cdots$$
Compare the imaginary parts on both the sides to get the sum.
 
Last edited:
  • #9
100
15
I am guessing the OP is taking a class in Fourier Analysis, which is why he's posting this problem. Yes, there are other methods, but I think he needs to understand what he is doing wrong in his calculation of the Fourier series.
 
  • #10
1,734
13
What do you get when you do the following integration ##A_n=\frac{2}{L/2}\int_0^{L/2}sin(\frac{n\pi x}{L/2})dx##? You just made a silly mistake in your calculation. Show your calculations step by step.

Ok, I think I got it. Fe or a sine series, we extend the function to be f(x) = -1 for L/2 < x < L. So that the integrand is an odd*odd = even function.

Thus,

[tex]A_n = \frac{2}{L} \int_0^L f_{(x)} sin \left(\frac{2\pi n}{L}x\right) dx = 2\left( \frac{2}{L} \right) \int_0^{\frac{L}{2}} sin \left(\frac{2\pi n}{L}x\right) dx[/tex]

I have found my missing factor of 1/2!
 
Last edited:
  • #11
1,734
13
I have no idea about the fourier series but the problem doesn't state any restriction about using it to evaluate the given sum. I have two methods.

Method 1:
The given sum is:
$$\begin{aligned}
\\
\sum_{r=0}^{\infty} \frac{(-1)^r}{2r+1} & =\sum_{r=0}^{\infty} (-1)^r\int_0^1 x^{2r}\,dx\\
& =\int_0^1 \frac{dx}{1+x^2}\\ & =\left(\arctan(x)\right|_0^{1}\\ &=\frac{\pi}{4} \end{aligned} $$

Method 2:
Use the series of ##\ln(1+x)## at ##x=i## where ##i=\sqrt{-1}## i.e
$$\ln(1+i)=\ln(\sqrt{2}e^{i \pi/4})=i-\frac{1}{2}-\frac{i}{3}+\frac{1}{4}+\frac{i}{5}-\cdots$$
Compare the imaginary parts on both the sides to get the sum.

Honestly, that is brilliant! I couldn't have thought of that.
 

Related Threads on Use fourier series to find sum of infinite series

  • Last Post
Replies
17
Views
5K
Replies
1
Views
1K
  • Last Post
Replies
3
Views
6K
Replies
9
Views
1K
  • Last Post
Replies
5
Views
6K
Replies
2
Views
11K
  • Last Post
Replies
7
Views
2K
  • Last Post
Replies
9
Views
2K
  • Last Post
Replies
6
Views
814
  • Last Post
Replies
2
Views
884
Top