# Find the value of $a$ for which $f(x)\lt3\;\;\forall x\in\Bbb{R^+}$ and $f(x)\gt3$ for at least one $x\in\Bbb{R}^-$

Problem Statement:-

If $f(x)=\left|\dfrac{x^2+ax+1}{x^2+x+1}\right|$, then find the values of $a$ for which $\forall x\in\Bbb{R^+}, \;f(x)\lt3,\;$ and $f(x)\gt3$ for at least one negative real $x$.

Attempt at a solution:-

As $x^2+x+1\gt0$, $\forall x\in\Bbb{R}$ hence $$f(x)=\dfrac{\left|x^2+ax+1\right|}{x^2+x+1}$$

Now, consider the following cases:-

Case 1:- If $\qquad x^2+ax+1\gt 0$, then $$f(x)=\dfrac{x^2+ax+1}{x^2+x+1}$$

Let $g(x)=2x^2+(3-a)x+2$

For $x^2+ax+1\gt 0$ consider the following subcases:-

Sub Case-1:- $D(x^2+ax+1)\lt0$ which implies that the $\forall x\in\Bbb{R}.\;\;(x^2+ax+1\gt0)$.

So, from the conditions that the question wants to be satisfied, i.e. $\forall x\in\Bbb{R^+}.\;(f(x)\lt3)\;$ and $\exists x\lt0.\;(f(x)\gt3)$, we get

$$\forall x\gt0.\;(g(x)=2x^2+(3-a)x+2\gt0)\\ \exists x\lt0. \;(g(x)=2x^2+(3-a)x+2\lt0)$$

As the situation is same as that in the second sub case, lets save some work here we get $$a\lt3\\ a\in(-\infty,-1)\cup(7,\infty)$$

So, combining all the inequalities in this sub case we get, $$\boxed{a\in(-2,-1)}$$

Sub Case-2:- Discriminant of $x^2+ax+1$ is greater than $0$. So, $|a|\gt2$ and $$x\in\left(-\infty,\dfrac{-a-\sqrt{a^2-4}}{2}\right)\cup\left(\dfrac{-a+\sqrt{a^2-4}}{2},\infty\right)$$

So, $$f(x)=\dfrac{x^2+ax+1}{x^2+x+1}$$

So, as the question asks for $\forall x\gt0.\; (f(x)\gt3)$, which on simplifying gives $$g(x)=2x^2+(3-a)x+2\gt0$$

We see that $g(0)\gt 0$, so either both roots are either positive or negative. As the question also demands for the condition $\exists x\lt0.\; (f(x)\lt3)$, so the both roots of $g(x)$ need to be negative.

So, $g^\prime(0)\gt 0\implies 3-a\gt0 \implies a\lt3$

Also, $D(g(x))\gt0\implies (a+1)(a-7)\gt0\implies a\in(-\infty,-1)\cup(7,\infty)$

And since $|a|\lt2$, the common interval for all the inequalities comes out to be $\boxed{a\in(-\infty, -2)}$

To conclude this case we get that $\boxed{a\in(-\infty,-2)\cup(-2,-1)}$

Case-2:- If $x^2+ax+1\lt0$, then

$$f(x)=-\dfrac{x^2+ax+1}{x^2+x+1}$$

Also, $D(x^2+ax+1)\gt0\implies a^2-4\gt0\implies |a|\gt2\implies a\in(-\infty,-2)\cup(2,\infty)$

Also, the bounds of $x$ in which the given inequalities are to be examined is $$x\in\left(\dfrac{-a-\sqrt{a^2-4}}{2},\dfrac{-a+\sqrt{a^2-4}}{2}\right)$$

Let $h(x)=4x^2+(3+a)x+4$ (assumed it here itself to reduce the mess while solving the inequality in this case).

So, from $\forall x\gt0.\;(f(x)\lt3)$ and $\exists x\lt0.\;(f(x)\gt3)$, we get $$\forall x\gt0.\;(h(x)=4x^2+(3+a)x+4\gt0)\\ \exists x\lt0.\;(h(x)\lt0)$$

As, we can see that $h(0)\gt0$, so same as the last case we conclude that either both the roots are either negative or are either positive. But as $\forall x\gt0.\; (h(x)\gt0)$, so $h^\prime(0)\gt0\implies a\gt-3$.

Lastly as the roots need to be real, so $$D(h(x))\gt0\implies (a-5)(a+11)\gt0\implies a\in(-\infty, -11)\cup(5,\infty)$$

From all the inequalities in this case we get

$$\boxed{a\in(5,\infty)}$$

My deal with the question:-

I am having trouble examining the bounds in which $a$ should be so that interval in which $x$ can be taken also is included in the bounds of $a$. To be more clear how do I incorporate the bounds in which the $x$ has been defined for $x^2+ax+1\lessgtr0$ depending upon the case being considered.

• I don't understand what you wrote in subcase 1 in case 1. Take $a=-3/2,x=-1$. Nov 26, 2016 at 16:45
• @mathlove- After looking at what you pointed out, I don't understand myself what am I trying to say there. Would have to edit it. Nov 26, 2016 at 16:50
• @mathlove-whew! edited it. Nov 26, 2016 at 17:57
• In subcase 2 in case 1, I don't think you are using the condition that $x^2+ax+1\gt 0$. Nov 27, 2016 at 5:58
• @mathlove-please do post your answer its always a pleasure to go through the solutions you provide....but still if you could then also can you outline the process which concerns the last section of my post, i.e. how to incorporate the range of $x$ in which it can be considered, because I ahve attempted another question in a similar manner but both of these have got me stuck for two days worth of time. Nov 27, 2016 at 6:04

For $x\gt 0$, \begin{align}f(x)\lt 3&\iff \left|\frac{x^2+ax+1}{x^2+x+1}\right|\lt 3\\\\&\iff \left|1+\frac{(a-1)x}{x^2+x+1}\right|\lt 3\\\\&\iff -3\lt 1+\frac{(a-1)x}{x^2+x+1}\lt 3\\\\&\iff -4(x^2+x+1)\lt (a-1)x\lt 2(x^2+x+1)\\\\&\iff \frac{-4(x^2+x+1)}{x}\lt a-1\lt \frac{2(x^2+x+1)}{x}\\\\&\iff \frac{-4x^2-3x-4}{x}\lt a\lt\frac{2x^2+3x+2}{x}\tag1\end{align} Since we want to find $a$ such that $(1)$ holds for every $x\gt 0$, considering the graphs gives $a\in(-11,7)$.
For $x\lt 0$, \begin{align}f(x)\gt 3&\iff \left|\frac{x^2+ax+1}{x^2+x+1}\right|\gt 3\\\\&\iff \left|1+\frac{(a-1)x}{x^2+x+1}\right|\gt 3\\\\&\iff 1+\frac{(a-1)x}{x^2+x+1}\lt -3\quad\text{or}\quad 1+\frac{(a-1)x}{x^2+x+1}\gt 3\\\\&\iff (a-1)x\lt -4(x^2+x+1)\quad\text{or}\quad (a-1)x\gt 2(x^2+x+1)\\\\&\iff a-1\gt\frac{-4(x^2+x+1)}{x}\quad\text{or}\quad a-1\lt\frac{2(x^2+x+1)}{x}\\\\&\iff a\gt\frac{-4x^2-3x-4}{x}\quad\text{or}\quad a\lt \frac{2x^2+3x+2}{x}\tag2\end{align}
Since we want to find $a$ such that there exists at least one $x\lt 0$ satisfying $(2)$, considering the graphs gives $a\in(-\infty,-1)\cup (5,\infty)$.
Therefore, the answer is $$\color{red}{a\in(-11,-1)\cup (5,7)}$$
• "Considering the graphs" that seems like cheating to me. What if you are in an examination hall, there you wont be able to have a graph. A better way in my opinion would be using $AM\ge GM$ that seems much better to me. What say you? Nov 27, 2016 at 6:32