Maximize[a x^2 + b x + c, x] 

gives this solution:

enter image description here

Does the word True stand for "else" here? What exactly did Maximize return?


1 Answer 1


Yes. The right column is simply a list of conditions that define separate regimes of a Piecewise function. Since in principle these conditions could overlap, Mathematica determines the result of a Piecewise by checking the conditions from top to bottom, much as it does in Which. So if the condition is True it acts as a "catch-all" such that the corresponding value is chosen whenever none of the conditions above are true. This ensures that the Piecewise function always has a value. Therefore it has the same meaning as an "else" or "otherwise" you might read in "normal" mathematical notation of a piecewise function.


Not the answer you're looking for? Browse other questions tagged or ask your own question.