4
$\begingroup$

I have five sets of inequalities and equations:
$$A_1:=\{(b,c);b^2+9c^2-3c<0\},$$ $$A_2:=\{(b,c);\frac{\sqrt{b^2+9c^2-3c}-b+6c}{c}\leq0, \frac{-\sqrt{b^2+9c^2-3c}-b+6c}{c}\leq0\},$$ $$A_3:=\{(b,c);\frac{\sqrt{b^2+9c^2-3c}-b+6c}{c}\leq0, \frac{-\sqrt{b^2+9c^2-3c}-b+6c}{c}=12\},$$ $$A_4:=\{(b,c);\frac{-\sqrt{b^2+9c^2-3c}-b+6c}{c}\leq0, \frac{\sqrt{b^2+9c^2-3c}-b+6c}{c}=12\},$$ $$A_5:=\{(b,c);\frac{\sqrt{b^2+9c^2-3c}-b+6c}{c}=12, \frac{-\sqrt{b^2+9c^2-3c}-b+6c}{c}=12\}.$$

I would like to plot $\cup_{i=1}^5A_i$ and the triangle $B:=\{(b,c):3c>2b-1, 3c>-2b-1,1>3c\}$ in one single figure to see for example whether $B\subset \cup_{i=1}^5A_i$. How to do this?

$\endgroup$
3
  • $\begingroup$ Should be a straightforward application of RegionPlot? $\endgroup$
    – Verbeia
    Mar 20, 2012 at 21:45
  • 1
    $\begingroup$ Tim, It is always a good idea to leave your question open for at least a few hours if not a day so that more people may be enticed into submitting an answer. $\endgroup$ Mar 20, 2012 at 22:34
  • 1
    $\begingroup$ Welcome to Mathematuca.SE :-) $\endgroup$
    – Szabolcs
    Mar 21, 2012 at 10:13

2 Answers 2

14
$\begingroup$

Unless I made a typo (please next time provide the equations also in MMA code) your problem is rather strange.

The a5 is clearly just a point, a4 is false, and a3 reduces to a line. Only a2 and a1 are areas as the following shows:

a1 = b^2 + 9*c^2 - 3*c < 0
a2 = Reduce[{(Sqrt[b^2 + 9*c^2 - 3*c] - b + 6*c)/c <= 0 && 
           (-Sqrt[b^2 + 9*c^2 - 3*c] - b + 6*c)/c <= 0}]
a3 = Reduce[{(Sqrt[b^2 + 9*c^2 - 3*c] - b + 6*c)/c <= 0 &&
           (-Sqrt[b^2 + 9*c^2 - 3*c] - b + 6*c)/c == 12}]
a4 = Reduce[{(-Sqrt[b^2 + 9*c^2 - 3*c] - b + 6*c)/c <= 0 &&
           (Sqrt[b^2 + 9*c^2 - 3*c] - b + 6*c)/c == 12}]
a5 = Reduce[{(Sqrt[b^2 + 9*c^2 - 3*c] - b + 6*c)/c == 12 &&
           (-Sqrt[b^2 + 9*c^2 - 3*c] - b + 6*c)/c == 12}] 
bb = {3*c > 2*b - 1 && 3*c > -(2*b) - 1 && 1 > 3*c}

(*
==> b^2 - 3 c + 9 c^2 < 0

==> (0 < c < 1/15 && 
   Sqrt[3 c - 9 c^2] <= b <= 1/4 (1 + 9 c)) || (b == 2/5 && c == 1/15)

==> -(1/4) < b <= 0 && c == 1/9 (-1 - 4 b)

==> False

==> c == 1/15 && b == -(2/5)

==> {3 c > -1 + 2 b && 3 c > -1 - 2 b && 1 > 3 c}
*)

RegionPlot[{a1, a2, a3, a4, a5, bb}, {b, -1, 1}, {c, -1, 1}, PlotPoints -> 100]

Mathematica graphics

$\endgroup$
1
  • $\begingroup$ I can't thank you enough. I really appreciate it. $\endgroup$
    – user794
    Mar 20, 2012 at 22:18
5
$\begingroup$

Use RegionPlot like this:

RegionPlot[ineq1 || ineq2||...,{b,r1,r2},{c,s1,s2}] 

etc, where you have to choose r1 and r2 so that the whole region you want fits inside the rectangle r1<=b<=r2, s1<=c<=s2.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.