I am trying to determine the regions parameters (a, b) must belong to for a function to be negative for any argument x greater than zero. I have tried using Resolve

 ForAll[x, (a/x^2)*(Log[x - b] + 1) 
             - (a/x)*(1/(x - b)) -
              (1/x^2)*(-b^3 + b) < 0] && x > 0, Reals]

but no expression could be provided. This is not surprising, as I suppose such expression would involve the solution of trascendental equations.

On the other hand, is there a way to get a numerical output from Resolve? For example, a set of (a, b) parameters values on the boundary of the region for which the function is positive?

I thought maybe Nsolve could take an inequality as an expression, but could not find any examples and could not make it work.

A "brute force" alternative I thought about is to create a grid of (a,b) values, and for each couple of values verify if the function is negative along all the positive x-axis (the last step does not seem obvious either). Is there a maybe more clever way, fully exploiting Mathematica's capabilities?

I got intrigued by the answer to this post, Reduce a complex inequality but I could not make it work for my case, for example

ForAll[x, (a/x^2)*(Log[x - b] + 1) - (a/x)*(1/(x - b)) - (1/
   x^2)*(-b^3 + b) < 0], {a, 0.01, 0.5}, {b, 0.001, 

does not seem to be correct syntax.

Thanks a lot


1 Answer 1


The region defined by the inequality is very complicated. It is unlikely that it can be described through any solve process.

cons = Simplify[(a/x^2)*(Log[x - b] + 1) - (a/x)*(1/(x - b)) - (1/x^2)*(-b^3 +
         b) < 0, x > 0 && x > b] && x > 0 && x > b

(* a (-b + x) Log[-b + x] < b (a + (-1 + b^2) (b - x)) && x > 0 && x > b *)

The following plot is very slow

  {x, 0, 20}, {a, -30, 10}, {b, -25, 5},
  AxesLabel ->
   (Style[#, 14, Bold] & /@ {x, a, b}),
  MaxRecursion -> 10,
  PlotPoints -> 200,
  PerformanceGoal -> "Quality"] // Quiet

enter image description here

  • $\begingroup$ thanks a lot very useful. $\endgroup$
    – Smerdjakov
    Commented Jan 10, 2020 at 22:16

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.