================================
Manipulate[
Solutionab = x /. NSolve[f[x] == \[Alpha], x];
a1 = If[\[Alpha] < 50, Solutionab[[2]], Solutionab[[1]]];
b1 = If[\[Alpha] < 50, Solutionab[[3]], Solutionab[[2]]];
(*{a1,b1}=Select[Solutionab,-7\[LessEqual]#\[LessEqual]4&];*)
Solutionc1 =
y /. N[Solve[f[y] == Integrate[f[x], {x, a1, y}]/(y - a1), y]];
c1 = Select[Solutionc1, a1 + .1 < Re[#] < b1 &][[1]];
Solutionc2 =
y /. N[Solve[f[y] == Integrate[f[x], {x, y, b1}]/(b1 - y), y]];
c2 = Select[Solutionc2, a1 < Re[#] < b1 - .1 &][[1]];
(*{c}=Select[Solutionc,-7\[LessEqual]#\[LessEqual]4&& (#-a1)f[a1]\
\[Equal]Integrate[f[x],{x,a1,#}]&];*)
Grid[{
{Plot[{f[x], \[Alpha]} , {x, -7.5, 4.5}, Filling -> {1 -> Axis},
FillingStyle -> Directive[Opacity[0], Red],
AxesOrigin -> {0, 0}, PlotRange -> {{-7.5, 4.2}, {-15, 110}},
PlotStyle -> {{Thickness[.004], Blue}, {Thickness[.003], Dashed,
Red}},
Prolog -> {Text[Style["a", Medium, Italic, Blue], {a1, -10}],
Text[Style["b", Medium, Italic, Blue], {b1, -10}],
Text[Style["c", Medium, Italic, Blue], {c1, -10}],
{Gray, Dashed, Thickness[0.001], Line[{{a1, 0}, {a1, f[a1]}}]},
Text[
Style[Row[{Style["y", Italic], " = \[Alpha]"}], Medium,
Black], {3, \[Alpha] + 5}],
{Gray, Dashed, Thickness[0.001], Line[{{b1, 0}, {b1, f[b1]}}]},
{Blue, Opacity[.4], Rectangle[{a1, 0}, {c1, f[c1]}]},
{Yellow, Opacity[.5], Thickness[0.01],
Table[Line[{{a1 + h, 0}, {a1 + h, f[a1 + h]}}], {h, .1,
c1 - a1, .1}]},
{Gray, Dashed, Thickness[0.001], Line[{{c1, 0}, {c1, f[c1]}}]}},
Epilog -> {}, ImageSize -> {295, 200}],
Plot[{f[x], \[Alpha]} , {x, -7.5, 4.5}, Filling -> {1 -> Axis},
FillingStyle -> Directive[Opacity[0], Red],
AxesOrigin -> {0, 0}, PlotRange -> {{-7.5, 4.2}, {-15, 110}},
PlotStyle -> {{Thickness[.004], Blue}, {Thickness[.003], Dashed,
Red}},
Prolog -> {Text[Style["a", Medium, Italic, Blue], {a1, -10}],
Text[Style["b", Medium, Italic, Blue], {b1, -10}],
Text[Style["d", Medium, Italic, Blue], {c2, -10}],
{Gray, Dashed, Thickness[0.001], Line[{{a1, 0}, {a1, f[a1]}}]},
Text[
Style[Row[{Style["y", Italic], " = \[Alpha]"}], Medium,
Black], {3, \[Alpha] + 5}],
{Gray, Dashed, Thickness[0.001], Line[{{b1, 0}, {b1, f[b1]}}]},
{Blue, Opacity[.4], Rectangle[{c2, 0}, {b1, f[c2]}]}, {Yellow,
Opacity[.5], Thickness[0.01],
Table[Line[{{c2 + h, 0}, {c2 + h, f[c2 + h]}}], {h, 0,
b1 - c2, .1}]},
{Gray, Dashed, Thickness[0.001], Line[{{c1, 0}, {c1, f[c1]}}]}},
Epilog -> {}, ImageSize -> {295, 200}]},
{Text[Style["blue area = yellow area", 15, Blue]],
Text[Style["blue area = yellow area", 15, Blue]]
}}],
{{\[Alpha], 70, "\[Alpha]"}, 10, 100, Appearance -> "Labeled"},
SaveDefinitions -> True,
TrackedSymbols -> {\[Alpha]}
]
|