2. Find the value of the expression $\frac{p}{q}+\frac{q}{p}$, where $p$ and $q$ are the largest and smallest roots of the equation $x^{3}-8 x^{2}+8 x=1$, respectively.
# Answer: 47.

Solution. The given equation is equivalent to the following

$$
\left(x^{3}-1\right)-8\left(x^{2}-x\right)=0 \Leftrightarrow(x-1)\left(x^{2}+x+1\right)-8 x(x-1)=0 \Leftrightarrow(x-1)\left(x^{2}-7 x+1\right)=0 \text {, }
$$

from which $x=1$ or $x=\frac{7 \pm \sqrt{45}}{2}$. The largest root is $p=\frac{7+\sqrt{45}}{2}$, and the smallest is $-q=\frac{7-\sqrt{45}}{2}$. Then

$$
\frac{p}{q}+\frac{q}{p}=\frac{7+\sqrt{45}}{7-\sqrt{45}}+\frac{7-\sqrt{45}}{7+\sqrt{45}}=\frac{(7+\sqrt{45})^{2}+(7-\sqrt{45})^{2}}{(7+\sqrt{45})(7-\sqrt{45})}=\frac{2(49+45)}{4}=47
$$