1. ## Real Analysis query!

Hi,
I'm for once attempting to do the practise questions for the subject but confused already just looking at it!
Anyone able to help with the following?

Show the following:

oo
x~ (2)[SUM ((-1)^(n-1))((sin nx)/n), -PI<x<PI
n=1

oo
x^2~ ((PI^2)/3)+ (4)[SUM ((-1)^n)((cos nx)/(n^2))]
n=1

I'm thinking the problems need the same method so if I could get a start on the first I might be able to figure out the second? It won't leave my oo and n=1 sign where I want them so they are supposed to go above and below the SUM if anyone is wondering

2. Originally Posted by musicmental85
Hi,
I'm for once attempting to do the practise questions for the subject but confused already just looking at it!
Anyone able to help with the following?
oo
x=(approx) SUM 2(-1)^n-1(sin nx)/n, -PI<x<PI
n=1

oo
x^2= (approx) SUM PI^2/3+ 4(-1)^n(cos nx)/n^2
n=1

I'm thinking the problems need the same method so if I could get a start on the first I might be able to figure out the second?
1. What is the question?

2. Add sufficient brackets to make the meaning of the expressions clear.

RonL

3. ## re: brackets

Sorry, I must have been half asleep when I posted that-I've never put something that unclear up before! I've edited the post so hopefully its a little bit more explicit now

4. Originally Posted by musicmental85
Sorry, I must have been half asleep when I posted that-I've never put something that unclear up before! I've edited the post so hopefully its a little bit more explicit now
hmm, what is the quetion?

5. Presumably these are exercises in calculating Fourier series? For the first one, the function f(x)=x is an odd function, so all the Fourier cosine coefficients will be zero. You calculate the sine coefficients like this:

If $x \sim \sum_{n=1}^{\infty}b_n\sin nx$ then

$b_n = \frac1{\pi}\int_{-\pi}^\pi x\sin nx\,dx$

. . $= \frac1{\pi}\Bigl[\frac{-x\cos nx}{n}\Bigr]_{-\pi}^\pi +\frac1{\pi}\int_{-\pi}^\pi \frac{\cos nx}ndx$. . . (integrating by parts)

. . $= \frac1{\pi}\frac{-(-1)^n\pi-(-1)^n\pi}n + \frac1{\pi}\Bigl[\frac{\sin nx}{n^2}\Bigr]_{-\pi}^\pi$. . . (because $\cos (\pm n\pi) = (-1)^n$)

. . $= -2\frac{(-1)^n}n +0$.

6. ## re: figured some of part 1

For anyone else following this, the coefficients a_n =0 since x->xcos(nx) are even functions.

The next step with the final answer given by Opalg is (excuse my simple notation)

oo
x~a_0/2 + SUM[a_n(cos(nx)) + b_n(sin(nx))]
n=1
oo
x~2 SUM (-1)^(n-1)[sin(nx)]/n
n=1

Hope thats clear. Still stuck on the second if anyone has any ideas. I don't think you can simple square it or maybe you can?

(PS it keeps moving my infinity sign and n=1 so I'm sorry but they won't stay above and below the SUM!)

7. Originally Posted by musicmental85
Show the following:

oo
x^2~ ((PI^2)/3)+ (4)[SUM ((-1)^n)((cos nx)/(n^2))]
n=1
Okay, the general setting for this is that the Fourier series of a function f(x) on the interval [–π,π] is ${\textstyle\frac12}a_0 + \sum_{n=1}^{\infty}(a_n\cos nx + b_n\sin nx)$. The cos coefficients are given by the formula $a_n = \frac1\pi\int_{-\pi}^\pi f(x)\cos nx\,dx$, and the sin coefficients are given by the formula $b_n = \frac1\pi\int_{-\pi}^\pi f(x)\sin nx\,dx$. If the function is even then all the sin coefficients are zero. If it is odd then all the cos coefficients are zero.

The function f(x)=x^2 is even, so all the sin coefficients are zero. For the cos coefficients, you need to evaluate the integral in the formula $a_n = \frac1\pi\int_{-\pi}^\pi x^2\cos nx\,dx$ (you'll need to integrate by parts twice).

Originally Posted by musicmental85
Still stuck on the second if anyone has any ideas. I don't think you can simple square it or maybe you can?
I'm not quite sure what's meant here. If you're wondering whether you can get the Fourier series for x^2 by somehow squaring the series for x, the amswer is definitely NO! You need to work out the integrals to find the coefficients, as above.

8. Didn't think so!

Ok I'm running into trouble in the actual integration

So

So integration by parts,

Let u=x^2 and du=2dx
Let dv=cosnx and v=nsinnx?

Then using the integration by parts formula

a_n= (x^2)(nsinnx) - INT[(nsinnx)2]dx
= (x^2)(nsinnx) - 2n INT(sinnx)dx [getting lost here, n is constant right? so I can take it out?]

Now where to I go?
How do I know what to do in the first term, if x or n is zero it will disappear right?

PS is there anywhere I could learn to use latec (I think thats the term for it) as it really is so much clearer

9. Originally Posted by musicmental85
So $a_n = \frac1\pi\int_{-\pi}^\pi x^2\cos nx\,dx$

So integration by parts,

Let u=x^2 and du=2dx
Let dv=cosnx and v=nsinnx? Er, integral of cos(nx) is (1/n)sin(nx)
... so
. . . . . . . $\begin{array}{r@{\;}c@{\;}l}\displaystyle a_n = \int_{-\pi}^\pi x^2\cos nx\,dx &=& \displaystyle\Bigl[x^2\frac{\sin nx}n\Bigr]_{-\pi}^\pi - \int_{-\pi}^\pi 2x\frac{\sin nx}ndx \vspace{6pt} \\ &=&\displaystyle 0 - \Bigl[2x\frac{-\cos nx}{n^2}\Bigr]_{-\pi}^\pi - \int_{-\pi}^\pi 2\frac{-\cos nx}{n^2}dx\end{array}$

(integrating by parts a second time). Now take it from there!

One snag: that calculation won't work for n=0 (obviously, because you mustn't divide by 0). So you have to calculate a_0 separately.

Originally Posted by musicmental85
is there anywhere I could learn to use latec (I think thats the term for it) as it really is so much clearer
There's a set of LaTeX tutorials here.