# Math Help - How do I graph where this converges?

1. ## How do I graph where this converges?

I need to sketch the graph to which this series converges:

$f(x) = \sum_{n=1}^{\infty} -\frac{4}{n\pi}(-1)^n sin(n\pi x)$

...and I don't have the foggiest idea of how to approach this. Can someone give me an idea of how to go about this?

2. ## Re: How do I graph where this converges?

Originally Posted by Lancet
I need to sketch the graph to which this series converges:

$f(x) = \sum_{n=1}^{\infty} -\frac{4}{n\pi}(-1)^n sin(n\pi x)$

...and I don't have the foggiest idea of how to approach this. Can someone give me an idea of how to go about this?
Do you know what it converges to? This is a standard Fourier series, you can look it up in a table of FS.

How exactly is the question worded?

CB

3. ## Re: How do I graph where this converges?

Originally Posted by CaptainBlack
Do you know what it converges to? This is a standard Fourier series, you can look it up in a table of FS.

How exactly is the question worded?

CB

After reading your post, I took a quick look, but did not come across any series that matched this one.

Regardless, unless I made a mistake, the only relevant part of the question is pretty much worded as I stated it in my original post: "Sketch the graph to which the Fourier series converges."

The original problem is this:

$f(x) = \begin{cases} x + 1, & -1 <= x < 0 \\ x - 1, & 0 <= x < 1 \end{cases} f(x + 2) = f(x)$ for all x

4. ## Re: How do I graph where this converges?

Originally Posted by Lancet
After reading your post, I took a quick look, but did not come across any series that matched this one.

Regardless, unless I made a mistake, the only relevant part of the question is pretty much worded as I stated it in my original post: "Sketch the graph to which the Fourier series converges."

The original problem is this:

$f(x) = \begin{cases} x + 1, & -1 <= x < 0 \\ x - 1, & 0 <= x < 1 \end{cases} f(x + 2) = f(x)$ for all x
Well you just have to sketch the curve given. Sketch the curve between -1 and 1, then as it is periodic with period 2 just tag copies of the sketch between -1 and 1 on at each end.

It is a saw tooth waveform going from $0$ at $x=-1$ to $1$ at $x=0_-$ and from $-1$ at $x=0$ to $0$ at $x=1$, then repeats ...

Note there appears to be a mistake somewhere, that series does not correspond to that function.

CB

5. ## Re: How do I graph where this converges?

Originally Posted by CaptainBlack

Well you just have to sketch the curve given. Sketch the curve between -1 and 1, then as it is periodic with period 2 just tag copies of the sketch between -1 and 1 on at each end.

I know how to sketch the curve of the initial set of equations. What I don't know is how to sketch the graph to which the resulting Fourier series converges.

Originally Posted by CaptainBlack

Note there appears to be a mistake somewhere, that series does not correspond to that function.

CB

I went over my work again, and I can't find any mistake. I'll show the major steps:

$p = 2$

$L = 1$

$a_0 = \frac{1}{L} \int_{-L}^L f(x) \; dx$

$a_0 = \frac{1}{1} \int_{-1}^1 x + 1 \; dx + \frac{1}{1} \int_{-1}^1 x - 1 \; dx$

$a_0 = \left[\frac{1}{2}x^2 + x + \frac{1}{2}x^2 - x \right]_{-1}^{1}$

$a_0 = 0$

$a_n = \frac{1}{L} \int_{-L}^L f(x) \; cos(\frac{n\pi x}{L}) \; dx$

$a_n = \int_{-1}^1 (x + 1) \; cos(n\pi x) \; dx + \int_{-1}^1 (x - 1) \; cos(n\pi x) \; dx$

$a_n = 2 \int_{-1}^1 x \; cos(n\pi x) \; dx$

$a_n = 2 \left[\frac{x}{n\pi} sin(n \pi x) + \frac{1}{n^2 \pi^2} cos(n \pi x)\right]_{-1}^1$

$a_n = 2[0] = 0$

$b_n = \frac{1}{L} \int_{-L}^L f(x) \; sin(\frac{n\pi x}{L}) \; dx$

$b_n = \int_{-1}^1 (x + 1) \; sin(n\pi x) \; dx + \int_{-1}^1 (x - 1) \; sin(n\pi x) \; dx$

$b_n = 2 \int_{-1}^1 x \; sin(n\pi x) \; dx$

$b_n = 2 \left[\frac{1}{n^2 \pi^2} sin(n \pi x) - \frac{x}{n \pi} cos(n \pi x)\right]_{-1}^1$

$b_n = 2 \left[- \frac{2}{n \pi} cos(n \pi) \right]$

$b_n = - \frac{4}{n \pi} (-1)^n$

$f(x) \sim \sum_{n = 1}^{\infty} \left[- \frac{4}{n \pi} (-1)^n sin(n \pi x) \right]$

6. ## Re: How do I graph where this converges?

Originally Posted by Lancet
I know how to sketch the curve of the initial set of equations. What I don't know is how to sketch the graph to which the resulting Fourier series converges.

I went over my work again, and I can't find any mistake. I'll show the major steps:

$p = 2$

$L = 1$

$a_0 = \frac{1}{L} \int_{-L}^L f(x) \; dx$

$a_0 = \frac{1}{1} \int_{-1}^1 x + 1 \; dx + \frac{1}{1} \int_{-1}^1 x - 1 \; dx$

$a_0 = \left[\frac{1}{2}x^2 + x + \frac{1}{2}x^2 - x \right]_{-1}^{1}$

$a_0 = 0$

$a_n = \frac{1}{L} \int_{-L}^L f(x) \; cos(\frac{n\pi x}{L}) \; dx$

$a_n = \int_{-1}^1 (x + 1) \; cos(n\pi x) \; dx + \int_{-1}^1 (x - 1) \; cos(n\pi x) \; dx$

$a_n = 2 \int_{-1}^1 x \; cos(n\pi x) \; dx$

$a_n = 2 \left[\frac{x}{n\pi} sin(n \pi x) + \frac{1}{n^2 \pi^2} cos(n \pi x)\right]_{-1}^1$

$a_n = 2[0] = 0$

$b_n = \frac{1}{L} \int_{-L}^L f(x) \; sin(\frac{n\pi x}{L}) \; dx$

$b_n = \int_{-1}^1 (x + 1) \; sin(n\pi x) \; dx + \int_{-1}^1 (x - 1) \; sin(n\pi x) \; dx$

$b_n = 2 \int_{-1}^1 x \; sin(n\pi x) \; dx$

$b_n = 2 \left[\frac{1}{n^2 \pi^2} sin(n \pi x) - \frac{x}{n \pi} cos(n \pi x)\right]_{-1}^1$

$b_n = 2 \left[- \frac{2}{n \pi} cos(n \pi) \right]$

$b_n = - \frac{4}{n \pi} (-1)^n$

$f(x) \sim \sum_{n = 1}^{\infty} \left[- \frac{4}{n \pi} (-1)^n sin(n \pi x) \right]$
Your limits of integration are wrong you should have sums of an integral from -1 to 0 and one from 0 to 1.

If you have done the working correct it will converge to the original function. If you are going to plot the partial sums you will need some computational system to do the calculations for any thing other than two or three terms.

CB

7. ## Re: How do I graph where this converges?

Originally Posted by CaptainBlack

Your limits of integration are wrong you should have sums of an integral from -1 to 0 and one from 0 to 1.

Sonofa... <smack>

Thank you for pointing that out! I completely missed that part of the technique when it was discussed.

Originally Posted by CaptainBlack

If you have done the working correct it will converge to the original function. If you are going to plot the partial sums you will need some computational system to do the calculations for any thing other than two or three terms.

CB

Okay, so now that I've made that correction and redone everything, I now get this:

$f(x) \sim \sum_{n = 1}^\infty - \frac{2}{n \pi} \; sin(n \pi x)$

Looking at that, doesn't that just converge to zero?

8. ## Re: How do I graph where this converges?

Originally Posted by Lancet
Sonofa... <smack>

Thank you for pointing that out! I completely missed that part of the technique when it was discussed.

Okay, so now that I've made that correction and redone everything, I now get this:

$f(x) \sim \sum_{n = 1}^\infty - \frac{2}{n \pi} \; sin(n \pi x)$

Looking at that, doesn't that just converge to zero?
No it converges every where other than at x=0 to your function.

CB

9. ## Re: How do I graph where this converges?

Originally Posted by CaptainBlack
No it converges every where other than at x=0 to your function.

CB
The sine function is limited to $[-1, 1]$, and $-\frac{2}{n \pi}$ approaches zero as $n$ approaches infinity. So why doesn't the series converge at zero?

p.s. Does the fourier series look correct to you, after my changes?

10. ## Re: How do I graph where this converges?

Originally Posted by Lancet
The sine function is limited to $[-1, 1]$, and $-\frac{2}{n \pi}$ approaches zero as $n$ approaches infinity. So why doesn't the series converge at zero?

p.s. Does the fourier series look correct to you, after my changes?
1. Why is it that:

$\sum_1^{\infty} \frac{1}{2^n} =2/3$

since your argument would imply it summed to zero (still does not sum to zero if we add alternating signs either).

2. Yes, it looks OK.

CB.

11. ## Re: How do I graph where this converges?

Originally Posted by Lancet
The sine function is limited to $[-1, 1]$, and $-\frac{2}{n \pi}$ approaches zero as $n$ approaches infinity. So why doesn't the series converge at zero?

p.s. Does the fourier series look correct to you, after my changes?
You can get WolframAlpha to plot the partial sums of this without difficulty:

sum for n&#61;1 to 10 &#40; -2&#47;&#40;n&#42;pi&#41; sin&#40;n&#42;pi&#42;x&#41; &#41; - Wolfram|Alpha

CB

12. ## Re: How do I graph where this converges?

Originally Posted by CaptainBlack
1. Why is it that:

$\sum_1^{\infty} \frac{1}{2^n} =2/3$

since your argument would imply it summed to zero (still does not sum to zero if we add alternating signs either).

2. Yes, it looks OK.

CB.

Sorry, I realized I was processing the convergence the way I would a limit, rather than a series.

13. ## Re: How do I graph where this converges?

Originally Posted by CaptainBlack
No it converges every where other than at x=0 to your function.

CB
Having just learned a bit more on this topic, why wouldn't it converge at x = 0? Shouldn't it converge at the average of the jump discontinuity?

14. ## Re: How do I graph where this converges?

Originally Posted by Lancet
Having just learned a bit more on this topic, why wouldn't it converge at x = 0? Shouldn't it converge at the average of the jump discontinuity?
It does converge to the midpoint of the jump, the thing is that it does not converge to the function value defined at the discontinuity (what I did say was probably was not clear enough on that?).

CB