Question: piecewise function simplify / cancel out a variable

Hello,
Maple does not cancel out a variable.

Why is that?

Is there a way to solve this? 

(I pasted my code on the bottom of this message)

 

Thanks for your help/advice,

Stephan

restart:
M(x):=piecewise(x<=l,1/2*(q*x^2)/(EI)-3/8*(q*l*x)/(EI),l<x,1/2*(q*x^2)/(EI)-13/8*(q*l*x)/(EI)+5/4*(q*l^2)/(EI)):
M(x):=M(x)*(-EI);
# simplify() does not work.....?
M(x):=simplify(%) assuming EI>0;
# Wiht EI cancelled out by hand it schould look like:
M(x):=piecewise(x<=l,1/2*(q*x^2)-3/8*(q*l*x),l<x,1/2*(q*x^2)-13/8*(q*l*x)+5/4*(q*l^2));

 

Please Wait...