Suppose there is a quadratic equation $$f(y)=y^2-(p+1)y+p^2+p-8=0$$ then find the intervals in which $p$ should belong to fulfill the following conditions
$1.$ both the roots are less than $2$
$2.$ one root is greater than $2$ and the other one is greater than $2$
$3.$ at least one root is less than $2$
$4.$ at least one root is greater than $2$
For the $1$st one $($actually for all conditions to happen$)$, $\Delta\ge0$ $\implies$ $$-3p^2-2p+33\ge0$$ or $$p\in\left[\frac{-11}{3},3\right]$$
Now as both roots are less than $2$, $f(2)>2$ $\implies$ $p>3$ or $p<-2$. By intersecting it with the bound of $p$ obtained from discriminant, we see that $p\in\left[\frac{-11}{3},-2\right)$ but the answer is given $(-3,-2)$ I don't know why$?$
For the $2$nd one, $f(2)<0$ $\implies$ $$p\in(-2,3)$$ but the answer given to this sub part is $p\in(2,3)$ I can't understand why$?$
For the rest two parts, I don't know the approach. Any help is greatly appreicated.
Part 3.
$$y = \frac{1}{2} \left[~(p+1) \pm \sqrt{(p+1)^2 - 4(p^2 + p - 8)} ~\right] \implies $$
$$y = \frac{1}{2} \left[~(p+1) \pm \sqrt{(p^2 + 2p + 1) - 4(p^2 + p - 8)} ~\right] \implies $$
$$y = \frac{1}{2} \left[~(p+1) \pm \sqrt{-3p^2 -2p + 33} ~\right].$$
As the OP (i.e. original poster) has already determined,
$$-3p^2 - 2p + 33 \geq 0 \iff -\frac{11}{3} \leq p \leq 3. \tag1 $$
For part 3, the smaller root must be less than $(2)$.
$$\frac{1}{2} \left[~(p+1) - \sqrt{-3p^2 -2p + 33} ~\right] < 2 \iff $$
$$(p+1) - \sqrt{-3p^2 -2p + 33} < 4 \iff $$
$$ - \sqrt{-3p^2 -2p + 33} < 4 - (p+1) \iff $$
$$ - \sqrt{-3p^2 -2p + 33} < (3 - p). \tag2 $$
Compare (1) and (2) above. If (p = 3), then the LHS of (2) above and the RHS of (2) above both equal $(0)$. Given the bounds on $(p)$, set by (1) above, this is the only way that the inequality in (2) can fail. That is, if $p < 3$, and $p$ is still in the boundary set by (1) above, then the LHS will be non-positive, and the RHS will be positive.
Therefore, the answer to part (3) is
$$ -\frac{11}{3} \leq p < 3.$$
Part 4.
For part 4, the larger root must be greater than $(2)$.
$$\frac{1}{2} \left[~(p+1) + \sqrt{-3p^2 -2p + 33} ~\right] > 2 \iff $$
$$(p+1) + \sqrt{-3p^2 -2p + 33} > 4 \iff $$
$$ + \sqrt{-3p^2 -2p + 33} > 4 - (p+1) \iff $$
$$ + \sqrt{-3p^2 -2p + 33} > (3 - p). \tag3 $$
Here, the analysis is not so simple. For one thing, whatever constraint is implied by (3) above must be melded with the constraint by (1) above. For another, to attack the constraint on (3) above, I have to square both sides. This risks extraneous values. This implies that whatever implied constraint is determined, after squaring both sides, must be manually verified against (3) above.
$$-3p^2 -2p + 33 > 9 - 6p + p^2 \iff $$
$$0 > 4p^2 - 4p - 24 \iff $$
$$0 > p^2 - p - 6 = (p-3)(p+2) \iff -2 < p < 3. \tag4 $$
Since the interval shown in (4) above is a subset of the interval shown in (1) above, the problem reduces to determining which portion of the interval in (4) above actually satisfies the constraint in (3) above.
However, in (3) above, both the LHS and the RHS must be positive, when $-2 < p < 3.$
In Real Analysis, if $0 < r,s$ then
$\displaystyle \sqrt{r} < \sqrt{s} \iff r < s.$
Therefore, the final answer to part (4) is $-2 < p < 3.$