@JB_10220769 wrote:
How can I get only the positive solution for symbolic evaluated equation. I want to use the function "Z(a,s,x) in the equation for Max and return only result.
Prime cannot do so because the sign depends on the values of a and s. How should Prime decide for the symbolic expression to be positive or negative? Depending on a and s its sometimes the first and sometimes the second entry.

But if you are sure that both a and s will be only positive values you can tell the symbolics so using the "assume" modifier. Ever so often the symbolics will happily ignore it, but in case of your example you are lucky and it works. Because we assume that a, s as well as x are positive, we can use "assume, ALL>0".

You may consider turning Max.T into a function of a and s.
The assume modifier was applied to the calculation of Max.T as well to avoid a result like

EDIT: Ah, I see that Valery was bit faster by suggesting the same modifier but in a different example. In his example, "assume, c>0" would probably have sufficed.