$\frac{1}{A_1A_2}=\frac{1}{A_1A_3}+\frac{1}{A_1A_4}$.Then find the value of $n$ If $A_1A_2A_3.....A_n$ be a regular polygon and $\frac{1}{A_1A_2}=\frac{1}{A_1A_3}+\frac{1}{A_1A_4}$.Then find the value of $n$(number of vertices in the regular polygon).
I know that sides of a regular polygon are equal but i could not relate$A_1A_3$ and $A_1A_4$ with the side length.Can someone assist me in solving this problem?

Here's a solution using just the law of cosines. The identity does not hold unless $n\ge 5$. Label the edges and diagonals as in the diagram below, so that by hypothesis
$$\frac1a = \frac1b + \frac1c.\tag1$$

The segments $A_2A_3$, $A_3A_4$, and $A_4A_5$ are concyclic and have the  same length $a$, so they subtend the same angle $\theta$ at $A_1$. Apply the law of cosines to triangles $\triangle A_1A_2A_3$, $\triangle A_1A_3A_4$, $\triangle A_1A_4A_5$ respectively:
$$
a^2=a^2+b^2-2ab\cos\theta\tag2
$$
$$
a^2=b^2+c^2-2bc\cos\theta\tag3
$$
$$
a^2=c^2+d^2-2cd\cos\theta\tag4
$$
Solve equation (2) for $\cos\theta$ and apply (1):
$$
\cos\theta=\frac b{2a}\stackrel{(1)}=\frac{b+c}{2c}.\tag5
$$
Equate the right sides of (3) and (4):
$$
b^2-2bc\cos\theta=d^2-2cd\cos\theta,
$$
substitute (5) for $\cos\theta$, and simplify to obtain $(b-d)(d-c)=0$. We rule out $b=d$ [which merely makes equation (4) a duplicate of (3)], leaving $d=c$. This means $\triangle A_1A_4A_5$ is isosceles, so the polygon has five internal triangles meeting at $A_1$, and has seven vertices.
