NDSolve::tvic
NDSolveValue::tvic
ParametricNDSolve::tvic
ParametricNDSolveValue::tvic
An error occurs because the equations are such that the variable specified as the value of the TemporalVariable option cannot be used as the temporal variable:
NDSolve[{D[u[x, t], t] == D[u[x, t], x, x], u[x, 0] == Exp[-100 x ^ 2]}, u, {x, -1, 1}, {t, 0, 2}, Method -> {MethodOfLines, TemporalVariable -> x}]Most likely, the temporal variable was supposed to be
. When sufficient boundary conditions are also supplied, the PDE can be solved:
NDSolve[{D[u[x, t], t] == D[u[x, t], x, x], u[x, 0] == Exp[-100 x ^ 2], u[-1, t] == E ^ (-100), u[1, t] == E ^ (-100)}, u, {x, -1, 1}, {t, 0, 2}, Method -> {MethodOfLines, TemporalVariable -> t}]