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

In summary, the author claims that the expansion of $f(x)=-\pi\lt x\lt \pi=\sum_{n=1}^{\infty} \frac{{(-1)}^{n+1}}{n}$, but this leads to double the expected value. This is because the sine term is zero at $x=\pi$. To find the integral, the author needs to find $ \int_{-\pi+\delta}^{\pi-\delta} 2\sum_{n=1}^{\infty} \frac{{(-1)}^{n=1}}{{n}^{2}}\sin nx \,dx$ which
  • #1
ognik
643
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
  • #2
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.
 
  • #3
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:
  • #4
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.
 
  • #5
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?
 
  • #6
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
 

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

What is a Fourier series?

A Fourier series is a mathematical representation of a periodic function as a sum of sinusoidal functions with different frequencies and amplitudes. It is named after the French mathematician Joseph Fourier, who first introduced the concept in the early 19th century.

How is a Fourier series calculated?

To calculate a Fourier series for a given function, you need to find the coefficients of the sine and cosine terms by using a series of integrals. These coefficients represent the amplitudes and frequencies of the sinusoidal functions that make up the Fourier series. Once the coefficients are found, you can then plug them into the formula for a Fourier series to get the final series representation of the function.

What is the purpose of a Fourier series?

The main purpose of a Fourier series is to represent a periodic function as a combination of simpler sinusoidal functions. This makes it easier to analyze and manipulate the function, and can also be used to approximate the function over a specific interval. Fourier series are widely used in many fields, including physics, engineering, and signal processing.

Can a Fourier series be used for non-periodic functions?

No, a Fourier series is only applicable to periodic functions. However, there are other techniques, such as the Fourier transform, that can be used to represent non-periodic functions as a combination of sinusoidal functions.

What are some real-world applications of Fourier series?

Fourier series have many practical applications in fields such as physics, engineering, and mathematics. They are used to study and analyze periodic phenomena, such as sound waves, electromagnetic waves, and oscillations in mechanical systems. They are also used in image and signal processing to analyze and manipulate data. Additionally, Fourier series have applications in solving differential equations and in harmonic analysis.

Similar threads

Replies
4
Views
1K
Replies
3
Views
1K
Replies
6
Views
2K
Replies
3
Views
1K
Replies
4
Views
2K
Replies
4
Views
2K
Back
Top