NDSolve::bcnan NDSolveValue::bcnan ParametricNDSolve::bcnan ParametricNDSolveValue::bcnan
Examples
Basic Examples (2)
An error occurs because one of the boundary conditions involves the variable of the differential equation.
is causing the problem since
is the independent variable in the equation:
NDSolve[{f''[x] + f[x] == 0, f[1] == x, f[2] == 1}, f, {x, 1, 2}]This shows a valid specification of a boundary value problem:
NDSolve[{f''[x] + f[x] == 0, f[1] == 1, f[2] == 1}, f, {x, 1, 2}]An error occurs because a parameter in one of the boundary conditions does not have a numerical value:
NDSolve[{f''[x] + f[x] == 0, f[0] == 0, b f[1] == 1}, f, {x, 0, 1}]This shows a valid specification of the solution of a boundary value problem:
Block[{b = 2}, NDSolve[{f''[x] + f[x] == 0, f[0] == 0, b f[1] == 1}, f, {x, 0, 1}]]