# Method of Eigenfunction Expansion

The solution of a PDE can be represented by a Fourier cosine series $$u(x,t)=\sum_{n=1}^\infty A_n(t)\cos\frac{n\pi x}L.$$

Applying a given initial condition

$$u(x,0)=100,$$

lets us solve for $A_n(0)$ through the orthogonality of cosines:

\begin{align} u(x,0)&=\sum_{n=1}^\infty A_n(0)\cos\frac{n\pi x}L=100\\ &\Rightarrow A_n(0)=\frac{400}L\int_0^L\cos\frac{n\pi x}L\,dx=0. \end{align}

This does not seem correct, however. What am I doing wrong?

-

You are missing the $n=0$ term in your cosine expansion.
If you choose to expand your $f(x)$ in terms of cosine, then you need to have $$f(x) = \sum_{n=0}^{\infty} f_n \cos(n \pi x/L)$$
But $n=1,2,\dots$, or am I missing something? – EsX_Raptor Oct 26 '12 at 19:25
Oh, the problem is given without an $A_0$ term. Could this be a typo? – EsX_Raptor Oct 26 '12 at 19:27
@JosuéMolina If you choose to expand in cos then you need to have the $n=0$ term. However, if you choose to expand in $\sin$ you will not have the $n=0$ term. – user17762 Oct 26 '12 at 19:29