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

This is the end of a PDE (heat equation in 2D) I am trying to solve with bounds from $0 < x < L$ and $0 < y < H$. It is a Newmann condition problem (i.e. all derivatives of $x$ and $y$ at the end points are $0$). Actually I am not sure if that is a Newmann condition so that would be my first question. Here is my end solution

$$u(x,y,t) = \sum _{ m=0 }^{ \infty }{ \sum _{ n=0 }^{ \infty }{ A_{ m,n }\cos \left( \frac { m\pi x }{ L } \right) } \cos \left( \frac { n\pi y }{ H } \right) e^{\lambda k t} } $$ with the initial condition $u(x,y,0) = F(x,y)$ for some known function $F(x,y)$ and $\lambda > 0 $ (I don't think the expotential term matters). My second question is: can I split up the coefficients and bring out the constant term, i.e. write the solution like this $$u(x,y,t) = A_0 + \sum _{ m=1 }^{ \infty }{ \sum _{ n=1 }^{ \infty }{ A_{ m,n }\cos \left( \frac { m\pi x }{ L } \right) } \cos\left( \frac { n\pi y }{ H } \right) e^{\lambda k t} }. $$ You can then invoke the initial condition and are left with $$u(x,y,0) =F(x,y) = A_0 + \sum _{ m=1 }^{ \infty }{ \sum _{ n=1 }^{ \infty }{ A_{ m,n }\cos \left( \frac { m\pi x }{ L } \right) } \cos\left( \frac { n\pi y }{ H } \right) }. $$ Then how would I go about finding $A_0$ and $A_{m,n}$?

I know how to do this for a sin series. Here I can show you my steps: \begin{align} F(x,y)&=\sum_{m=1}^\infty{\sin{(m\pi x)}}\sum_{n=1}^\infty{\sin{(n\pi y)}} A_{m,n}\\ &=\sum_{m=1}^\infty{\left( \sum_{n=1}^\infty{ A_{m,n} \sin{(n\pi y)}} \right)}\sin{(m\pi x)}\\\ &=\sum_{m=1}^\infty{B_m}\sin{(m\pi x)} \end{align} and so $B_m = \frac{2}{L}\int_0^L F(x,y) \sin{(m\pi x)} dx$ and so you plug this back in and then you get a second integral (a double integral infact in terms of $x$ and $y$) of the coefficient $A_{m,n}$.

Edit: The answer I got for $A_{m,n} $ is as follows. Is this correct? $$ A_{m,n} = \frac{4}{HL}\int_0^H \int_0^L F(x,y) \cos{\left(\frac{m\pi x}{L}\right)} \cos{\left(\frac{n \pi y}{H}\right)}\, dx dy$$

share|cite|improve this question
I believe you do have Neumann conditions. You definitely can split the term $m = 0$ and $n = 0$ from the sum, but then you still need to keep terms corresponding to $m = 0$ and $n \ne 0$, and also terms corresponding to $m \ne 0$ and $n = 0$. Your sum should be $$ u(x, y, t) = A_{0,0} + \sum_{m=1}^\infty A_{m,0}\cos\left(\frac{m\pi x}L\right) e^{\lambda_{m,0}t} + \sum_{n=1}^\infty A_{0,n}\cos\left(\frac{n\pi y}H\right)e^{\lambda_{0,n}t} + \sum_{m=1}^\infty\sum_{n=1}^\infty \cos\left(\frac{m\pi x}L\right)\cos\left(\frac{n\pi y}H\right)e^{-\lambda_{m,n}t}$$ I can't really recommend doing this. – Tunococ Aug 23 '12 at 21:32
BTW, Fourier coefficients for $\cos$ are similar to $\sin$. The only special term is the constant term. I'm not sure what you're confused about. – Tunococ Aug 23 '12 at 21:35
up vote 1 down vote accepted

$$F(x,y) = A_0 + \sum_{m=1}^{\infty}{\sum_{n=1}^{\infty}{ A_{m,n}\cos \left( \frac { m\pi x }{ L } \right) } \cos\left( \frac { n\pi y }{ H } \right) }$$

Multiply both sides through by $\cos(m'\pi x/L)\cos(n'\pi x/L)$ for arbitrary but fixed positive integers $m'$, $n'$ and integrate over $0<x<L$ and $0<y<H$. The orthogonality if these cosine functions on these intervals will cause all the terms in the series to vanish except when $m=m'$ and $n=n'$, resulting in $$ \small \int_0^H\int_0^L F(x,y)\cos(m'\pi x/L)\cos(n'\pi y/H)\,dx\,dy=A_{n'm'}\int_0^H\int_0^L \cos^2(m'\pi x/L)\cos^2(n'\pi y/H)\,dx\,dy $$ which implies $$ A_{n'm'}=\frac{\int_0^H\int_0^L F(x,y)\cos(m'\pi x/L)\cos(n'\pi y/H)\,dx\,dy}{\int_0^H\int_0^L \cos^2(m'\pi x/L)\cos^2(n'\pi y/H)\,dx\,dy}. $$ Since $n'$ and $m'$ were arbitrary dummy indices, we can change them to $n$ and $m$. Also, the integral in the denominator equals ${LH\over 4}$, so we get $$ A_{nm}={4\over LH}\int_0^H\int_0^L F(x,y)\cos(m\pi x/L)\cos(n\pi y/H)\,dx\,dy. $$

share|cite|improve this answer

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.