One of the angles of a triangle is $120^\circ$. The sides of the triangle are in A.P. Find the ratio of the sides.
\begin{align} 3:5:7 \end{align}
So the solution in my book:
Let the sides are $a-d,a,a+d$ where $a>0,0<d<a$. Obviously the angle opposite to the largest side is $120^\circ,$ so we can write: $(a+d)^2=a^2+2a(a-d)\cos120^\circ$ and we get $d=\dfrac25a$. So the sides are $\dfrac35a,\dfrac55a, \dfrac75a$.
I would like to ask why we can write the arithmetic progression in this way WLOG. And why do we do so? What do we get from it? Why the restrictions $a>0$ and $0<d<a$? Thank you in advance!
As a general rule, it is usually a good idea to parametrize the problem in the simplest way possible. Naming the middle element of the arithmetic progression $a$ and the difference $d$, it is $a-d, a, a+d$. You may assume that the difference is nonzero (otherwise the triangle is equilateral having no angle of size $120^\circ$). Assuming the difference to be positive is then nothing special: if it were negative, you would just list the sides in the reverse order. The side $a$ has to be positive, as it is the side of a triangle. Finally, if $d\geq a$, then the side $a-d$ would not be positive.