NDSolve::bdord NDSolveValue::bdord ParametricNDSolve::bdord ParametricNDSolveValue::bdord
Details
Examples
Basic Examples (1)
The derivative boundary condition is specified with respect to the wrong variable:
NDSolve[{Derivative[2, 0][f][x, t] == Derivative[0, 1][f][x, t],
f[0, t] == Sin[t], f[x, 0] == 0, Derivative[0, 1][f][5, t] == 0}, f, {x, 0, 5}, {t, 0, 4 Pi}]This shows a valid specification of a solution of this partial differential equation:
sol = NDSolve[{Derivative[2, 0][f][x, t] == Derivative[0, 1][f][x, t],
f[0, t] == Sin[t], f[x, 0] == 0, Derivative[1, 0][f][5, t] == 0}, f, {x, 0, 5}, {t, 0, 4 Pi}]The problem is that
is specifying the first derivative with respect to
. However, the highest-order time derivative term in the equation is
, so only a specification of the function can be given.
However, because of the
term in the equations, you need a specification of both the value of the function and first derivative of the function. Therefore, if you change
to
, the proper number of boundary conditions is specified, so you can get a solution.
This shows a plot of the solution:
Plot3D[Evaluate[f[x, t] /. sol[[1]]], {x, 0, 5}, {t, 0, 4 Pi}]Clear[sol]