Solved
Mike Armstrong wrote:
Nice Werner, I have to say either the root or Maximize is the way to got though.
Thanks, and yes, I agree. I just added the vector method with max() because this is what sameer obviously was trying to do but failed, because he used a range variable instead of a vector. N=250 as I had set it is too small - this value has at least to be doubled. Furthermore getting the corresponding x-value using match() is not quite "natural".
While I have a slight favor for the derivative way I guess your solve block may be more versatile and probably more robust when we come across more "ill-natured" functions.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

