Message Boards Message Boards

0
|
4666 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Minimize of a constant value yields -12/5

Suppose I have a function that is a constant, like 42, for example. And I want to minimize that function with respect to a variable such as t. Now, obviously, this makes no sense. The value of the function is always 42. But what does Mathematica return: -12/5

Minimize[42,t]

{42, {t -> -(12/5)}}

This doesn't make much sense to me. You appear to get the same -12/5 answer regardless of the value of the constant. I thought perhaps that Minimize was shifting to numerical methods, but if I run this:

NMinimize[42, t]

I get this:

{42., {t -> 0}}

Perhaps, this sentence in the documentation explains what is going on: "Even if the same minimum is achieved at several points, only one is returned."
So, bug, feature, user error? If it's a bug or feature, could a future version of Minimize return a better answer?

POSTED BY: Seth Chandler
2 Replies

Minimizing a constant parameter gives a less bizarre number:

In[58]:= Minimize[a, t]

Out[58]= {a, {t -> 0}}
POSTED BY: Gianluca Gorni

Yes. But t->0 is somewhat misleading, or at least incomplete. I wonder if a more sophisticated answer might be returned such as t->Interval[{-inf,inf}] or some sort of warning message were printed.

POSTED BY: Seth Chandler
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract