weqn = 4*D[z[x, t], {t, 1}] - 9*D[z[x, t], {x, 2}] - 5*z[x, t] == 0;
bc = {z[0, t] == z[6, t] == 0};
ic = z[x, 0] == Sin[Pi*x/6]^2;
The solution, using separation of variables, is straight forward. Yet Mathematica can't do this. I'm puzzled.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityWell, at least solving it numerically works:
weqn = 4 D[z[x, t], t] - 9 D[z[x, t], x, x] - 5 z[x, t] == 0;
bc = {z[0, t] == 0, z[6, t] == 0};
ic = z[x, 0] == Sin[Pi x/6]^2;
R = DiscretizeRegion@Rectangle[{0, 0}, {6, 4}];
f = NDSolveValue[{
weqn,
DirichletCondition[z[x, t] == 0, x == 0],
DirichletCondition[z[x, t] == 0, x == 6],
DirichletCondition[z[x, t] == Sin[Pi*x/6]^2, t == 0]
},
z, {x, t} \[Element] R];
Plot3D[f[x, t], {x, t} \[Element] R]
You know, there is more to the Universe than 101 Mathematica ?
Solution by Maple:
z[x_, t_, inf_] := Sum[Piecewise[{{-8*Sin[(1/6)*Pi*n*x]*Exp[-(1/16)*t*(Pi^2*n^2 - 20)]/(n*Pi*(n^2 - 4)), n < 2}, {0,
n == 2}, {4*Sin[(1/6)*Pi*n*x]*Exp[-(1/16)*t*(Pi^2*n^2 - 20)]*((-1)^n - 1)/(n*Pi*(n^2 - 4)), n > 2}}], {n, 1, inf}] // N;
Plot3D[z[x, t, 10], {x, 0, 6}, {t, 0, 4}]