NDSolve::ndfdmc NDSolveValue::ndfdmc ParametricNDSolve::ndfdmc ParametricNDSolveValue::ndfdmc
Examples
Basic Examples (2)
An error occurs because the initial conditions are specified using lists and the equation for the derivatives gives scalar values for the derivatives:
NDSolve[{x''[t] + x[t].x[t] == 0, x[0] == {0, 1}, x'[0] == {1, 0}}, x, {t, 0, 1}]This is fixed by using a vector on the right-hand side of the equation:
NDSolve[{x''[t] + x[t].x[t] == {0, 0}, x[0] == {0, 1}, x'[0] == {1, 0}}, x, {t, 0, 1}]The dimensions of each equation need to match the dimensions of the corresponding derivatives:
NDSolveValue[{x'[t] == y[t], y'[t] == {-x[t]}, x[0] == 1, y[0] == 0}, x[t] + y[t], {t, 0, π}]This is fixed by eliminating the List from the equation for y':
NDSolveValue[{x'[t] == y[t], y'[t] == -x[t], x[0] == 1, y[0] == 0}, x[t] + y[t], {t, 0, π}]