# wave equation with initial values and boundary condititon

I have a homogenious 2-dimensional wave equation: $$- \frac{\partial^2 u}{\partial x^2} (x, y, t) - \frac{\partial^2 u}{\partial y^2} (x, y, t) + \frac{1}{c^2} \frac{\partial^2 u}{\partial t^2} (x, y, t) = 0$$

With: $$0 < x < a, 0 < y < b, t > 0$$ $$u(x, y, 0) = 0$$ $$\dot u(x, y, 0) = x(x-a)(y-b)$$

And boundary condition: $$u(0, y, t) = u(a, y, t) = u(x, 0, t) = u(x, b, t) = 0$$

It says that I should solve it using separation of variables with $u(x, y, t) = G(x)H(y)w(t)$ as a starting point. With that approach, I got this solution: $$u(x, y, t) = \sin\left(\frac{n\pi}a x\right) \sin\left(\frac{n\pi}b y\right) \sin\left(\left(\frac{n\pi}a - \frac{n\pi}b\right) c^2 t\right)$$

This solved everything, except the initial value for $\dot u$. A friend of mine proved that if such a seperated function would solve this initial value, the function $w(t)$ would depend on $x$ and $y$.

How do I solve this differential equation so that it satifies the $\dot u$ initial value?

-
Because of the B.C.s $u(0,y,t)=u(a,y,t)=u(x,0,t)=u(x,b,t)=0$ , I think you can use kernel method rather than use separation of variables for getting simpler procedure. – doraemonpaul Nov 5 '12 at 14:21

In a more simple way, take $u(x,y,t) = T(t) f(x,y)$ and substitute in your equation. Then $$\frac{1}{c^2 T(t)} \frac{d^2 T(t)}{d t^2} = \frac{1}{f(x,y)} \Delta f(x,y)$$ Where $\Delta$ is the Laplace operator. The only way for this equality to be satisfied for all $(x,y,t)$ is that both sides of it are a constant, lets say $-\lambda$. Then \begin{align} \frac{d^2 T}{d t^2} + \lambda c^2 T &= 0\\ \Delta f + \lambda f &= 0 \end{align}

Now, looking at the spatial part, take $f(x,y) = X(x)Y(y)$, then $$\frac{1}{X(x)}\frac{d^2 X(x)}{d x^2} + \frac{1}{Y} \frac{d^2 Y(y)}{d y^2} + \lambda = 0$$ The same argument as above, leads to the two ode's \begin{align} \frac{d^2 X}{d x^2} + \lambda_x X &= 0\\ \frac{d^2 Y}{d y^2} + \lambda_y Y &= 0 \end{align} where $\lambda_x + \lambda_y = \lambda$. The solutions for both equations are \begin{align} X(x) &= A \sin(\sqrt{\lambda_x} x)\\ Y(y) &= B \sin(\sqrt{\lambda_y} y) \end{align} where we have made use that $u(0,y,t) = u(x,0,t) = 0$. The conditions on the other side of the domain will either lead to the trivial solutions or to a restriction on the values of $\lambda_{x,y}$. Hence $$\lambda_x = \frac{m^2 \pi^2}{a^2}, \qquad \lambda_y = \frac{n^2 \pi^2}{b^2}$$ where $m,\,n\, \in \mathbb{Z}$. Then $$f_{nm}(x,y) = A_{mn} \sin\big(\tfrac{m \pi}{a} x\big) \sin\big(\tfrac{n \pi}{b} y\big)$$ and $$T_{mn}(t) = C \sin\Big(\sqrt{\tfrac{m^2 \pi^2}{a^2} + \tfrac{n^2 \pi^2}{b^2}}\, ct\Big) + D \cos\Big(\sqrt{\tfrac{m^2 \pi^2}{a^2} + \tfrac{n^2 \pi^2}{b^2}}\, ct\Big)$$ Finally, due linearity of the PDE and homogeneous boundary conditions, the solution is $$u(x,y,t) = \sum_{m,n = 0}^\infty B_{mn} \sin\big(\tfrac{m \pi}{a} x\big) \sin\big(\tfrac{n \pi}{b} y\big) \sin\Big(\sqrt{\tfrac{m^2 \pi^2}{a^2} + \tfrac{n^2 \pi^2}{b^2}}\, ct\Big)$$ given that $u(x,y,0) = 0$.

To obtain the value of $B_{nm}$, one have to use the other initial condition and the orthogonality of $\{\sin(\frac{m \pi}{a} x)\}_m$, $\{\sin(\frac{m \pi}{b} y)\}_n$ in the intervals $(0,a)$ and $(0,b)$ respectively. Multiplying by $\sin(\frac{r \pi}{a}x)$ where $r$ is an integer, and integrating from $0$ to $a$, we have \begin{multline} \sum_{m,n = 0}^\infty \left(B_{mn} \sqrt{\tfrac{m^2 \pi^2}{a^2} + \tfrac{n^2 \pi^2}{b^2}}\, c\right) \sin\big(\tfrac{n \pi}{b} y\big) \int_0^a \sin\big(\tfrac{m \pi}{a} x\big) \sin\big(\tfrac{r \pi}{a} x\big) dx = \\ (y-b) \int_0^a x(x-a)\sin\big(\tfrac{r \pi}{a} x\big) dx \end{multline} which, given orthogonality, leads to $$\sum_{n = 0}^\infty \frac{a}{2}\left(B_{rn} \sqrt{\tfrac{r^2 \pi^2}{a^2} + \tfrac{n^2 \pi^2}{b^2}}\, c\right) \sin\big(\tfrac{n \pi}{b} y\big) = \frac{2 a^3}{r^3 \pi^3}\left[(-1)^r - 1\right](y-b)$$ Multiplying by $\sin(\frac{s \pi}{b} y)$, were $s$ is an integer, and integrating from $0$ to $b$, we have $$\frac{ab}{4}\left(B_{rs} \sqrt{\tfrac{r^2 \pi^2}{a^2} + \tfrac{s^2 \pi^2}{b^2}}\, c\right) = -\frac{2 a^3 b^2}{r^3 s \pi^4}\left[(-1)^r - 1\right]$$ hence $$B_{mn} = -\frac{8 a^2 b \left[(-1)^m - 1\right]}{m^3 n \pi^4 c \sqrt{\tfrac{m^2 \pi^2}{a^2} + \tfrac{n^2 \pi^2}{b^2}}}$$ and the solution is $$u(x,y,t) = -\sum_{m,n = 0}^\infty \tfrac{8 a^2 b \left[(-1)^m - 1\right]}{m^3 n \pi^4 c \sqrt{\tfrac{m^2 \pi^2}{a^2} + \tfrac{n^2 \pi^2}{b^2}}} \sin\big(\tfrac{m \pi}{a} x\big) \sin\big(\tfrac{n \pi}{b} y\big) \sin\Big(\sqrt{\tfrac{m^2 \pi^2}{a^2} + \tfrac{n^2 \pi^2}{b^2}}\, ct\Big)$$

-
Do you mean that for $\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty f(m,n)\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}=F(x,y)$ , $f(m,n)=\dfrac{4}{ab}\int_0^b\int_0^aF(x,y)\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}dx~dy$ for $0<x<a$ and $0<y<b$ ? – doraemonpaul Nov 7 '12 at 11:32
@doraemonpaul Indeed. – Pragabhava Nov 7 '12 at 17:12

Let $u(x,y,t)=\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty C(m,n,t)\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}$ so that it automatically satisfies $u(0,y,t)=u(a,y,t)=u(x,0,t)=u(x,b,t)=0$ ,

Then $\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty\dfrac{m^2\pi^2}{a^2}C(m,n,t)\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}+\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty\dfrac{n^2\pi^2}{b^2}C(m,n,t)\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}+\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty\dfrac{1}{c^2}\dfrac{\partial^2C(m,n,t)}{\partial t^2}\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}=0$

$\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty\left(\dfrac{\partial^2C(m,n,t)}{\partial t^2}+\left(\dfrac{m^2}{a^2}+\dfrac{n^2}{b^2}\right)c^2\pi^2C(m,n,t)\right)\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}=0$

$\therefore\dfrac{\partial^2C(m,n,t)}{\partial t^2}+\left(\dfrac{m^2}{a^2}+\dfrac{n^2}{b^2}\right)c^2\pi^2C(m,n,t)=0$

$C(m,n,t)=C_1(m,n)\sin\left(\sqrt{\dfrac{m^2}{a^2}+\dfrac{n^2}{b^2}}c\pi t\right)+C_2(m,n)\cos\left(\sqrt{\dfrac{m^2}{a^2}+\dfrac{n^2}{b^2}}c\pi t\right)$

$\therefore u(x,y,t)=\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty C_1(m,n)\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}\sin\left(\sqrt{\dfrac{m^2}{a^2}+\dfrac{n^2}{b^2}}c\pi t\right)$

$+\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty C_2(m,n)\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}\cos\left(\sqrt{\dfrac{m^2}{a^2}+\dfrac{n^2}{b^2}}c\pi t\right)$

$u(x,y,0)=0$ :

$\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty C_2(m,n)\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}=0$

$C_2(m,n)=0$

$\therefore u(x,y,t)=\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty C_1(m,n)\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}\sin\left(\sqrt{\dfrac{m^2}{a^2}+\dfrac{n^2}{b^2}}c\pi t\right)$

$u_t(x,y,t)=\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty C_1(m,n)\sqrt{\dfrac{m^2}{a^2}+\dfrac{n^2}{b^2}}c\pi\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}\cos\left(\sqrt{\dfrac{m^2}{a^2}+\dfrac{n^2}{b^2}}c\pi t\right)$

$u_t(x,y,0)=x(x-a)(y-b)$ :

$\sum\limits_{m=1}^\infty\sum\limits_{n=1}^\infty C_1(m,n)\sqrt{\dfrac{m^2}{a^2}+\dfrac{n^2}{b^2}}c\pi\sin\dfrac{m\pi x}{a}\sin\dfrac{n\pi y}{b}=x(x-a)(y-b)$

You need to handle extremely complicated double kernel inversion.

-
Your answer look very thorough, but I cannot really grasp how you solve the equation. I would still have to solve for the $C_1$ coefficients? – Martin Ueding Nov 6 '12 at 9:30

Differentiating this and substituting into the wave equation should convince you that that solution is wrong. You'll get $(n\pi/a)^2$ from the $x$-dependent factor and $(n\pi/b)^2$ from the $y$-dependent factor, and what you get from the time-dependent factor isn't the right value to cancel that.

More fundamentally, though, you seem to have missed the point of separation of variables. The idea is not to get one particular solution, but to write the solution as a superposition of all the separable solutions; the solution itself is generally not separable.

Another problem is that you have the same $n$ in both position-dependent factors; you'll need separate wave numbers there to get all separable solutions.

-
Now I got $u(x, y, t) = \sum_m \sum_n a_m a_n \sin\left(\frac{m\pi}a x\right) \sin\left(\frac{n\pi}b y\right) \sin\left(\sqrt{\frac{m^2\pi^2}{a^2} - \frac{n^2\pi^2}{b^2}} c t\right)$ which makes more sense. Just the minus under the square root seems wrong, it should be a plus to fit the equation. Can I now just use a Fourier series to get the $a_m$ and $a_n$ from the $\dot u(x, y, 0)$? – Martin Ueding Nov 5 '12 at 20:19