MHB Fourier series coefficient problem

ognik
Messages
626
Reaction score
2
Hi - an example in my book shows that FS coefficiants can be arrived at by minimizing the integrated square of the deviation,

i.e. $ \Delta_p = \int_0^{2\pi}\left[ f(x) - \frac{a_0}{2}-\sum_{n=1}^{p}\left( a_nCosnx + b_nSinnx \right) \right]^2dx $

So we're looking for $ \pd{\Delta_p}{a_n} =0 $ and $ \pd{\Delta_p}{b_n} =0 $

they then jump to $ 0 = -2\int_0^{2\pi} f(x) Cosnx dx +2\pi a_n $ and I can't follow it all, would appreciate some help.

Using the chain rule for the partial deriv for $a_n$, should it be $ 0 = \int_0^{2\pi}\left[ f(x) - \frac{a_0}{2}-\sum_{n=1}^{p}\left( a_nCosnx + b_nSinnx \right) \right] \left( -\sum_{n=1}^{p}Cosnx \right) dx $ - or without the 2nd summation? They must NOT include that last summation but I don't know why?

Then clearly the $a_0$ term vanishes but I can't see why?

And please confirm - integral of a sum $\equiv$ sum of an integral?
 
Physics news on Phys.org
Hi ognik,

The place where things took a wrong turn has to do with the use of indices. In the expression $\pd{\Delta_{p}}{a_{n}}$, you want to think of $n$ as fixed; i.e. we have made a choice of which partial derivative we would like to take (e.g. $n=3~\Longrightarrow~\pd{\Delta_{p}}{a_{3}}$). Since $n$ is then fixed, we need to index the sum by a different variable, say $k$, then use the relation $\pd{a_{k}}{a_{n}}=\delta^{k}_{n}$. I think you should be able to get where you want to go from here. If not, let me know. Good luck!
 
ognik said:
Using the chain rule for the partial deriv for $a_n$, should it be $ 0 = \int_0^{2\pi}\left[ f(x) - \frac{a_0}{2}-\sum_{n=1}^{p}\left( a_nCosnx + b_nSinnx \right) \right] \left( -\sum_{n=1}^{p}Cosnx \right) dx $ - or without the 2nd summation?

They must NOT include that last summation but I don't know why?

And please confirm - integral of a sum $\equiv$ sum of an integral?

Thanks GJA, while I'm working on that would you mind looking at the other 2 queries I had, quoted above? Much obliged.
 
Thanks GJA, that's clear now; Also I read that integral of a sum $\equiv$ sum of an integral so I get to:

$ 0 = \int_0^{2\pi}\left[ f(x) - \frac{a_0}{2}-\sum_{n=1}^{p}\left( a_nCosnx + b_nSinnx \right) \right] Cosnx dx $ (I multiplied the -1 both sides)

i.e. $ 0 = \int_0^{2\pi} f(x) Cosnx dx - \frac{a_0}{2} \int_0^{2\pi} Cosnx dx -\sum_{n=1}^{p} a_n\int_0^{2\pi} Cos^2nx -\sum_{n=1}^{p} b_n\int_0^{2\pi}Sinnx Cosnx dx $

The 2nd term evals to 0, the 4th term = 0 due to orthogonality, $ a_n\int_0^{2\pi} Cos^2nx dx = \pi a_n $ but I can't find an argument to drop the summation in front of the third term?
 
Hey ognik,

Been away from the computer for a bit over the holiday, sorry for the delay. I think you've picked up on what I was getting at in my last post and to help push past the where you're currently stuck, it will be best to get in the habit of actually using a new summation index. For example, where you wrote

ognik said:
$ 0 = \int_0^{2\pi}\left[ f(x) - \frac{a_0}{2}-\sum_{n=1}^{p}\left( a_nCosnx + b_nSinnx \right) \right] Cosnx dx $ (I multiplied the -1 both sides)

we would really want something like this (note that $k$ is being used as the summation index, while $n$ is still the frequency term of the cosine outside the parenthesis in the integrand):

$$0=\int_{0}^{2\pi}\left[f(x)-\frac{a_{0}}{2}-\sum_{k=1}^{p}\big(a_{k}\cos(kx)+b_{k}\sin(kx)\big)\right]\cos(nx)\, dx$$

(Note: We could use any letter (e.g. $m$, $j$, $r$, $s$, etc.) we want to index the sum, except $n$ and $p$ as those letters have an assigned meaning already in the problem)

After multiplying out this new expression the term of confusion now has the form:

$$\sum_{k=1}^{p}a_{k}\int_{0}^{2\pi}\cos(kx)\cos(nx)\, dx$$

Can you you see how to get where you want to go from there? You're very close to being done and I know you can get it. Let me know if this is still a sticking point. Good luck!
 
Understand GJA, my kids are away so I have time on my hands - and thanks for the reply.

I doubt I would recognise at the moment, when to use a different summation index, and I'm afraid I don't follow why in this case?

However assuming it, from where you introduce the 2nd index: $0= \int_{0}^{2\pi} f(x) Cosnx \,dx - \frac{a_0}{2} \int_{0}^{2\pi}Cosnx dx - \int_{0}^{2\pi} \sum_{k=1}^{\infty}a_k Cos kx Cos nx - \int_{0}^{2\pi} \sum_{k=1}^{\infty} b_n Sin kx Cos nx dx $

The 2nd term evals. to 0, the 4th term is 0 by orthogonality, and the third term $= a_n\pi$ by orthogonality for k=n only (=0 for $k \ne n$)

$ \therefore a_n = \frac{1}{\pi} \int_{0}^{2\pi} f(x) Cos nx dx $ - yay!
 

Similar threads

Replies
11
Views
2K
Replies
2
Views
2K
Replies
3
Views
3K
Replies
4
Views
3K
Replies
3
Views
2K
Back
Top