1
$\begingroup$

Given that the solution set of inequation

$$ax ^ 2-bx-1>0$$ is $-1/2<x<-1/3$, I want to calculate the solution set of inequation

$$x ^ 2-bx-a\geq 0.$$

I have used the following code, but is there a faster and better way to solve this problem?

Clear["Global`*"]
sol = First@Solve[{-1/2 - 1/3 == b/a, 1/6 == -1/a}, {a, b}]
(* {a -> -6, b -> 5} *)

Reduce[x^2 - b x - a >= 0, x] /. sol
(* x ∈ Reals && (x <= 2 || x >= 3) *)
$\endgroup$
2
  • $\begingroup$ From where do you obtain {-1/2 - 1/3 == b/a, 1/6 == -1/a}? $\endgroup$
    – user64494
    Commented Aug 15, 2023 at 6:51
  • $\begingroup$ Obviously, these two numbers are the two roots of the equationax ^ 2-bx-1=0 $\endgroup$
    – csn899
    Commented Aug 15, 2023 at 6:59

1 Answer 1

1
$\begingroup$

First, we find the set of a and b for which the solution of a*x ^ 2-b*x-1>0 is x > -1/2 && x < -1/3.

cond = Resolve[ForAll[x, x > -1/2 && x < -1/3, a*x^2 - b*x - 1 > 0] && 
ForAll[x, x >= -1/3, a*x^2 - b*x - 1 <= 0] && 
ForAll[x, x <= -1/2, a*x^2 - b*x - 1 <= 0], Reals]

A long output, its LeafCount equals 5460

Now

Reduce[x^2 - b*x - a >= 0 && cond, x, Reals]

b == 5 && a == -6 && (x <= 2 || x >= 3)

finishes the work.

Edit. ForAll instead of Exists in cond = Resolve[ForAll[x, x > -1/2 && x < -1/3, a*x^2 - b*x - 1 > 0] && Exists[x, x >= -1/3, a*x^2 - b*x - 1 <= 0] && Exists[x, x <= -1/2, a*x^2 - b*x - 1 <= 0], Reals]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.