<s>[INST] find the largest of the three angle of the triangles? 
The sides of a triangle are given to be $$ x^2 +x +1 ,$$ $$2x+1,$$ $$x^2-1$$Then find the largest of the three angle of the triangles .
Source:ISI entrance exam sample question 2016

I tried  by applying hero's formula and then equating to the formula
$$ 0.5 bc  \sin\theta  $$.
But using these methods , then i have to try 3 times for each angle .
And still i cant get the value of x.
I think i can do it throuh by randomly assigning a value to x and then get the value of the angle opposite to the longest side.
Thanks in advance.
 [/INST] Note that :
$
\begin{cases}
 x^2+x+1 > 2x+1 > x^2-1, & \text{if } x\in(1,1+\sqrt 3) \\
 x^2+x+1 > x^2-1 > 2x+1, & \text{if } x\in(1+\sqrt 3,+\infty)
\end{cases}$
Hence , the largest angle of the triangle is angle opposite to the side $x^2+x+1$ . Let us denote that angle as $\alpha$ , then according to Cosine rule we can write following equality :
$(x^2+x+1)^2=(2x+1)^2+(x^2-1)^2-2(2x+1)(x^2-1)\cdot \cos \alpha $
</s>