# Thread: Fourier Series - Why

1. ## Fourier Series - Why

I tried to learn this by myself and I understand the technic but not the 'why'. For example, I came across a heat transfer problem where:
T(x,y)=A * sin(n*PI*x/a)*e^(-n*PI*y/a)
with a boundary condition which was not used and it is: T(x,0)=f(x)

Now, if I want to express T(x,y) I guess I need to find A. This is simple, and I do not need fourier series theory for that, because I have the boundary condition T(x,0)=f(x). So, why to use fourier series here at all? Is it because we do not know which 'n' is to be used?

2. Originally Posted by fofo
I tried to learn this by myself and I understand the technic but not the 'why'. For example, I came across a heat transfer problem where:
T(x,y)=A * sin(n*PI*x/a)*e^(-n*PI*y/a)
with a boundary condition which was not used and it is: T(x,0)=f(x)

Now, if I want to express T(x,y) I guess I need to find A. This is simple, and I do not need fourier series theory for that, because I have the boundary condition T(x,0)=f(x). So, why to use fourier series here at all? Is it because we do not know which 'n' is to be used?
$T(x,y)$ is not a solution of the problem as it does not satisft the boundary condition, But if you write:

$T_n(x,y)=\sin(n\pi x/a)\;e^{-n\pi y/a}$

Then you seek constants $u_n$ such that:

$\sum u_n T_n(x,0) = f(x)$

Now (with a bit of luck and the corect normalisation) the left-hand-side is the Fourier sine series of $f(x)$, and:

$h(x,y)=\sum u_n T_n(x,y)$

will be a soultion satisfying the boundary condition.

CB

3. Thanks,
So what you say is that the solution is also dependent on 'n' and we have here something like a weight function for each 'n' that will difine the contribution of each Tn(x,y) to the total sum.
I understand what you say but I do not feel it I do not feel how the 'weight' is going to be distributed through the series members. This bothers me

4. For Fourier sine or cosine series, no, there is no "weight function" (or, more correctly, the weight function is "1"). For other series, solving other differential equations, there are weight functions.

And, no, the solution is NOT "dependent on n" nor did Captain Black say it was. He said that the solution is, in general, an infinite sum of such things. You can use n or any other symbol as an index but since n itself takes on all positive integer values in the sum, the sum is not "dependent on n".

The basic idea is to treat the set of all solutions as a vector space. Every vector space has a "basis", in this case infinite. The idea is to find a basis consisting of functions that are orthonormal eigenvectors of the given differential operator, then write all solutions as a linear combination (infinite series) of those eigenfunctions.

5. Originally Posted by fofo
I tried to learn this by myself and I understand the technic but not the 'why'. For example, I came across a heat transfer problem where:
T(x,y)=A * sin(n*PI*x/a)*e^(-n*PI*y/a)
with a boundary condition which was not used and it is: T(x,0)=f(x)

Now, if I want to express T(x,y) I guess I need to find A. This is simple, and I do not need fourier series theory for that, because I have the boundary condition T(x,0)=f(x). So, why to use fourier series here at all? Is it because we do not know which 'n' is to be used?
Maybe it would be easier if I just worked a heat equation out and then showed you how to find the coefficient.

Suppose you have the heat equation over a one dimensional rod:
$\frac{\delta T}{\delta y} = k * \frac{\delta^2 T}{\delta x^2}$ where 0 < x < L; y > 0.
with the following boundary conditions:
$T(0, y) = 0;
T(L, y) = 0$
.

Because of the variables you've chosen, x will correspond to our one-dimensional space and y will correspond to our time dimension. The boundary conditions, also known as Dirichlet boundary conditions, show that at either end, our rod's temperature is fixed at 0 temperature.

Finally, we have the initial condition:
$T(x, 0) = f(x)$ which tells us that at some time 0, our temperature profile will just be some function of f(x).

Let's get started. Because we have a homogeneous equation, we'll suppose that our function T(x,y) is actually just the product of a function of x and a function of y. In other terms,

$T(x,y) = \Phi(x) * G(y)$ Setting this up as the heat equation, we see that

$G'(y) * \Phi(x) = k * G(y) * \Phi''(x)$ Separating variables (recalling that k is a constant)

$\frac{G'(y)}{G(y) * k} = \frac{ \Phi''(x)}{\Phi(x)}$

Now, in order for a spatial function x to be equal to our time function of you, they both need to be equal to the same constant. We'll call this constant $-\lambda$

$\frac{G'(y)}{G(y) * k} = \frac{ \Phi''(x)}{\Phi(x)} = -\lambda$
$G'(y) + k * G(y) * \lambda = 0$
$\Phi''(x) + \Phi(x) * \lambda = 0
$

We know have two ODEs that can be solved. The first equation breaks down nicely into
$G(y) = ce^{-k*\lambda*y}$
Note that we don't know what $\lambda$ is yet. We'll need to solve the second equation to figure that one out. Again, breaking the x equation into its ODE,
$\Phi(x) = c_1 * cos(\sqrt{\lambda}x) + c_2 * sin(\sqrt{\lambda}x)$
$\lambda$ represents an eigenvalue for this eigenfunction. We'll apply our boundary conditions to solve for it.

$\Phi(x) = c_1 * cos(\sqrt{\lambda}x) + c_2 * sin(\sqrt{\lambda}x)$
$\Phi(0) = 0 = c_1
$
so,
$\Phi(x) = c_2 * sin(\sqrt{\lambda}x)$
$\Phi(L) = c_2 * sin(\sqrt{\lambda}L) = 0$

If our constant infront of the sine term is also 0, then our eigenfunction is a constant 0, which is a meaningless answer. So, we'll suppose then that

$\sqrt{\lambda}{L} = \pi * n$

The n here is introduced because we know that sine oscillates and has infinitely many 0s.

$\sqrt{\lambda_n} = \frac{\pi * n}{L}$
$\lambda_n = (\frac{\pi *n}{L})^2$
and then
$\Phi(x)_n = c_2 * sin(\frac{\pi*n}{L} * x)$
and
$G(y)_n = ce^{-k*(\frac{\pi * n}{L})^2*y}$

Because of the principle of superposition, we know that our answer, T(x,y) will be of the form:
$T(x, y) = \sum_{1}^{\infty} A_n*\Phi(x)_n * G(y)_n$
Which is just the linear combination of all possible eigenfunctions from 1 to infinity (0 is not a possible eigenvalue here). The $A_n$ term is the coefficients from our two eigenfunctions combined. Now, to solve for it, we'll use our initial condition.

Recall:
$T(x,0) = f(x) = \sum_{1}^{\infty} A_n * \Phi(x)_n$ by plugging in y = 0.
Multiplying both sides by:
$sin( \frac{m * \pi *x}{L})$,

$f(x) * sin(\frac{m*\pi*x}{L}) = \sum_{1}^{\infty} A_n sin(\frac{m*\pi*x}{L})*sin(\frac{n*\pi*x}{L})$

Next, integrating both sides from 0 to L produces

$\int_{0}^{L} f(x) * sin(\frac{m*\pi*x}{L}) dx = \sum_{1}^{\infty} A_n \int_{0}^{L} sin(\frac{m*\pi*x}{L})*sin(\frac{n*\pi*x}{L}) dx$

Due to the orthogonality of sines,
$\int_{0}^{L} sin( \frac{n*\pi*x}{L}) * sin(\frac{m * \pi*x}{L}) = 0$ if m != n and
$\frac{L}{2}$ if m = n

So, in order for this coefficient to not be 0, m must = n. Replacing this, we see that

$A_n =\frac{ \int_{0}^{L} f(x) * sin(\frac{m*\pi*x}{L})dx} {\int_{0}^{L} sin^2(\frac{m*\pi*x}{L} dx)}$
After a little manipulation (we ignore the summation because this statement is true for an infinite series as well as any finite term within the series.

Integrating the denominator, it is seen that this is

$A_n = \frac{2}{L} * \int_{0}^{L} f(x) * sin( \frac{m*pi*x}{L}) dx$

We can't finish this integral, because we don't have an f(x). However, if an initial condition were provided, it would be simple to simply plug in our f(x) and solve.