I want to use Reduce to my own function, but it generates the error message: This system cannot be solved with the methods available to Reduce. Here is a simplified example.
test[x_] := x^2 - 3 /; 0<x<10;
test[x_] := -1 /; 10<x
Reduce[test[x]<1, 0<x<5]
I think /;
makes the problem. However, how can I define the domain of my own function without using /;
?
Piecewise
lets you define such functions. Also it probably should beReduce[test[x] && 0<x<5, x]
. $\endgroup$/;
is a programming construct. It is not meant to represent mathematical ideas. It is meant to implement algorithms. $\endgroup$Boole
had been incorporated into many functions in Mathematica.test[x_]:=((x^2-3)*Boole[0<x<10])+(-1*Boole[10<x]); Reduce[test[x]<1&&0<x<5,x]
$\endgroup$