The last condition x
in Piecewise
is not a predicate: -1 <= b <= 1 && (x^3) - 2*x + b > 0 || b > 1 && x
. This variation works:
e = 0.2; bo = 1; T = 2; xo = 1; x1 = -1;
u[b_, x_] :=
Piecewise[{{1, -1 <= b <= 1 && (x^3) - 2*x + b > 0 ||
b > 1 && x > 1}}, 0];
StreamPlot[
PiecewiseExpand[{x - xo + (xo - x1)*u[b, x], -((x^3) - T*x + b)/
e}], {b, -2, 2}, {x, -2, 2}]
I don't know why we need PiecewiseExpand
.