2. Let $a=p^{2}+p+1, b=p^{2}+2 p$ and $c=2 p+1(p>0)$ be the lengths of the sides of a triangle. Calculate the largest angle of this triangle.
Solution. First we have

$$
a=(p+1)^{2}-p, \quad b=(p+1)^{2}-1, \quad c=2 p+1
$$

then

- if $0<p<1$, then $b<c<a$,
- if $p>1$, then $c<a<b$.

Thus, $a$ is the middle-sized side of the triangle, so $\alpha$ is the middle-sized angle of the triangle. According to the cosine theorem, we have

$$
\cos \alpha=\frac{b^{2}+c^{2}-a^{2}}{2 b c}=\frac{\left(p^{2}+2 p\right)^{2}+(2 p+1)^{2}-\left(p^{2}+p+1\right)^{2}}{2\left(p^{2}+2 p\right)(2 p+1)}=\frac{1}{2}
$$

so $\alpha=60^{\circ}$.