Note that your x
in your plot needs to be different from your x
in your Manipulate slider. So calling the latter xx
instead, here is a possibility for you:
Manipulate[
Plot[{f[x]}, {x, 0, 1},
Epilog -> {Text[f[xx], {xx/2, f[xx]}, {0, -1}],
Arrow[{{xx, f[xx]}, {0, f[xx]}}]}],
{{xx, .5, "X"}, 0, 1, .01},
Initialization :> {f[x_] := .5*2 x^2}
]
Also note that the way you included your definition of f
in your example code is very problematic and leads to a Manipulate
that is in an infinite execution loop. Define f
in an Initialization
option instead as above.