4

Consider:

Manipulate[
 Plot[4 x^3 - x^5, {x, -2, 2},
  PlotRange -> {{-3, 3}, Automatic},
  AxesLabel -> {"x", "y"},
  Ticks -> {{{a, "x"}, {-a, "-x"}}, {{4 a^3 - a^5, 
      "f(x)"}, {-4 a^3 + a^5, "f(-x)"}}},
  PlotLabel -> 
   "Graph of f(x) = 4\!\(\*SuperscriptBox[\(x\), \(3\)]\)- \
\!\(\*SuperscriptBox[\(x\), \(5\)]\)",
  Epilog -> {
    Red, PointSize[Large],
    Point[{{a, 4 a^3 - a^5}, {0, 0}, {-a, -4 a^3 + a^5}}],
    Red, Dashed,
    Line[{{a, 4 a^3 - a^5}, {-a, -4 a^3 + a^5}}],
    Blue,
    Line[{{a, 0}, {a, 4 a^3 - a^5}, {0, 4 a^3 - a^5}}],
    Line[{{-a, 0}, {-a, -4 a^3 + a^5}, {0, -4 a^3 + a^5}}]
    }], {{a, 1}, -2, 2}]

Which produces this image.

enter image description here

Is it possible to place the tick marks -x and f(-x) on the other side of their axes?

Update: Some final adjustments due to tsuresuregusa. I really appreciate the help of my colleagues on Mathematica Stack Exchange.

Manipulate[
 Plot[4 x^3 - x^5, {x, -2, 2}, PlotRange -> {{-3, 3}, Automatic}, 
  AxesLabel -> {"x", "y"}, Ticks -> False, 
  PlotLabel -> 
   "Graph of f(x) = 4\!\(\*SuperscriptBox[\(x\), \(3\)]\)- \
\!\(\*SuperscriptBox[\(x\), \(5\)]\)",
  Epilog -> {
    Text["f(x)", {-.2 Sign[a], 4 a^3 - a^5}], 
    Text["x", {a, -.3 Sign[a]}], 
    Text["f(-x)", {.3 Sign[a], -4 a^3 + a^5}], 
    Text["-x", {-a, .4 Sign[a]}], Red, PointSize[Large], 
    Point[{{a, 4 a^3 - a^5}, {0, 0}, {-a, -4 a^3 + a^5}}], Red, 
    Dashed, Line[{{a, 4 a^3 - a^5}, {-a, -4 a^3 + a^5}}], Blue, 
    Line[{{a, 0}, {a, 4 a^3 - a^5}, {0, 4 a^3 - a^5}}], 
    Line[{{-a, 0}, {-a, -4 a^3 + a^5}, {0, -4 a^3 + a^5}}]}], {{a, 1},
   0.6, 2}]
David
  • 14,883
  • 4
  • 44
  • 117

1 Answers1

7

I meant this in my comment

Manipulate[
 Plot[4 x^3 - x^5, {x, -2, 2}, PlotRange -> {{-3, 3}, Automatic}, 
  AxesLabel -> {"x", "y"}, Ticks -> False, 
  PlotLabel -> 
   "Graph of f(x) = 4\!\(\*SuperscriptBox[\(x\), \(3\)]\)- \
\!\(\*SuperscriptBox[\(x\), \(5\)]\)", 
  Epilog -> {Text["f(-x)", {-.2 Sign[a], 4 a^3 - a^5}], 
    Text["-x", {a, -.3 Sign[a]}], 
    Text["f(x)", {.2 Sign[a], -4 a^3 + a^5}], 
    Text["x", {-a, .3 Sign[a]}], Red, PointSize[Large], 
    Point[{{a, 4 a^3 - a^5}, {0, 0}, {-a, -4 a^3 + a^5}}], Red, 
    Dashed, Line[{{a, 4 a^3 - a^5}, {-a, -4 a^3 + a^5}}], Blue, 
    Line[{{a, 0}, {a, 4 a^3 - a^5}, {0, 4 a^3 - a^5}}], 
    Line[{{-a, 0}, {-a, -4 a^3 + a^5}, {0, -4 a^3 + a^5}}]}], {{a, 
   1}, -2, 2}]

enter image description here

tsuresuregusa
  • 2,661
  • 2
  • 13
  • 31