Example 5 If the three sides of $\triangle A B C$ are consecutive integers, and the largest angle $\angle B$ is twice the smallest angle $\angle A$, find the lengths of the three sides of the triangle.
(IMO - 10 problem)
Solution 1: Draw the angle bisector $BD$ of $\angle ABC$ (figure omitted), then $BD=AD$. Let $AD=y, AB=x$, then $AC=x+1, BC=x-1, CD=x+1-y$.
By the corollary 3 of Stewart's Theorem, we have $y^{2}=x(x-1)-y(x+1-y)$, which simplifies to $y=\frac{x(x-1)}{x+1}$. Also, $\frac{AB}{BC}=\frac{AD}{CD}$, which means $\frac{x}{x-1}=\frac{y}{x+1-y}$, leading to $y=\frac{x(x+1)}{2x-1}$.
Thus, from $\frac{x^{2}-x}{x+1}=\frac{x^{2}+x}{2x-1}$, we solve for $x=5$ (discard $x=0$), so $AB=5, BC=4, AC=6$.
Solution 2: Draw the circumcircle $O$ of $\triangle ABC$, and take the midpoint $D$ of $\overparen{AC}$, then connect $AD, BD, CD$, making $ABCD$ a trapezoid, where $CD \parallel BA$. Let $AB=x$, then $AC=x+1, BC=x-1$, and $CD=BC=x-1, BD=AC=x+1$. Applying Ptolemy's Theorem to quadrilateral $ABCD$, we have $(x+1)^{2}=x(x-1)+(x-1)^{2}$, solving for $x=5$. (Omitted below)