8
$\begingroup$

I have been trying to fill the area between the three curves on the graph below (area between the points a, b, and c), but have had no successful result so far. I kept a simple filling command to ask how I can manipulate it in a way that I can fill the area between these points. Any help would be greatly appreciated. Here is my command:

Plot[{31.25/x, 11.1803 - x, Sqrt[100 - x^2]/2, Sqrt[100 - 4 x^2]}, {x, 0, 12}, PlotRange -> {0, 12}, Filling -> {2 -> {{3}, {None, Gray}}}, Epilog -> {Text[Style[TraditionalForm[a], Black, FontSize -> 12], {2.23607, 8.94}], Text[Style[TraditionalForm[b], Black, FontSize -> 12], {4.45, 4.45}],Text[Style[TraditionalForm[c], Black, FontSize -> 12], {8.94, 2.23607}]}]
$\endgroup$

2 Answers 2

6
$\begingroup$

Construct a function for the lower boundary and fill to it:

Plot[{
  (****)
  ConditionalExpression[
   Max[Sqrt[Clip[100 - x^2, {0., Infinity}]]/2, 
    Sqrt[Clip[100 - 4 x^2, {0., Infinity}]]], 2.23607 < x < 8.94],
  (*****)
  31.25/x, 11.1803 - x, Sqrt[100 - x^2]/2, Sqrt[100 - 4 x^2]},
 {x, 0, 12},
 PlotStyle -> (* don't draw Max[] *)
  Prepend[ColorData[97, "ColorList"], None],
 PlotRange -> {0, 12}, Filling -> {3 -> {{1}, {None, Gray}}}, 
 Exclusions -> None, (* needed to fill gap in Max[] *)
 Epilog -> {Text[
    Style[TraditionalForm[a], Black, FontSize -> 12], {2.23607, 8.94}], 
   Text[Style[TraditionalForm[b], Black, FontSize -> 12], {4.45, 4.45}], 
   Text[Style[TraditionalForm[c], Black, FontSize -> 12], {8.94, 2.23607}]}]
$\endgroup$
0
5
$\begingroup$

We should calculate the tangent point x1,x2 by the equation

 Solve[
   D[g[x2], x2] == D[f[x1], x1] == (g[x2] - f[x1])/(x2 - x1) && 
    0 < {x1, x2} < 12, Reals]

and we get $x_1=\sqrt{5},x_2=4\sqrt{5}$ so the two tangent points should be $\left\{\sqrt{5},4 \sqrt{5}\right\}$, $\left\{4 \sqrt{5},\sqrt{5}\right\}$ and the tangent line should be $x+y=5\sqrt{5}$

Here we also use the implicit form of two elliptical disks : x^2 + 4 y^2 <= 100 && 4 x^2 + y^2 <= 100

f[x_] = Sqrt[100 - 4 x^2];
g[x_] = Sqrt[100 - x^2]/2;
sol = Solve[
   D[g[x2], x2] == D[f[x1], x1] == (g[x2] - f[x1])/(x2 - x1) && 
    0 < {x1, x2} < 12, Reals];
(*x1=Sqrt[5],x2=4 Sqrt[5]*)
h[x_] = g[x2] + (g[x2] - f[x1])/(x2 - x1) (x - x2) /. 
  sol[[1]];(*y=5 Sqrt[5]-x*)
k[x_] = ((x + h[x])/2)^2/x;(*125/(4 x)*)
reg = 
 RegionPlot[
  x^2 + 4 y^2 >= 100 && 4 x^2 + y^2 >= 100 && y <= h[x], {x, x1, x2} /. 
   sol[[1]], {y, 0, 15}, PlotPoints -> 80, BoundaryStyle -> Cyan, 
  PlotStyle -> Gray];
Show[Plot[{f[x], g[x], h[x], k[x]}, {x, 0, 12}, 
  AspectRatio -> Automatic], reg]

enter image description here

$\endgroup$
1
  • $\begingroup$ Very useful and smart; thank you so much! I have added the numerical values of the tangent points in my code. I just wanted to see if this filling could be handled by the filling command! $\endgroup$
    – Ilker A
    Commented Jul 14, 2021 at 14:25

Your Answer

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

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