MHB How do we find A0 in Fourier series for f(x)=x?

ognik
Messages
626
Reaction score
2
My book says the expansion of $f(x)=x, -\pi \lt x \lt \pi = \sum_{n=1}^{\infty} \frac{{(-1)}^{n+1}}{n}$, I get double that so please tell me where this is wrong:
f(x) is odd, so $a_n=0$

$ b_n=\frac{1}{\pi} \int_{-\pi}^{\pi}x Sin(nx) \,dx = \frac{1}{\pi} [\frac{1}{n^2}Sin(nx) - \frac{x}{n} Cos(nx)]^{\pi}_{-\pi} $ Sin term = 0, so

$= -\frac{1}{\pi} [ \frac{\pi}{n} Cosn\pi - \frac{(-\pi)}{n} Cosn\pi] = -\frac{2}{n}Cosn\pi =2\frac{(-1)^{n+1}}{n}$ ?
 
Physics news on Phys.org
Example 1 on this page seems to bear out your calculations:

https://en.wikipedia.org/wiki/Fourier_series

(Ignoring the $\dfrac{1}{\pi}$ factor, which is just a constant).

Your integration seems fine, integrating by parts I get the same answer as you. It's possible it's a typo in your text, re-verify the limits of the expansion.

As an aside to write the functions "sine" and "cosine" use:

Code:
$\sin x$
$\cos x$

to get:

$\sin x$
$\cos x$

to render properly in LaTex/MathJax.
 
Thanks. Next part is "show that the integral of this Fourier series leads to $ \frac{\pi^2}{12} =\sum_{n=1}^{\infty}\frac{{(-1)}^{n=1}}{{n}^{2}} = 1-\frac{1}{4}+\frac{1}{9}-\frac{1}{16}... $ "

But there's a clue here for me, $ FS =2 \sum_{n=1}^{\infty}\frac{{(-1)}^{n=1}}{{n}^{2}}\sin nx ,$ but at $x=\pi$, the FS is 0.
So I need to find $ \int_{-\pi +\delta}^{\pi-\delta} 2 \sum_{n=1}^{\infty}\frac{{(-1)}^{n=1}}{{n}^{2}}\sin nx \,dx $ I'm not sure how to do that, so a hint would be nice ?

(Incidentally this post - http://mathhelpboards.com/calculus-10/help-integral-rodriquez-formula-16517.html - is quite important to me if you have some spare time please?)
 
Last edited:
I believe this page may prove useful to you (yes, I'm too lazy to write this out :P):

Operations on Fourier Series

What you want to do, essentially, is integrate "term-by-term", so it's the $b_n(x)$ you're considering (remember, the sine terms you dropped? Those will matter, now). Perhaps your text has some theorems that show why convergence of the FS allows one to "distribute the integrals under the summation".

On a somewhat related note: you really should post your questions in the appropriate sub-forum. Fourier series questions should go in the "Analysis" sub-forum, and questions regarding ODE's should go in the "Differential Equations" sub-forum. Somebody else might have similar doubts to yours in the future, and they might not even think to look for them here.

It's true there is some "overlap" with linear algebra, and questions having to do solely with matrices, or linear operators (no matter what the context) are probably "OK", but if in doubt, ask a moderator. I'm sure they'd love to hear from you.
 
Always happy to get links, in this case I had already read it (I search extensively before coming to the forum). My text unfortunately delights in providing extensive opportunities for self research - which would be fine if I didn't have deadlines...

What I inadequately understand is to expand the summation and integrate each resulting term. The limits confuse me, I've seen integration between 0 and x, the link below shows the integral between $-\pi$ and x ... but I think the interval is $(-\pi, \pi)$?

1. I've seen a solution to the problem, from $b_n$ and saying integrate term by term, they next wrote $ \frac{{x}^{2}}{2} = \frac{{\pi}^{2}}{6} -2\sum_{n=1}^{\infty} \frac{{(-1)}^{n-1}}{{n}^{2}}\cos nx $. I can see that $\frac{{x}^{2}}{2}$ is the integral of our function, but I wouldn't have called that a term? Anyway it will come in useful for this problem.

I am also told that $ \frac{{\pi}^{2}}{6} =\frac{1}{2\pi}\int_{-\pi}^{\pi}\frac{{x}^{2}}{2} \,dx $ - but they could have pulled that out of a hat as far as I know.

I would expand $ f(x) = 2\left[\sin x -\frac{1}{2}\sin 2x +\frac{1}{3} \sin 3x - ...\right] $

Then $ \int_{-\pi}^{\pi}f(x) \,dx = 2\left[-\cos x + \frac{1}{4}\cos 2x -\frac{1}{9} \cos 3x +\frac{1}{16}\cos 4x - ...\right]^\pi_{-\pi} $ ... but the cos terms will cancel?
 
Stubbornly managed to do it from 1st principles :-)

However in the link you gave ...how do they find $A_0$? Setting n=0 in $A_n$ is singular, I tried integrating by parts also...gave me 0?

Finally, what is the justification in that link 1st eqtn, for integrating between $-pi$ and x?

Similarly, an example in my book does the integration between 0 and x (which is how I got this to work) - I think that is effectively an indefinite integral, and choosing the lower limit = 0 effectively sets the constant to 0? If so, why are we allowed to do that? Thanks
 

Similar threads

Back
Top