Find $ k $ if both roots of this equation $ x^2-2kx+k^2+k-5=0 $ are less than 5 If both roots of this equation $ x^2-2kx+k^2+k-5=0 $ are less than $ 5$, then find the limit of $ k$.
Method-1
Let's say,
\begin{align}  f(x)=x^2-2kx+k^2+k-5  \end{align}
\begin{align} f(0)=0 →\alpha,\beta \end{align}
$ a=1 \gt 0 ,$ So graph is upward. Minimal point $ x_{m} \lt 5$.
Since, the roots$ \alpha,\beta \lt 5, f(5) \gt 0$. And also to have the roots, $ D \geq 0 $ must be followed.
(i)
\begin{align}  x_{m} \lt 5 \end{align}
\begin{align}  \Rightarrow -\frac{(-2k)}{2×1} \lt 5 \end{align}
\begin{align}  \Rightarrow k \lt 5 \end{align}
(ii)
\begin{align} D \geq 0 \end{align}
\begin{align} \Rightarrow (-2k)^2-4(k^2+k-5) \geq 0 \end{align}
\begin{align} \Rightarrow k \leq 5 \end{align}
(iii)
\begin{align} f(5) \gt 0 \end{align}
\begin{align} \Rightarrow 25-9k+k^2-5 \gt 0 \end{align}
\begin{align} \Rightarrow (k-4)(k-5) \gt 0 \end{align}
\begin{align} \Rightarrow k\lt 4,
k \gt 5 \end{align}
Now, from (i),(ii),(iii) we can say, $ k \lt 4 $ .
Method-2
Given that , $ \alpha,\beta \lt 5$
So, \begin{align}  \alpha+\beta \lt 10 \qquad{(1)} \end{align}   \begin{align} \alpha\beta\lt 25 \qquad (2) \end{align}
From, (1)
\begin{align}  2k \lt 10 \end{align}
\begin{align} \Rightarrow k \lt 5\end{align}
From (2)
\begin{align} \Rightarrow k^2+k-5 \lt 25\end{align}
\begin{align} \Rightarrow (k+6)(k-5) \lt 0\end{align}
\begin{align} \Rightarrow -6 \lt
k \lt 5 \end{align}
Now, from (1),(2) also including (ii) we can say, $-6 \lt
 k \lt 5$
Two different answers!


Find $ k $ if both roots of this equation $ x^2-2kx+k^2+k-5=0 $ are less than 5

Alternative approach:
Use the quadratic equation directly, calculate the value of the two roots, in terms of $k$, and then apply the constraint that both roots are less than $5$.
The roots are
$~\displaystyle \frac{1}{2}\left[2k \pm \sqrt{4k^2 - 4(k^2 + k - 5)}\right]$
$= ~\displaystyle k \pm \sqrt{k^2 - (k^2 + k - 5)} = k \pm \sqrt{5-k}.$
At this point, the first observation is that the equation will have one or more real roots if and only if
$$(5 - k) \geq 0. \tag1 $$
The larger root is taken by adding, rather than subtracting the square root, which is always non-negative.
Therefore, the problem reduces to finding all values of $k$ such that
$$k + \sqrt{5 - k} < 5. \tag2 $$
Warning
The following conclusion to this problem is a one-off.  Apparently, the problem composer wanted the Math student to have a fairly easy time of it, from this point forward.  Normally, you would reason that $\displaystyle ~\sqrt{5-k} < 5-k,~$ square both sides, and see where that leads.
For this particular problem, there happens to be a shortcut.  The constraint in (2) above will be satisfied if and only if
$$\sqrt{5-k} < (5-k). \tag3 $$
Here, it helps to know that for any non-negative real number $r$,

*

*if $r = 0$ then $\sqrt{r} = r.$


*if $0 < r < 1$, then $\sqrt{r} > r.$ 
This is a direct consequence of the fact that 
if $0 < r < 1$, then $r = \sqrt{r} \times \sqrt{r} < \sqrt{r} \times 1 = \sqrt{r}.$


*if $r = 1$, then $\sqrt{r} = r.$


*if $r > 1$, then $\sqrt{r} < r.$ 
This is a direct consequence of the fact that 
if $1 < r$, then $r = \sqrt{r} \times \sqrt{r} > \sqrt{r} \times 1 = \sqrt{r}.$
So, under the constraint imposed by (1) above, that $(5 - k) \geq 0$, the constraint in (3) is equivalent to the constraint that $1 < (5 - k).$
Therefore, since the constraint that $(5 - k) \geq 0$ is subordinate to the constraint that $(5 - k) > 1$, all satisfying values of $k$ are given by
$$1 < (5-k) \iff k < 4. $$
