2
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ 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 $\endgroup$ – Artes Jan 17 '13 at 9:51
8
$\begingroup$

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

|improve this answer|||||
$\endgroup$
3
$\begingroup$

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}}
|improve this answer|||||
$\endgroup$
  • $\begingroup$ I tried NMinimize and didn't work too well. $\endgroup$ – b.gates.you.know.what Jan 16 '13 at 10:43
  • $\begingroup$ @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. $\endgroup$ – Silvia Jan 16 '13 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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