Message Boards Message Boards

1 Reply
0 Total Likes
View groups...
Share this post:

Newbie Question - Having problems with the solution/plot of Wave Equation

Posted 9 years ago

I'm looking to Plot the PDE for a range of 't''s on u(x) plots. I have two boundary conditions. My solution is as follows:

WaveEquation = D[u[x, t], {x, 2}] - D[u[x, t], {t, 2}] == 0;
Bound1 = (D[u[x, t], t] /. t -> 0) == 0.5 ;
Bound2 = u[x, 0] == x*(1 - x);
sol = DSolve[{WaveEquation, Bound1, Bound2}, u[x, t], {x, t}]

which strangely outputs my input. I tried Plotting the solution on a 3D plot with:

Plot3D[u[x, t] /. sol, {x, 0, 1}, {t, 0, 5}]

and Mathematica returned a host of errors. Where am I going wrong?

POSTED BY: Daniel Dehtyriov

I don't know what's wrong, but as a workaround Mathematica can solve the wave equation in terms of two arbitrary functions C[1][x] and C[2][x]

DSolve[WaveEquation, u, {x, t}]

which you can replace into the boundary conditions

{Bound1, Bound2} /. DSolve[WaveEquation, u, {x, t}][[1]]

and solve for C[1] and C[2].

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract