Group Abstract Group Abstract

Message Boards Message Boards

0
|
14.3K Views
|
13 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Solve 2D Wave equation with DSolve?

Posted 9 years ago
POSTED BY: till johann
13 Replies
Posted 9 years ago

Actually i was just playing around with these equations, checking out how i can use mathematica to gain a deeper understanding, so my problem isn't really clearly defined. I didn't expect the solution would be so complicated though. Polar coordinates seem to be the way to go, i will try my hand on that.

POSTED BY: till johann
Attachments:
POSTED BY: Hans Dolhaine
POSTED BY: Hans Dolhaine
POSTED BY: Hans Dolhaine
Posted 9 years ago

Thanks for your answers, this has helped me a lot! Im curious how you came up with the first solution Hans? Also, Is there a way to use the product ansatz to "transform" one complex DSolve computation into several simpler ones?(Sorry if this goes beyond the scope of this discussion)

POSTED BY: till johann
Posted 9 years ago

So I played around. Yeah it seems DSolve recognized something with the ICs that it liked. So that isn't helping you much. However, this might help you with some tricks related to the infinite series. Also notice I used DSolveValue to avoid getting back a rule.

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};
dsol = DSolveValue[{weqn, ic, bc}, u, {x, y, t}];
ListAnimate[
 Table[Plot3D[
   Activate[dsol[x, y, t] /. Infinity -> 5], {x, 0, 1}, {y, 0, 2}, 
   PlotRange -> {{0, 1}, {0, 2}, {-0.05, 0.05}}], {t, 0, 10, 0.25}]]

Note the Activate function and the replacement of infinity.

I realize you want a nice compact equation, but you might not get it.

enter image description here

POSTED BY: Eric Meyers
POSTED BY: Hans Dolhaine
Posted 9 years ago

Sounds like progress. I'll play around a bit more when I get home from work.

POSTED BY: Eric Meyers
POSTED BY: Hans Dolhaine
Posted 9 years ago

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?

POSTED BY: till johann
Posted 9 years ago
POSTED BY: Eric Meyers

Interesting.

I don't get an error message, but neither a solution.....

DSolve[{-
\!\(\*SuperscriptBox["u", 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "0", ",", "2"}], ")"}],
Derivative],
MultilineFunction->None]\)[x, y, t] + 
\!\(\*SuperscriptBox["u", 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "2", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[x, y, t] + 
\!\(\*SuperscriptBox["u", 
TagBox[
RowBox[{"(", 
RowBox[{"2", ",", "0", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[x, y, t] == 0, 
  u[x, y, 0] == E^(-x^2 - y^2), 
\!\(\*SuperscriptBox["u", 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "0", ",", "1"}], ")"}],
Derivative],
MultilineFunction->None]\)[x, y, 0] == 0, u[x, 0, 0] == 0, 
  u[0, y, 0] == 0}, u, {x, y, t}]
POSTED BY: Hans Dolhaine
Posted 9 years ago
POSTED BY: till johann
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard