Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
up vote 2 down vote accepted

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

share|cite|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.