Question: Piecewise function - How plot function with piecewise in Maple?

Hi

I have the following piecewise function in Maple:

sigmaP:=piecewise(u < -1,-1,u >1,1,u);

Now we can plot this function:

plot(sigmaP,u=-5..5,size=[1200,300],gridlines,discont=[showremovable]);

Next, I define a new piecewise  function as

sigmaF:=u->piecewise(u < -1,-1,u >1,1,u);

and I use this function in 

Fun:=proc(x1,x2,u1,u2)
	2*x1*(1+x2)*sigmaF(u1)+(1+x2^2)*sigmaF(u2);
end proc:

Now I need to find a minimum of this function so I use the following code 

GlobalOptimization:-GlobalSolve(Fun,x1,x2,u1,u2);

where 

x1:=-5..5;
x2:=-10..100;
u1:=-1..1;
u2:=-1..1;

And I have the problem with plot function Fun. How to plot function Fun???

Best

 

Please Wait...