Message Boards Message Boards

0
|
2499 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

FindMaximum with constraints, WorkingPrecision issue

Posted 11 years ago
Hello,

do you know why the error message in the following example appears? Somehow it appears when introducing the constraint x>0...
In[60]:= FindMaximum[{x - 2 x^2, x > 0}, x, WorkingPrecision -> 8]

SetPrecision::precsm: Requested precision 8.` is smaller than $MinPrecision. Using $MinPrecision instead. >>

SetPrecision::precsm: Requested precision 8.` is smaller than $MinPrecision. Using $MinPrecision instead. >>

Out[60]= {0.12499999, {x -> 0.2500719625311951}}

I am using Mathematica 9, my OS is Ubuntu with 64 bit.

Thank you in advance,
Igor
POSTED BY: igor igel
Posted 11 years ago
ok I found the solution myself:

In[12]:= FindMaximum[{x - 2 x^2 && x > 0}, x,
WorkingPrecision -> 8]

Out[12]= {0.12500000, {x -> 0.24995000}}

(that is && insted of ,)

However still I am wondering what made the difference and why with Maximize the "," works and not the "&&"

In[13]:= Maximize[{x - 2 x^2 && x > 0}, x, WorkingPrecision -> 8]

Out[13]= Maximize[{x - 2 x^2 && x > 0}, x, WorkingPrecision -> 8]

In[6]:= Maximize[{x - 2 x^2, x > 0}, x, WorkingPrecision -> 8]

Out[6]= {1/8, {x -> 1/4}}
POSTED BY: igor igel
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