Maple solving inequalities within a range

511 Views Asked by At

I have no troubles to solve an inequality using this command:

solve(df(x) > 0, x)

However, I need to solve it within a specified range (-1..1). Is that possible?

1

There are 1 best solutions below

0
On

The solve command can handle multiple inequalities and equations. Write your range as inequality restrictions on your variable. Input either a set {} or a list []. Example:

ineq := cos(x)>1/2;
myrange := x > 2*Pi, x<4*Pi;
solve({ineq,myrange},x);

Output: $$\left\{ x<\frac73\,\pi ,2\,\pi <x \right\}, \left\{ x<4\,\pi ,\frac{11}3\,\pi <x \right\} $$