# Proving simple inequality

I have a simple function and want to make sure that it satisfies an inequality over a certain range of parameters.

My approach is:

In:= a[x] := x^2

In:= Reduce[a[x] > 0 && 1 <= x <= 2]

Out= 1 <= x <= 2


However, I would expect an output of "True", since the inequality is satisfied over the entire range.

What do I need to invoke in order to obtain "True" as a result?

Thanks!

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – user9660 Apr 2 '15 at 8:48
• Reduce solves the system of inequalities and returns the range of x in which the system is true. this code returns True Refine[Reduce[a[x] > 0, x], 1 <= x <= 2] – k_v Apr 2 '15 at 8:57

Reduce is designed to reduce a set of inequalities to obtain the relevant information. In your case.

In:

Reduce[x^2 > 0 && 1 <= x <= 2]


Out:

1 <= x <= 2


tells you that your first inequality x^2>0 was an obsolete infomation, for the set of inequalities. In other words this tells you, that the first equation is allways satisfied if the second equation is satisfied.

So its a problem of interpretation here.

If you want to have an explicit test, that yields True or False, you could simply use this:

satisfiesInequality[ineq_, range_] :=
Reduce[ineq && range] === Reduce[range]


another approach would be to integrate the Boole-Function over the range where you want to test the first inequation.

satisfiesInequality2[
ineq_, {x_, xmin_, xmax_}] := (1 ===
Integrate[Boole[ineq], {x, xmin, xmax}]/(xmax - xmin))


add some SyntaxInformation that helps you using the function correctly:

SyntaxInformation[
satisfiesInequality2] = {"LocalVariables" -> {"Plot", {2,
Infinity}}, "ArgumentsPattern" -> {_, {_, _, _}}};


Show that $x^2 > 0$ for all $1\leq x\leq 2$.
$\forall_{x\in\left[1,2\right]}\;x^2>0$
Turns out Mathematica has a command for that, ForAll:
Reduce[ForAll[x, 1 <= x <= 2, x^2 > 0]]