0
$\begingroup$

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?

1 Answers 1

2

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)$

  • 0
    @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.2012-10-26