I have the following code:
f1[x_] := 1.333 + 28.846/x
f2[x_] := 1.333 + 28.846/(115/Sqrt[3])
f3[x_] := 1.333 + 28.846/(115/Sqrt[3])
plotData = {{53.1, 2.026}, {54.8, 1.679}, {56.4, 1.582}, {58.1,
1.597}, {59.8, 2.013}, {61.4, 1.993}, {63.1, 1.952}, {64.7,
1.867}, {66.4, 1.819}, {68.1, 1.862}, {69.7, 1.733}, {71.4,
1.692}, {73, 1.726}, {74.7, 1.697}, {76.4, 1.654}, {78,
1.672}, {79.7, 1.596}};
plt = Plot[{f1[x], f2[x], f3[x]}, {x, 0, 90},
Epilog -> Map[Point, plotData],
PlotRange -> {{45, 90}, {1, 3}},
PlotStyle -> {Blue, Directive[Black, Dashed],
Directive[Black, Dashed]},
PlotTheme -> "Scientific",
PlotLegends -> {
SwatchLegend[{HatchFilling[Pi/4, 1,
5], {HatchFilling[-Pi/4, 4, 12],
Blue}}, {"\!\(\*SubscriptBox[\(S\), \(neg\)]\)",
"\!\(\*SubscriptBox[\(S\), \(pos\)]\)"},
LegendMarkerSize -> 30]},
ImageSize -> Large,
LabelStyle ->
Directive[Black, FontSize -> 14, FontFamily -> "Times New Roman"],
FrameLabel -> {Style["U", Bold, Black, FontSize -> 14],
Style["K", Bold, Black, FontSize -> 14]},
Filling -> {
{1 -> {{2}, {{HatchFilling[-Pi/4, 4, 12], Blue},
HatchFilling[Pi/4, 1, 5]}}}}];
dataPointCross = {{115/Sqrt[3], f1[115/Sqrt[3]]}};
PointCross = ListPlot[dataPointCross,
PlotStyle -> {Red, PointSize[0.015]}];
Show[{plt, PointCross}]
I wanted to integrate regions Sneg
and Spos
up to the red point (within the limits on the Plot: from 0.8*115/Sqrt[3]
to 1.0*115/Sqrt[3]
and from 1.0*115/Sqrt[3]
to 1.2*115/Sqrt[3]
for Sneg
and Spos
respectively) but couldn't find the way besides through Piecewise
. So I tried to create the closed region:
Plot[Piecewise[{{f1[x], 0.8*115/Sqrt[3] <= x <= 115/Sqrt[3]}, {f2[x],
x <= 115/Sqrt[3]}}, 115/Sqrt[3]], {x, 0.7*115/Sqrt[3],
1.1*115/Sqrt[3]},
PlotRange -> {{0.7*115/Sqrt[3], 1.1*115/Sqrt[3]}, {1, 3}}]
Q1. It seems that I failed doing that. And I even don't understand what's going on - why the region is not closed?
Q2. Probably, it's possible to integrate regions without Piecewise
. Any help is highly valuable.