maybe the problem is to integrate a piecewise function, because I do the following, and not get the result.
>> fun=@(x)piecewise_eval(x,[0.4 0.500],{0 10 0})
>> int(fun(x),x,0.4,1)
Error using symengine (line 58) Unable to prove 'x < 2/5' literally. To test the statement mathematically, use isAlways.
Error in sym/subsindex (line 1554) X = find(mupadmex('symobj::logical',A.s,9)) - 1;
Error in sym>privformat (line 2357) x = subsindex(x)+1;
Error in sym/subsref (line 1578) [inds{k},refs{k}] = privformat(inds{k});
Error in piecewise_eval (line 75) z(k)=feval(funs{1},x(k));
Error in @(x)piecewise_eval(x,[0.4,0.500],{0,10,0})