A polynomial problem related to lx^2 + nx + n If the roots of  $lx^2 + nx + n = 0$ are in the ratio $p:q$, find the value of $\sqrt{\frac{p}{q}}$ + $\sqrt{\frac{q}{p}}$ + $\sqrt{\frac{n}{l}}$.
How to go about this problem?
 A: Notice, 
let $kp$ & $kq$ be the roots of $lx^2+nx+n=0$ hence satisfying the equation we get $$lp^2k^2+npk+n=0\tag 1$$
$$lq^2k^2+nqk+n=0\tag 2$$
solving (1) & (2) for $k$, as follows $$\frac{k^2}{n^2p-n^2q}=\frac{k}{nlq^2-nlp^2}=\frac{1}{nlp^2q-nlpq^2}$$
$$\implies k^2=\frac{n^2p-n^2q}{nlp^2q-nlpq^2}=\frac{n^2(p-q)}{nlpq(p-q)}=\frac{n}{lpq}\tag 3$$
$$\implies k=\frac{nlq^2-nlp^2}{nlp^2q-nlpq^2}=\frac{nl(q+p)(q-p)}{nlpq(p-q)}=\frac{-(p+q)}{pq}\tag 4$$ from (3) & (4), we get 
$$\left(\frac{-(p+q)}{pq}\right)^2=\frac{n}{lpq}$$
$$\frac{p^2+q^2+2pq}{pq}=\frac{n}{l}$$
$$\frac{p}{q}+\frac{q}{p}+2=\frac{n}{l}$$
$$\left(\sqrt{\frac{p}{q}}\right)^2+\left(\sqrt{\frac{q}{p}}\right)^2+2\left(\sqrt{\frac{p}{q}}\right)\left(\sqrt{\frac{q}{p}}\right)=\frac{n}{l}$$
$$\left(\sqrt{\frac{p}{q}}+\sqrt{\frac{q}{p}}\right)^2=\frac{n}{l}$$
$$\sqrt{\frac{p}{q}}+\sqrt{\frac{q}{p}}=\pm\sqrt{\frac{n}{l}}$$
taking negative sign, we get 
$$\sqrt{\frac{p}{q}}+\sqrt{\frac{q}{p}}=-\sqrt{\frac{n}{l}}$$
$$\color{blue}{\sqrt{\frac{p}{q}}+\sqrt{\frac{q}{p}}+\sqrt{\frac{n}{l}}}=\color{red}{0}$$
A: Let $x_1$ and $x_2$ be the roots. we know that $x_1x_2=\frac n l$ or that $x_1=\frac{1}{x_2} \frac nl$. Since we have to calculate $\sqrt{\frac n l}$ then $n$ and $l$ should have the same sign. Let them both be positive. 
Now if $\frac{x_1}{x_2}=\frac pq$ then we have that $\frac p q=\frac 1 {x^2} \frac n l$ therefore
\begin{align}
\sqrt{\frac{p}{q}} + \sqrt{\frac{q}{p}} + \sqrt{\frac{n}{l}}&=\sqrt{\frac 1 {x_2^2} \frac n l} + \sqrt{x_2^2 \frac l n} + \sqrt{\frac{n}{l}}\\
&=\sqrt{\frac{n}{l}}\Big(\sqrt{\frac 1 {x_2^2} } + \frac l n\sqrt{x_2^2 } +1\Big)\\
\end{align}
now we should argue about the sign of $x_2$. If the roots are real and $n$ and $l$ are of the same sign, then both roots should either be negative of positive. Since we assumed that $n>0$, both roots will be negative. Hence
\begin{align}
\sqrt{\frac 1 {x_2^2} } + \frac l n\sqrt{x_2^2 }&=-\frac 1 {x_2}  -\frac 1 {x_1}\\
&=1
\end{align}
you could check for yourself what happens if both $n$ and $l$ are negative :-)
