Question: Maple ignores the piecewise in dsolve

Hello

I am solving an equation that has two piecewise functions on it. It seems that Maple ignore the second piecewise. If I include it or remove it  I will get the same solution. I tried to fix the problem but still cannot figure out why Maple ignores it.

 

This is Maple code:

restart;

with(plots);

with(DEtools);

eq := diff(x(t), t) = -piecewise(abs(x(t))-.5 > 0, abs(x(t))-.5, 0)-piecewise(0 > x(t) and x(t) > 1, 0, x(t) > 1, 1);

inti[1] := x(0) = 1;

sol := dsolve({eq, inti[1]}, {x(t)}, numeric);

sol(20);

 odeplot(sol, [t, x(t)], t = 0 .. 20, axes = BOXED);

 

Thank you

Please Wait...