Search code examples
mathwolfram-mathematicawave

Mathematica doesn't solve wave equation when given boundary conditions


Still new to Mathematica syntax. When I do:

DSolve[{
  D[u[x, t], {x, 2}] == (1/(v*v))*D[u[x, t], {t, 2}],
  u[0, t] == 0,
  u[l, 0] == 0
  }, u, {x, t}]

it just returns what I entered

DSolve[{(u^(2,0))[x,t]==(u^(0,2))[x,t]/v^2,u[0,t]==0,u[l,0]==0},u,{x,t}]

However, when I remove the boundary conditions, I get

{{u->Function[{x,t},C[1][t-(Sqrt[v^2] x)/v^2]+C[2][t+(Sqrt[v^2] x)/v^2]]}}

with C[1] and C[2] representing the functions for the boundary conditions.

Anyone know why this is happening?


Solution

  • 2 things:

    1. Don't you need more boundary and initial conditions than just 2? You have second order derivatives on left and right side, each requires 2 conditions. Hence total is 4. see http://mathworld.wolfram.com/WaveEquation1-Dimensional.html

    2. I do not think DSolve or NDSolve can solve initial and boundary value problems? I seem to have read this somewhere sometime ago. No time to check now.