The question is
Find all integers $n$ $(n>0)$ such that the which quadratic equation $$a_{n+1}x^2-2x\sqrt{\sum_{k=1}^{n+1}a_k^2}+\sum_{k=1}^na_k=0$$ has real roots for every choice of real numbers $a_1,a_2,...,a_{n+1}$
This question has been taken from an olympiad preparatory book.Anything i could figure out was that for $n=4$ the above things holds true but I can neither prove this is the maximum value nor find any other way to get a value above than this. I also tried using Cuachy-schwarz but failed to deduce anything. Any solutions , help or hint would be really appreciated . Thanks
Hint: The equation has real roots if and only if the discriminant is non-negative. This means
$$ \sum_{k=1}^{n+1} a_k^2 \geq a_{n+1} \sum_{k=1}^n a_k. $$
Hint: Since this has to hold true for every choice of real numbers, if we view this as a quadratic in $a_{n+1}$, what conclusion can we draw about the discriminant?
Hence, by Cauchy Schwards, we must have $n \leq 4$.
Ideally, for $n \geq 5$, you should provide an explicit counter example. (This is left as an exercise to the reader).