I have this pretty straight-forward function
GetMinimum[function_, xmin_] := First[FindMinimum[{function, x>xmin}, x]]
that works perfectly within a Mathematica command line session. However after moving that code into a package and calling it like
GetMinimum[x^2, -20]
I get the following output:
{y=x^2, UniversalPlot`Private`x$515 > -20}
where UniversalPlot is the name of the package. I cannot figure out how to make the function work when defining it in the package. Any ideas?
GetMinimum[function_, {x_, xmin_}] := First[FindMinimum[{function, x>xmin}, x]]
? $\endgroup$