Finding unique number and value of p. Function = f(x) = $\frac{x^2+px+1}{x^2+x+1}.$
Q 1For any value of p , a unique number will be there in the range . Find it.
Q 2 If nine integers are in the range of f(x) , then solve for p.
Q3If  range of function is non negative , then find maximum no of integers in the range can be .
For the 1st one , i thought unique number as  neither a prime number nor a composite number. It has only one factor, i.e, the number itself. Is it correct ?
For the 2nd , I am not getting
For 3rd , no of integers will change as value of p will change . Then how to find the amswer
 A: Question 1
let $x=0$. No matter what the value of $p$ is, this value will be in common with all possible functions.
Question 2
Question 2 is asking the following:

If we have the function $f(x)=\frac{x^2+px+1}{x^2+x+1}$ and we look at range of $f(x)$, for some value of $p$ the range of $f(x)$ includes exactly $9$ integers. Find this value of $p$.

For question 2, note that
$$\frac{x^2+px+1}{x^2+x+1}=\frac{x^2+x+1-x+px}{x^2+x+1}=1+\frac{x(p-1)}{x^2+x+1}$$
I will assume that you want an integer value for $p$ (unless you want an inequality; if you do please specify), and that you mean exactly $9$ integers are in the range of $f(x)$.
If you actually look at this graph for different values of $p$ it is clear that the function always has a clear maximum and minimum point. We can find the coordinates of these stationary points by differentiating with respect to $x$:
$$\frac{d}{dx}\left(1+\frac{x(p-1)}{x^2+x+1}\right)=\frac{(p-1)(1-x^2)}{(x^2+x+1)^2}$$
after some rearranging and using the quotient rule. Now let this derivative be equal to $0$ for the stationary points.
$$\frac{(p-1)(1-x^2)}{(x^2+x+1)^2}=0\implies 1-x^2=0\implies x+\pm1$$
Hence the stationary points have coordinates $(1,f(1))$ and $(-1,f(-1))$ which comes to the coordinates $(-1,1-(p-1))$ and $(1,1+\frac{p-1}{3})$ which simplifies to
$$(-1,~2-p)~~\text{and}~~(1,\frac{p+2}{3})$$
If the range only includes exactly $9$ integers, then let the difference between the maximum point and minimum point of the function be $8$, as this is the smallest possible amount that could include $9$ integers. Hence
$$\frac{p+2}{3}-(2-p)=8\implies p+2-6+3p=24\implies 4p=28$$
so $p=7$. Check this indeed includes $9$ integers by finding the $y$-values of the coordinates of the stationary points for this value of $p$, and we are done.
Question 3
Let $f(x)>0$:
$$\frac{x^2+px+1}{x^2+x+1}>0$$
Note that $x^2+x+1>0$ for all real  $x$, so we can multiply through by $x^2+x+1$:
$$x^2+px+1>0$$
But $x^2+px+1=(x+\frac{p}{2})^2+1-\frac{p^2}{4}$. So if $f(x)>0$ for all values of $x$ then $\frac{p^2}{4}<1$
$$\implies (p+2)(p-2)<0$$
Hence $-2<p<2$.
Now plug in $p=2$ and $p=-2$ respectively into your general coordinates for the stationary points and see how many integers it includes.
A: Hint:
The function can be written
$$\frac{x^2+px+1}{x^2+x+1}=1+(p-1)\frac1{x+1+\dfrac1x}.$$
It is an easy matter to establish the range of $x+\dfrac1x$, which is $(-\infty,-2]\cup[2,\infty)$. From this, the range of the function is
$$1+(p-1)\left[-1,\frac13\right].$$
(For $p<1$, the bounds of the interval need to be swapped.)


*

*$1$ is always in the range.


*the reduced range has length $\dfrac43$. To cover $9$ integers, you need to multiply by at least $6$ ($p=7$). The integers will be $-5$ to $3$.


*for $p\ge1$, the range is $\left[2-p,\dfrac{3p+2}3\right]$ and for $p=2$, it contains $0,1,2$.
For $p<1$, the range is $\left[\dfrac{3p+2}3,2-p\right]$ and the smallest $p$ is $-\dfrac23$, giving $0,1,2$ as well.
