Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a regionplot like the following:

m1 = 0.547;
m1p = 0.958;
m2 = 0.137;
r1 = Sqrt[m1^2 + (Sqrt[w1^2 - m2^2] + Sqrt[w2^2 - m2^2])^2] // Expand;
r2 = Sqrt[m1^2 + (Sqrt[w1^2 - m2^2] - Sqrt[w2^2 - m2^2])^2] // Expand;
RegionPlot[
 m1p - w1 - w2 < Re[r1] && 
  m1p - w1 - w2 > Re[r2], {w1, .1, .25}, {w2, .1, .25}, 
 BoundaryStyle -> Blue, FrameLabel -> {"w1", "w2"}]

How can I find minimum and maximum of w1 and w2?

share|improve this question
    
Thanks for registering. Besides upvoting correct answers you can accept one answer to any of your questions which you find the best (by clicking a tickmark under the vote counter). Otherwise you should explain more exactly what you are expecting. For more information see mathematica.stackexchange.com/faq –  Artes Jan 17 '13 at 9:51
add comment

2 Answers

up vote 7 down vote accepted

If you're happy with your plot you can just recycle it :

rp = RegionPlot[m1p - w1 - w2 < Re[r1] && m1p - w1 - w2 > Re[r2], {w1, .1, .25}, {w2, .1, .25}, 
   BoundaryStyle -> Blue, FrameLabel -> {"w1", "w2"}];

 minw1 = Min@rp[[1, 1, All, 1]];
 maxw1 = Max@rp[[1, 1, All, 1]];
 minw2 = Min@rp[[1, 1, All, 2]];
 maxw2 = Max@rp[[1, 1, All, 2]];

 Show[rp, 
      Graphics[{Red, Line[{{minw1, 0}, {minw1, 0.5}}]}], 
      Graphics[{Red, Line[{{maxw1, 0}, {maxw1, 0.5}}]}], 
      Graphics[{Red, Line[{{0, minw2}, {0.5, minw2}}]}], 
      Graphics[{Red, Line[{{0, maxw2}, {0.5, maxw2}}]}]]

enter image description here

share|improve this answer
add comment

You can take an initial point in your plot region and feed it to functions like FindMinimum to search for a local minimum.

For example the max value of w2 (upper boundary of the region):

FindMinimum[{-w2,
  m1p - Re[r1] < w1 + w2 < m1p - Re[r2]},
 {{w1, 0.1424}, {w2, 0.2399}}]
{-0.244612, {w1 -> 0.142883, w2 -> 0.244612}}
share|improve this answer
    
I tried NMinimize and didn't work too well. –  b.gatessucks Jan 16 '13 at 10:43
    
@b.gatessucks I tried it too with no luck. For this kind of problems, I tend more and more to a local extremum searcher now. –  Silvia Jan 16 '13 at 10:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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