I'm working on my project for class and it's supposed to be a graph that can take functions from the user and display it along with finding the max and min of the graph. But I just don't know how to incorporate the Max and Min part in the code for the graph. Does anyone have any suggestions?
So far I have:
Panel[DynamicModule[{f = x^2 + 3},
Column[{InputField[Dynamic[f]], Dynamic[Plot[f, {x, -10, 10}]]}]]]
for the interactive graph, but i don't know what to do next.
Epilog
, like this:Dynamic[Plot[f, {x, -10, 10}, Epilog -> {Red, PointSize[Large], Point[{With[{minx = First[x /. Solve[D[f, x] == 0]]}, {minx, f /. x -> minx}]}]}]]
. $\endgroup$ – Verbeia Dec 17 '14 at 3:01DynamicModule
could be a compound expression with components separated by semicolons. So you could end the compound expression with yourColumn
expression and begin it with as many expressions as you need to find the min and max. $\endgroup$ – murray Dec 17 '14 at 4:15