# How can I find values of m so that the function $\frac{-m+x^2+x-4}{4 x-m}$ increasing in the interval $(1,2)$?

I am trying to find value of marameters $$m$$ so that the function $$f(x) = \dfrac{-m+x^2+x-4}{4 x-m}$$ increasing in the interval $$(1,2)$$?

I tried

Clear["Global*"];
f[x_] = (-4 - m + x + x^2)/(-m + 4 x);
Simplify[f'[x]]
g[x_] = Expand[Numerator[Simplify[f'[x]]]]


I know that, the function $$f(x) = \dfrac{-m+x^2+x-4}{4 x-m}$$ increasing in the interval $$(1,2)$$ when and only when $$g(x) = 16 + 3 m - 2 m x + 4 x^2 \geqslant 0$$ for all $$x$$ in $$(1,2)$$ and $$m/4 \notin (1,2)$$. How can I get the values of $$m$$?

This can be done, making use of the definition of an increasing function and quantifiers or/and FunctionMonotonicity.

f[x_] = (-4 - m + x + x^2)/(-m + 4  x);
Resolve[ForAll[{x1, x2}, x1 > 1 && x1 < 2 && x2 > 1 && x2 < 2,
Implies[x2 > x1, f[x2] > f[x1]]], Reals]


-20 <= m <= 4 || 8 <= m <= 32

FunctionMonotonicity[{(-4 - m + x + x^2)/(-m + 4  x),
x > 1 && x < 2}, x] // FullSimplify


ConditionalExpression[1, m \[Element] Reals && (-20 <= m < 4 || 8 < m <= 32)]

• There is a deficiency in the result of FunctionMonotonicity, It should be -20 <= m <= 4 || 8 <= m <= 32 there. Commented Mar 28 at 17:48

A partial answer following your idea of studying $$f^\prime(x)>0$$.

f[x_] = (-4 - m + x + x^2)/(-m + 4 x);
g[x_] := Derivative[1][f][x];
Reduce[{g[x] > 0, 1 <= x <= 2}, {m, x}]


It produces four results, only two valid for any $$1\leq x \leq 2$$, which are:

(-20 < m < 4 && 1 <= x <= 2) ||(8 < m < 32 && 1 <= x <= 2)


However, I don't know how to eliminate the two unwanted solutions...

• f[x_] = (-4 - m + x + x^2)/(-m + 4 x);Reduce[ForAll[x, x > 1 && x < 2, Derivative[1][f][x] >= 0], m] does the job. Commented Mar 28 at 19:50

Simple direct solution:

Resolve @ ForAll[x, 1 <= x <= 2, D[(x + x^2 - 4 - m)/(4x - m), x] > 0]

• You replace Reduce by Resolve in the code from my comment to the mattiav27's answer. The documentation to Resolve (see Details and Options ) writes "Resolve is in effect automatically applied by Reduce". Commented Apr 30 at 16:48
• @user64494 But the final result of Resolve is always simple then the result of Reduce. Commented Apr 30 at 20:52
• @TheDoctor: Your words do not correspond to reality: the results of Resolve @ ForAll[x, 1 <= x <= 2, D[(x + x^2 - 4 - m)/(4x - m), x] > 0] and f[x_] = (-4 - m + x + x^2)/(-m + 4 x);Reduce[ForAll[x, x > 1 && x < 2, Derivative[1][f][x] >= 0], m] are identical. Commented May 1 at 6:33
• @user64494: [1] I used Resolve instead of Reduce because it directly eliminates ForAll and Exists quantifiers. This may be more efficient than calling Reduce just as calling Expand is likely to be better than FullSimplify for certain expressions. [2] I find 1 < x < 2 clearer than x > 1 && x < 2. [3] No need to define f[x_]. [4] I did not say that the result of Resolve is simpler than Reduce` Commented May 21 at 8:51