(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 9.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[     25443,        523]
NotebookOptionsPosition[     25132,        507]
NotebookOutlinePosition[     25467,        522]
CellTagsIndexPosition[     25424,        519]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"numRegion", "[", 
    RowBox[{"expr_", ",", 
     RowBox[{"var_Symbol:", "x"}], ",", 
     RowBox[{"range", ":", 
      RowBox[{"{", 
       RowBox[{"xmin_", ",", "xmax_"}], "}"}], ":", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0"}], "}"}]}], ",", 
     RowBox[{"opts", ":", 
      RowBox[{"OptionsPattern", "[", "]"}]}]}], "]"}], ":=", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"le", "=", 
        RowBox[{"LogicalExpand", "[", 
         RowBox[{"Reduce", "[", 
          RowBox[{"expr", ",", "var", ",", "Reals"}], "]"}], "]"}]}], ",", 
       "y", ",", "opendots", ",", "closeddots", ",", "max", ",", "min", ",", 
       "len"}], "}"}], ",", 
     RowBox[{
      RowBox[{"opendots", "=", 
       RowBox[{"Cases", "[", 
        RowBox[{
         RowBox[{"Flatten", "[", 
          RowBox[{"le", "/.", 
           RowBox[{
            RowBox[{"And", "|", "Or"}], "\[Rule]", "List"}]}], "]"}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"n_", "<", "var"}], "|", 
           RowBox[{"n_", ">", "var"}], "|", 
           RowBox[{"var", "<", "n_"}], "|", 
           RowBox[{"var", ">", "n_"}]}], "\[RuleDelayed]", "n"}]}], "]"}]}], 
      ";", "\[IndentingNewLine]", 
      RowBox[{"closeddots", "=", 
       RowBox[{"Cases", "[", 
        RowBox[{
         RowBox[{"Flatten", "[", 
          RowBox[{"le", "/.", 
           RowBox[{
            RowBox[{"And", "|", "Or"}], "\[Rule]", "List"}]}], "]"}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"n_", "\[LessEqual]", "var"}], "|", 
           RowBox[{"n_", "\[GreaterEqual]", "var"}], "|", 
           RowBox[{"var", "\[LessEqual]", "n_"}], "|", 
           RowBox[{"var", "\[GreaterEqual]", "n_"}]}], "\[RuleDelayed]", 
          "n"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"max", ",", "min"}], "}"}], "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"TrueQ", "[", 
          RowBox[{"xmin", "<", "xmax"}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"xmin", ",", "xmax"}], "}"}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"{", 
            RowBox[{"Max", ",", "Min"}], "}"}], "@", 
           RowBox[{"Cases", "[", 
            RowBox[{"le", ",", 
             RowBox[{"_", "?", "NumericQ"}], ",", "Infinity"}], "]"}]}], "//",
           "Through"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"len", "=", 
       RowBox[{"max", "-", "min"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"RegionPlot", "[", 
       RowBox[{
        RowBox[{"le", "&&", 
         RowBox[{
          RowBox[{"-", "1"}], "<", "y", "<", "1"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"var", ",", 
          RowBox[{"min", "-", 
           RowBox[{"len", "/", "10"}]}], ",", 
          RowBox[{"max", "+", 
           RowBox[{"len", "/", "10"}]}]}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"y", ",", 
          RowBox[{"-", "1"}], ",", "1"}], "}"}], ",", 
        RowBox[{"Epilog", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{"Thick", ",", "Red", ",", 
           RowBox[{
            RowBox[{
             RowBox[{"Line", "[", 
              RowBox[{"{", 
               RowBox[{
                RowBox[{"{", 
                 RowBox[{"#", ",", "1"}], "}"}], ",", 
                RowBox[{"{", 
                 RowBox[{"#", ",", 
                  RowBox[{"-", "1"}]}], "}"}]}], "}"}], "]"}], "&"}], "/@", 
            "closeddots"}], ",", "Dotted", ",", 
           RowBox[{
            RowBox[{
             RowBox[{"Line", "[", 
              RowBox[{"{", 
               RowBox[{
                RowBox[{"{", 
                 RowBox[{"#", ",", "1"}], "}"}], ",", 
                RowBox[{"{", 
                 RowBox[{"#", ",", 
                  RowBox[{"-", "1"}]}], "}"}]}], "}"}], "]"}], "&"}], "/@", 
            "opendots"}]}], "}"}]}], ",", 
        RowBox[{"Axes", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{"True", ",", "False"}], "}"}]}], ",", 
        RowBox[{"Frame", "\[Rule]", "False"}], ",", 
        RowBox[{"AspectRatio", "\[Rule]", ".05"}], ",", 
        RowBox[{"Ticks", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{"1.14", ",", 
               RowBox[{"Subscript", "[", 
                RowBox[{"r", ",", "0"}], "]"}]}], "}"}], ",", 
             RowBox[{"{", 
              RowBox[{"1.2", ",", 
               RowBox[{
                RowBox[{"Subscript", "[", 
                 RowBox[{"r", ",", "0"}], "]"}], "+", "\[Delta]"}]}], "}"}], 
             ",", 
             RowBox[{"{", 
              RowBox[{"1.84", ",", 
               RowBox[{
                RowBox[{"Subscript", "[", 
                 RowBox[{"r", ",", "B"}], "]"}], "-", "\[Delta]"}]}], "}"}], 
             ",", 
             RowBox[{"{", 
              RowBox[{"1.95", ",", 
               RowBox[{"Subscript", "[", 
                RowBox[{"r", ",", "B"}], "]"}]}], "}"}]}], "}"}], ",", 
           RowBox[{"{", "}"}]}], "}"}]}], ",", 
        RowBox[{"AxesLabel", " ", "\[Rule]", " ", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"r", ",", "0"}], "}"}], "opts"}]}]}], "]"}]}]}], "]"}]}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"numRegion", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"1.2", "\[LessEqual]", "y", "\[LessEqual]", "1.84"}], "||", 
    RowBox[{"1.9", "<", "y"}]}], ",", "y"}], "]"}]}], "Input",
 CellChangeTimes->{{3.607864493952816*^9, 3.6078645195720043`*^9}, {
  3.607864741471542*^9, 3.607864954598319*^9}, {3.6078653018184013`*^9, 
  3.607865524345045*^9}, {3.607866192063891*^9, 3.6078664178646917`*^9}, {
  3.607866552998549*^9, 3.607866961321631*^9}, {3.6078671025077963`*^9, 
  3.6078671119299593`*^9}, {3.607867159099209*^9, 3.607867180264756*^9}, {
  3.607867243678753*^9, 3.607867347050746*^9}, {3.607867379075852*^9, 
  3.607867576859871*^9}, {3.6078676111678953`*^9, 3.607867655732607*^9}, {
  3.607867695812258*^9, 3.607867783472434*^9}, {3.607868544578424*^9, 
  3.607868835322131*^9}, {3.6081272239303923`*^9, 3.608127302476953*^9}, {
  3.608127337780991*^9, 3.6081276408879547`*^9}}],

Cell[BoxData[
 GraphicsBox[GraphicsComplexBox[CompressedData["
1:eJxl2nmUVdWVx3EiRnFADaJoKaABsQKKNljVSlpfKzHaiXEhGhVCCkHFaEWD
[encoded data, 5307 characters]
bex5+38BsiVuow==
   "], {{
     {RGBColor[0.798413061722744, 0.824719615472648, 0.968322270542458], 
      EdgeForm[None], GraphicsGroupBox[{PolygonBox[CompressedData["
1:eJxVmnn8lkMXxu+ZiUiRJCVatEebfq3aJZW0J9o3Iq2yb9lCIdqRpRSRiJAQ
[encoded data, 8235 characters]
5cxZmvzcIU5/qlhNDFgbPQ78D9QTncE=
         "]], PolygonBox[CompressedData["
1:eJwllndskEUYxr+7w60ouCej7gmixhG3qDGOCILIUCkqSygguxYRSrHIEiht
AQuClVEo1DIKgiMajUSj0YhgsQiCIMO99+/x+eNJnufe977v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CQw+EM8Ym97AtnkD3s5mNYm7AOYa3D
+oW15UPY27CP4ayE/Q9ng/fhbIZzyIpwflnJO5ayjFKWUMZbFrKIeSxgPm+Y
zRxmUsIsXjON6UxmKlPC/jCBiRQznnG8ZAyF5DOaAl6QQy6ZZJMV9p/hjGAI
wxjKMwYxmP4MZEB4Rucg3euaRio1SCGZ6iSF/wASiCfu/6sdhVc8/C/8A13A
b1o=
      "]], LineBox[CompressedData["
1:eJwt0lsr33EAx/EfewL2EHgI8wiMm91ITO5cKIuSXays3Ln7F4asiWjCtKGJ
LKeINefj5mzYGLY5n2dc8FIuXr2/fW5+ffv+ItOeJ2aHBUFQSHx4EERopiHH
+Zp8Yh4EQYHO84W/FPLY/koXGGCHYp7YS3SRQXYpJcH+WpcYYo83pNjLdJlh
9ikn1V6h3xnhgErS7VW6wiiHvCXLXq2rjHFEDS/stbrGOMe8I9derz+Y4IT3
5Nk/6E8mOaWRkL1J15nijI8U2Zt1g2nOabm7m71Vf/GVC9qosn/STb7xj3bq
7B26xQyXdN19296t28zynx5a7b36mzmu6KPT3q9/+EyG90ziKbE8IpIIbrz3
AauM000D5YR4yTOSiSOaKB7e/y+3kxxhyw==
      "]]}}],
  AspectRatio->0.05,
  Axes->{True, False},
  AxesLabel->{
    FormBox["r", TraditionalForm], 
    FormBox["0", TraditionalForm]},
  Epilog->{
    Thickness[Large], 
    RGBColor[1, 0, 0], {
     LineBox[{{1.2, 1}, {1.2, -1}}], 
     LineBox[{{1.84, 1}, {1.84, -1}}]}, 
    Dashing[{0, Small}], {
     LineBox[{{1.9, 1}, {1.9, -1}}]}},
  Method->{"TransparentPolygonMesh" -> True, "AxesInFront" -> True},
  PlotRange->{{1.13, 1.97}, {-1, 1}},
  PlotRangeClipping->True,
  PlotRangePadding->{
    Scaled[0.02], 
    Scaled[0.02]},
  Ticks->{{{1.14, 
      FormBox[
       SubscriptBox["r", "0"], TraditionalForm]}, {1.2, 
      FormBox[
       RowBox[{"\[Delta]", "+", 
         SubscriptBox["r", "0"]}], TraditionalForm]}, {1.84, 
      FormBox[
       RowBox[{
         SubscriptBox["r", "B"], "-", "\[Delta]"}], TraditionalForm]}, {
     1.95, 
      FormBox[
       SubscriptBox["r", "B"], TraditionalForm]}}, {}}]], "Output",
 CellChangeTimes->{
  3.607867749227479*^9, 3.607867786585499*^9, 3.607868587378818*^9, {
   3.607868639064415*^9, 3.607868696806839*^9}, 3.607868746769415*^9, {
   3.607868794963891*^9, 3.6078688389460506`*^9}, 3.608127268025208*^9, 
   3.608127305438632*^9, 3.608127341226541*^9, 3.6081273750819073`*^9, {
   3.60812741126084*^9, 3.608127446917796*^9}, {3.60812748164819*^9, 
   3.608127643565487*^9}}]
}, Open  ]]
},
WindowSize->{740, 623},
WindowMargins->{{Automatic, 13}, {9, Automatic}},
FrontEndVersion->"9.0 for Linux x86 (64-bit) (February 7, 2013)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[579, 22, 6280, 160, 477, "Input"],
Cell[6862, 184, 18254, 320, 42, "Output"]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
