I have a short package like this:
BeginPackage["FunctionAnalysis`",{"Global`"}];
MonoIntervals::usage="returns monotonic intervals of given function";
Begin["`Private`"];
FunctionAnalysis`Private`MonoIntervals[func_[arg_],var_]:={Reduce[D[func[arg],var]>0,var]}
End[];
EndPackage[];
I include it, and when I call, for example:
MonoIntervals[Sin[x],x]
it executes MonoIntervals
.
The problems occurs when I try to call MonoIntervals
with functions like:
f[x_]:=x^2+2*x-10
MonoIntervals[f[x],x]
this results in
Out[25]=MonoIntervals[-10 + 2 x + x^2, x]
Why doesn't the function execute?