Re: Bug or feature of max



On Nov 15, 2:03 pm, Marc Boyer <Marc.Bo...@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

The real problem I was trying to solve was:
Let be
Beta(x,R,T) = R * Max( x - T , 0 )
To(o) = ( R * T + b - r * o )
with functions and parametres are Real.
How does looks the following expression
Beta(x,R,T(R+b/r))

Marc, if you are an occasional user, you might find Maxima simpler.
Here is what I see with Maxima 5.13.0.

(%i1) display2d : false;
(%o1) false
(%i2) Beta(x,R,T) := R * max( x - T , 0 ) ;
(%o2) Beta(x,R,T):=R*max(x-T,0)
(%i3) To(o) := ( R * T + b - r * o ) ;
(%o3) To(o):=R*T+b+(-r)*o
(%i4) Beta(x,R,To(R+b/r));
(%o4) max(0,-R*T+r*(R+b/r)+x-b)*R
(%i5) ratsimp (%);
(%o5) max(0,-R*T+r*R+x)*R

Hope this helps.

Robert Dodier
.