# Homework Help: Simple 2-D Wave Equation Problem

1. Oct 8, 2012

### comwiz0

1. The problem statement, all variables and given/known data

Solve the boundary value problem

$\frac{\partial ^2 u}{\partial t^2} = c^2 (\frac{\partial ^2 u}{\partial x^2}+\frac{\partial ^2 u}{\partial y^2})$,
$0<x<a$,
$0<y<b$, and
$t>0$

for the boundary conditions

$u(0,y,t) = 0$ and $u(a,y,t) = 0$ for $0 \leq y \leq b$ and $t\geq0$ and
$u(x,0,t) = 0$ and $u(x,b,t) = 0$ for $0 \leq x \leq a$ and $t\geq0$

and the initial conditions

$u(x,y,0) = f(x,y)$ and
$\frac{\partial u}{\partial t}(x,y,0) = g(x,y)$

with $a=b=1$, $c=1/\pi$ and the given functions $f(x,y) = sin(\pi x)sin(\pi y)$ and $g(x,y) = sin(\pi x)$.

2. Relevant equations

The derived solution to the two dimensional wave equation with the above boundary and initial conditions is

$u(x,y,t) = \sum_{n=1}^\infty \sum_{m=1}^\infty (B_{mn} cos \lambda_{mn} t + B_{mn}^* sin \lambda_{mn} t) sin \frac{m \pi x}{a} cos \frac {n \pi y}{b}$

where

$\lambda_{mn} = c \pi \sqrt{\frac{m^2}{a^2} + \frac{n^2}{b^2}}$

and

$B_{mn} = \frac{4}{a b} \int_0^b \int_0^a f(x,y) sin \frac{m \pi x}{a} sin \frac{n \pi y}{b} dx dy$

and

$B_{mn}^* = \frac{4}{a b \lambda_{mn}} \int_0^b \int_0^a g(x,y) sin \frac{m \pi x}{a} sin \frac{n \pi y}{b} dx dy$

3. The attempt at a solution

Alright, with all of that out of the way, this should be a pretty simple problem of just plugging in numbers. However, for some reason, I seem to keep getting $B_{mn}$ and $B_{mn}^*$ to be zero, which, in turn, means the whole thing is zero, unless I'm misunderstanding something or missing something - which, for as long as I've been staring at this problem, could very well be the case.

Starting with $\lambda_{mn}$,

$\lambda_{mn} = c \pi \sqrt{\frac{m^2}{a^2} + \frac{n^2}{b^2}} = \frac{\pi}{\pi} \sqrt{\frac{m^2}{1^2} + \frac{n^2}{1^2}} = \sqrt{m^2 + n^2}$.

Next, $B_{mn}$,

$B_{mn} = \frac{4}{a b} \int_0^b \int_0^a f(x,y) sin \frac{m \pi x}{a} sin \frac{n \pi y}{b} dx dy$
$B_{mn} = 4 \int_0^1 \int_0^1 sin(\pi x)sin(\pi y) sin(m \pi x)sin(n \pi y)dx dy$
$B_{mn} = 4 \int_0^1 sin(\pi x) sin(m \pi x) dx \int_0^1 sin(\pi y) sin(n \pi y) dy$
$B_{mn} = 4 [\frac{sin(\pi m)}{2(m+1)\pi} - \frac{sin(\pi m)}{2(m-1)\pi}][\frac{sin(\pi n)}{2(n+1)\pi} - \frac{sin(\pi n)}{2(n-1)\pi}]$

For all $m$ and $n$ where $m, n = 1, 2, ...$, $B_{mn} = 0$ because of this $sin(\pi i)$ term. I might be missing something obvious here, but I think this is correct. This, in and of itself, doesn't bother me. However, repeating for $B_{mn}^*$,

$B_{mn}^* = \frac{4}{a b \lambda_{mn}} \int_0^b \int_0^a g(x,y) sin \frac{m \pi x}{a} sin \frac{n \pi y}{b} dx dy$
$B_{mn}^* = \frac{4}{\sqrt{m^2+n^2}} \int_0^1 \int_0^1 sin(\pi x) sin(m \pi x)sin(n \pi y)dx dy$
$B_{mn}^* = \frac{4}{\sqrt{m^2+n^2}} \int_0^1 sin(\pi x) sin(m \pi x) dx \int_0^1 sin(n \pi y) dy$
$B_{mn}^* = \frac{4}{\sqrt{m^2+n^2}} [\frac{sin(\pi m)}{2(m+1)\pi} - \frac{sin(\pi m)}{2(m-1)\pi}][\frac{1}{n \pi} - \frac{cos(n \pi)}{n \pi}]$

As before, for all $m$ and $n$ where $m, n = 1, 2, ...$, $B_{mn}^* = 0$ because of this $sin(\pi i)$ term. So, given that what I have here seems to indicate that I'm doing something wrong, I figured I would ask for some assistance. I'm sure I'm missing something really simple, but I've been staring at this problem for too long to see it. Any thoughts?

Last edited: Oct 8, 2012
2. Oct 8, 2012

### voko

There are at least two mistakes here. The transition from the first line to the second is incorrect. If you change the variables so that x: (0, a) -> (0, 1) nd y: (0, b) -> (0,1), that change should affect x and y everywhere, including f(x, y).

The second mistake is ignoring m = 1 and n = 1.

3. Oct 8, 2012

### comwiz0

Can you clarify what you mean by the transition from the first line to the second line being incorrect? All I am doing here is substituting in the given values into the first line: $a=1$ and $b=1$. $f(x,y)$, as given in the problem statement, does not include an a or b term. It is just simply inserted in place in the equation. The third and fourth terms inside the integrals on the second line included an a and b, respectively, and they were set equal to one. The values of x and y are not being worked with at that stage.

As an aside, the solution given on the last line I was able to symbolically confirm as well with my TI-89.

What do you mean here? If m or n is set to any whole number value, $sin(\pi m)$ or $sin(\pi n)$ are equal to 0.

4. Oct 8, 2012

### LCKurtz

What he means is that the integral formula you used for those integrals does not work when $m=1$ or $n=1$. They have to be done separately.

5. Oct 8, 2012

### voko

Silly me, I missed that! Please ignore that part.

Do you see that in the formulae you got after integration, you have (m - 1) and (n - 1) in denominators? When m = 1 and n = 1, those terms blow up. This is an indication of a problem with your integration. The problem is that before integration those terms were $\cos (m - 1)\pi x = \cos (1 - 1) \pi x = 1$ and $\cos (n - 1) \pi y = \cos (1 - 1) \pi y = 1$, i.e., constants, so their integrals cannot be zero.

6. Oct 9, 2012

### comwiz0

I believe I understand what you two are saying, but I'm not quite sure I know how to implement it. I've been working on this assignment for a bit too long to really comprehend anything at this point unfortunately. Can you be a bit more specific about how I might start to set something like that up?

7. Oct 9, 2012

### voko

Between this: $B_{mn} = 4 \int_0^1 sin(\pi x) sin(m \pi x) dx \int_0^1 sin(\pi y) sin(n \pi y) dy$ and this:
$B_{mn} = 4 [\frac{sin(\pi m)}{2(m+1)\pi} - \frac{sin(\pi m)}{2(m-1)\pi}][\frac{sin(\pi n)}{2(n+1)\pi} - \frac{sin(\pi n)}{2(n-1)\pi}]$, what was the intermediate equation?

Evaluate this intermediate equation for m = 1 and n = 1. The same applies to $B_{mn}^*$.