Hi I'm trying to solve the wave equation (with initial and boundary conditions) with Mathematica, but once I hit evaluate notebook, it never stops running. The code is as follows:
ClearAll["Global`*"];
Clear[Derivative];
v = 1;
L = 10;
lambda = 2*L;
c = 3*10^8;
omega = 2*Pi*c/lambda;
tmax = 30*L/v;
Solution =
NDSolve[{v^2*D[u[x, t], x, x] - D[u[x, t], t, t] == 0,
u[x, 0] == 0, (D[u[x, t], t] /. t -> 0) ==
0, (D[u[x, t], x] /. x -> 0) ==
Tanh[t]*Sin[omega*t], (D[u[x, t], x] /. x -> L) == 0},
u, {x, 0, L}, {t, 0, tmax}]
Any suggestions?