Thanks for the replys! NDSolve is really interesting and the animations are great, but i would also really like to take a look at the analytical solutions for these equations. I tried some ic's (plane waves,gaussians,..) in 2D, now with the 4 bc's, but everytime i just got my input as output, without an error message (as with your codes).I've found something in the DSolve documentation though, under Scope->Hyperbolic PDEs, quote:
Dirichlet problem for the wave equation in a rectangle:
weqn = D[u[x, y, t], {t, 2}] == Laplacian[u[x, y, t], {x, y}];
ic = {u[x, y, 0] == (1/10) (x - x^2) (2 y - y^2),
Derivative[0, 0, 1][u][x, y, 0] == 0};
bc = {u[x, 0, t] == 0,
u[0, y, t] == 0, u[1, y, t] == 0, u[x, 2, t] == 0};
The solution is a doubly infinite trigonometric series:
(sol = FullSimplify[
u[x, y, t] /. DSolve[{weqn, ic, bc}, u, {x, y, t}][[1]],
K[1] \[Element] Integers &&
K[2] \[Element] Integers]) // TraditionalForm
\!\(\*
UnderoverscriptBox[
StyleBox["\[Sum]", "InactiveTraditional"],
RowBox[{
TemplateArgBox[
RowBox[{"K", "[", "1", "]"}]], "=",
TemplateArgBox["1"]}],
TemplateArgBox["\[Infinity]"]]\(\*
UnderoverscriptBox[
StyleBox["\[Sum]", "InactiveTraditional"],
RowBox[{
TemplateArgBox[
RowBox[{"K", "[", "2", "]"}]], "=",
TemplateArgBox["1"]}],
TemplateArgBox["\[Infinity]"]]\*
TemplateArgBox[
FractionBox[
RowBox[{"32", " ",
RowBox[{"(",
RowBox[{
SuperscriptBox[
RowBox[{"(",
RowBox[{"-", "1"}], ")"}],
RowBox[{"K", "[", "1", "]"}]], "-", "1"}], ")"}], " ",
RowBox[{"(",
RowBox[{
SuperscriptBox[
RowBox[{"(",
RowBox[{"-", "1"}], ")"}],
RowBox[{"K", "[", "2", "]"}]], "-", "1"}], ")"}], " ",
RowBox[{"cos", "(",
RowBox[{"\[Pi]", " ", "t", " ",
SqrtBox[
RowBox[{
SuperscriptBox[
RowBox[{"K", "[", "1", "]"}], "2"], "+",
FractionBox[
SuperscriptBox[
RowBox[{"K", "[", "2", "]"}], "2"], "4"]}]]}], ")"}], " ",
RowBox[{"sin", "(",
RowBox[{"\[Pi]", " ", "x", " ",
RowBox[{"K", "[", "1", "]"}]}], ")"}], " ",
RowBox[{"sin", "(",
RowBox[{
FractionBox["1", "2"], " ", "\[Pi]", " ", "y", " ",
RowBox[{"K", "[", "2", "]"}]}], ")"}]}],
RowBox[{"5", " ",
SuperscriptBox["\[Pi]", "6"], " ",
SuperscriptBox[
RowBox[{"K", "[", "1", "]"}], "3"], " ",
SuperscriptBox[
RowBox[{"K", "[", "2", "]"}], "3"]}]]]\)\)
End of quote.
Why does this work and the others don't? The only difference i can see are the initial conditions?