For the first part I got
For
For
Hi All,
I have a question that I need to do a bit of catching-up work before I can answer it. I'd like to be able to have a go at it myself before anybody puts an answer up but then check an answer for it later in the week. So if anybody can provide me with an answer to the following that would be great. Thanks.
Q. Evaluate
and using integration by parts, for N=1,2.
Sketch the function defined by
, ;
,
and find the corresponding Fourier Series.
By considering at and deduce that
and
I don't have the patience to go through the whole calculation, but you should know that and . That simplifies the first formula to . To check whether this is correct, see what happens at x=0. The periodic function has a jump from 1 to 0 at this point, and the theory tells you that the Fourier series ought to converge to a point halfway up the jump, namely 1/2. The Fourier series is . When you put x=0 that gives . This is in the right ballpark for showing that , but it isn't quite right.
My guess is that you should look more carefully at those terms and in your formulas for a_n and b_n. There is nothing in the integration-by-parts formulas that you gave earlier to suggest that there should be any products of trig functions in these formulas.
Letting with , I get:
The plot below is the first 20 terms in the interval . Red is the function , Gray is the Fourier series for this function. I'm not real familiar with Fourier Series so not sure about this. Also, as Opalg stated above, at the points of discontinuities, the Fourier series converges to the average of the end points. The plot however, only shows a sharp vertical line due to plotting limitations. If I drew only a set of points for the plot, a single point would be between the upper and lower limits at the points of discontinuities.
That plot shows a nice illustration of the Gibbs phenomenon, with the Fourier series overshooting on either side of the discontinuity.
Ahhhhh, of course! I am so embarrassed that I missed thatbut you should know that and . That simplifies the first formula to .
Thank-you both for the replies, but shawsend maybe its because Im tired but isnt ? I am almost certain of it but since you've posted it here I am paranoid I've left something out.
Thank you all for your help but I have one last question.
So finally,
so my Fourier Series is
which I know is correct because I was able to prove that at x=0,
(since the series converges at a )
but can someone show me how to prove that at x= 1/2,
I dont know what it is that Im doing wrong but I keep getting the wrong answer
Have I mis-understood what the function is? When I plot the first 50 terms of your expression above I get the plot below which I've superimposed over what I thought the original function is. That does not seem to be converging to it in the way one normally thinks of a Fourier series converging (with Gibbs phenomenon) to a function. Here's my Mathematica code in case some are interested:
Code:f[x_] := 2*x - x^2; h[x_] := 2/3 - (1/Pi^2)* Sum[Cos[2*Pi*n*x]/n^2, {n, 1, 150}] - (1/Pi)*Sum[Sin[2*Pi*n*x]/n^2, {n, 1, 150}] fplot1 = Plot[f[x], {x, 0, 1}, PlotStyle -> {Thickness[0.001], Red}] fplot2 = Plot[f[x - 1], {x, 1, 2}, PlotStyle -> {Thickness[0.001], Red}] fplot3 = Plot[f[x - 2], {x, 2, 3}, PlotStyle -> {Thickness[0.001], Red}] p2 = Plot[h[x], {x, 0, 3}] Show[{fplot1, fplot2, fplot3, p2}, PlotRange -> {{0, 3}, {0, 1}}]
Woody, I think you made a typo up there. Should it not be:
and the deal with the constant term is I'm using which is your term. I now believe this expression is correct. The code above with 150 terms is converging nicely to the periodic extension of the function.