1

Consider:

Clear[x, y, area];
y[x_] = x^2;
Show[Plot[y[x], {x, 1, 2},
  AxesOrigin -> {0, 0},
  PlotRange -> {{-2, 3}, Automatic},
  AspectRatio -> Automatic,
  AxesLabel -> {"x", "y"},
  Ticks -> {Range[0, 2], Automatic}],
 Plot[y[x], {x, 1.4, 1.6},
  PlotStyle -> {Thickness[.02], Red}],
 Graphics[{
   Dashed, Red,
   Line[{{1, 0}, {1, y[1]}}],
   Line[{{2, 0}, {2, y[2]}}],
   Text[Style[
     "ds = \!\(\*SqrtBox[\(1 + y' \*SuperscriptBox[\((x)\), \(2\)]\)]\
\)dx", Black, Background -> White], {0, y[1.5]}],
   Text[Style[
     "ds = \!\(\*SqrtBox[\(1 + y' \*SuperscriptBox[\((x)\), \(2\)]\)]\
\)dx", Black, Background -> White], {1.5, 3}]
   }]
 ]

Which gives this image:

enter image description here

In once case, the white background blocks out what is behind it, but in the other case (across the y-axis), it doesn't. Any way I can get them to both block out what is behind them?

David
  • 14,883
  • 4
  • 44
  • 117

0 Answers0