I've been solving some problems from my Partial Differential Equations course, and found a particular case that gives me a situation that my course notes don't explain. The problem was the following:
Solve the following bidimensional heat equation:
$$ \left. \begin{array}{rrlcl} \frac{\partial u}{\partial t} & = & \frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2} & , & 0<x<1,\phantom{a} 0<y<1,\phantom{a}t>0 \\ u(x,y,0) & = & f(x,y) & , & \text{(starting heat of the surface)} \\ u(0,y,t) = u(1,y,t) & = & 0 & , & 0\leq y\leq 1, \phantom{a} t\geq0 \\ u(x,0,t) = u(x,1,t) & = & 0 & , & 0\leq x\leq 1, \phantom{a} t\geq 0 \end{array} \right\} $$
where $f(x,y)$ equals $1$ if $y\leq x$ and $0$ otherwise.
In my course notes, the way to solve this kind of problem (it's based on the variable separation method) is by finding the values of $A_{m,n}$ and $\lambda_{m,n}$ for the solution expression (in this particular problem, $a=b=c=1$): $$u(x,y,t)= \sum_{n=1}^\infty\sum^\infty_{m=1}A_{m,n}\sin\left(\frac{m\pi x}{a}\right)\sin\left(\frac{n\pi y}{b}\right)e^{-\lambda^2_{m,n}t},$$ where their values are defined by the expressions: $$A_{m,n}=\frac{4}{ab}\int_0^b\int_0^af(x,y)\sin\left(\frac{m\pi x}{a}\right)\sin\left(\frac{n\pi y}{b}\right)dxdy,$$ $$\lambda_{m,n}=c\pi\sqrt{\frac{m^2}{a^2}+\frac{n^2}{b^2}}.$$
Here's where my problem is. I've calculated the value of $A_{m,n}$ (both by hand and also using Mathematica) and this is what I got: $$A_{m,n}=\frac{4((-1)^{1+m}m^2+(-1)^{m+n}m^2-n^2+(-1)^mn^2)}{mn(m^2-n^2)\pi^2}.$$
My drawback:
As you may guess, the problem is in the $(m^2-n^2)$ that appears in the denominator, because it makes $A_{m,m}$ undefined $\forall m\in\mathbb N$. If tried simplifying the expression and could not, I also tried finding the limit when $m$ goes to $n$ but didn't work either. My couse notes don't say anything about this happening and it's the only example which I've seen with such a denominator (they usually just have powers of $m,n$ and $\pi$, but no things that make the denominator $0$ for natural values of $m,n$).
My question:
What's the problem here? What can I do to solve this problem? Is there some condition a problem must verify in order to be solvable by this method that this one doesn't have?
Any help or hint will be appreciated, thanks in advance.