Trouble evaluating integrals of a real-valued fourier function

53 Views Asked by At

I am solving an assignment in a programming course and am stuck on a mathematical problem that I am supposed to solve. In the assignment, a function

$f(x)=\sum_{k=0}^{n}a_k \cos(2k\pi x)+b_k\sin(2k\pi x)$

is defined, where $a_k,b_k$ are real coefficients, and I am asked to work out the Rayleigh quotient, given by

$R=\sqrt{\frac{\int_{0}^{1}f'(x)^2dx}{\int_{0}^{1}f(x)^2dx}}$.

I am having trouble calculating this Rayleigh qoutient. I start by squaring the function and, methodically, trying to compute the terms separately, but this gets very messy very quickly and I am simply stuck on this. Is there a more elegant way to solve this? My guess is that there has to be, as I doubt that I am supposed to do "complicated" mathematical computations in this programming course.

By the way, I am unsure wether the function defined here can be properly called a fourier function, as I am not very familiar with such functions, so please correct me if my title is misleading.

1

There are 1 best solutions below

7
On BEST ANSWER

Yes, this is a Fourier series, although it has only finitely terms so it's normally called a trigonometric polynomial. The most important feature of Fourier series (apart from periodicity) is that the various terms are orthogonal to one another: because $n,m$ are integers, we have $$ \int_0^1 \cos{2\pi n x} \sin{2\pi m x} \, dx = 0 \\ \int_0^1 \cos{2\pi n x} \cos{2\pi m x} \, dx = \begin{cases} 1 & n=m=0 \\ 1/2 & n=m \neq 0 \\ 0 & n \neq m \end{cases} \\ \int_0^1 \sin{2\pi n x} \sin{2\pi m x} \, dx = \begin{cases} 0 & n=m=0 \\ 1/2 & n=m \neq 0 \\ 0 & n \neq m \end{cases}; $$ these relationships are fundamental, and are proved using relationships, known as the prosthaphaeresis formulae (or more prosaically, the product-to-sum and sum-to-product formulae), derived from the angle-addition formulae you should know and love: for example, $$ 2\sin{A}\cos{B} = \sin{(A+B)}+\sin{(A-B)}, $$ by expanding the right-hand side. The right-hand side is then easy to integrate, and always gives zero. The other two formulae, $$ 2\cos{A}\cos{B} = \cos{(A+B)} + \cos{(A-B)} \\ 2\sin{A}\sin{B} = -\cos{(A+B)}+\cos{(A-B)} $$ (notice the funny sign in the latter!) are used for the others: since $\cos{(A-B)}=1$ if $A=B$, this is where the nonzero terms come from most of the time. If $A+B=0$ as well, the first term is also constant. But you will find that all the other terms integrate to zero due to periodicity; this is the key point.

Now, the relevance of this to your problem is that it may be used to prove Parseval's (or Plancherel's, depending who you ask) relation, which says that if $$ g(x) = \sum_{k=0}^{\infty} A_k \cos{2\pi k x} + B_k \sin{2\pi k x}, $$ then $$ \int_0^1 g(x)^2 \, dx = A_0^2 + \frac{1}{2} \sum_{k=1}^{\infty} (A_k^2+B_k^2), $$ by expanding the product and using the orthogonality relations, which cause all but the terms with equal $k$ to vanish. This applies to the numerator of your quotient equally well, since the derivative of $ a_k \cos{2\pi k x} + b_k \sin{2\pi k x} $ is $-2\pi k a_k \sin{2\pi k x}+2\pi k b_k \cos{2\pi k x}$, of the same form as $g$ with the coefficients changed around.