Given the perimeter, find the length $\overline{\rm PQ}$ in the following setup. 
Let $\overline{\rm AB}$ be a diameter of a circle $\omega$ and let $C$ be a point on $\omega$, different from $A$ and $B$. The perpendicular from $C$ intersects $\overline{\rm AB}$ at $D$ and omega at $E (\ne C)$. The circle with the center at $C$ and radius $\rm CD$ intersects $\omega$ at $P$ and $Q$. If the perimeter of the $\triangle{PEQ}$ is $p$, find the length of the side $\overline{\rm PQ}$.

I solved this question by taking $C$ on the diameter of $\omega$ perpendicular to $AB$. It turned out to be a very simple case where $\triangle{PEQ}$ was equilateral, and thus $\rm PQ = \frac{p}{3}$.
Now this is the correct answer as the question allows us to take $C$ anywhere. But I feel that it doesn't quite grasp the essence of the question. Could anyone help solve it for the general case where $C$ lies at any random point on $\omega$?
 A: 
Let $\,F\,$ be the point of intersection of the segments $\,PQ\,$ and $\,DC\,$ and let $\,G\,$ be the point of intersection of the segment $\,PQ\,$ and the radius $\,OC\,.$
It results that $\,OC\perp PQ\,.$
Let $\,r\,$ be the perpendicular line from the centre $\,O\,$ to the segment $\,PC\,$ and let $\,H\,$ be the point of intersection.
It results that $\,PH\cong HC\,.$
Since $\,\angle PEF\cong\angle FEQ\,,\,$ we can apply the angle bisector theorem to the triangle $\,\triangle{PEQ}\,,\,$ consequently ,
$PE:EQ=PF:FQ\quad,\;$ hence ,
$(PE+EQ):EQ=(PF+FQ):FQ\quad,$
$(PE+EQ):EQ=PQ:FQ\quad,$
$(PE+EQ):PQ=EQ:FQ\;.\qquad\color{blue}{(1)}$
Since the triangles $\,\triangle{EQF}\,$ and $\,\triangle{PCF}\,$ are similar, we get the following proportion :
$EQ:FQ=PC:FC\;.\qquad\color{blue}{(2)}$
Since the triangles $\,\triangle{FCG}\,$ and $\,\triangle{OCD}\,$ are similar, we get the following proportion :
$FC:GC=OC:DC\quad,$
$FC:GC=OC:PC\;.\qquad\color{blue}{(3)}$
Since the triangles $\,\triangle{OCH}\,$ and $\,\triangle{PCG}\,$ are similar, we get the following proportion :
$OC:PC=HC:GC\;.\qquad\color{blue}{(4)}$
From $\,(3)\,$ and $\,(4)\,,\,$ it follows that
$FC:GC=HC:GC\quad,\;$ hence ,
$FC\cong HC\;.\qquad\color{blue}{(5)}$
From $\,(1)\,,\,(2)\,$ and $\,(5)\,,\,$ it follows that
$(PE+EQ):PQ=PC:HC\;.$
Since $\,PC\cong2HC\,,\,$ we get that
$PE+EQ\cong2PQ\quad,\;$ consequently ,
$\text{Perimeter}\left(\triangle{PEQ}\right)\cong3PQ\quad\;$ and
$PQ\cong\dfrac13\,\text{Perimeter}\left(\triangle{PEQ}\right)\,.$
A: 
Let the radius of the circle centered at $C$ be $r$.
$$\implies \overline{\rm CP} = \overline{\rm CQ} = r$$
Therefore, in $\omega$, $\angle{CEQ} = \angle{CEP} = \theta$
And subtended by $\overline{\rm EP}, \angle{PQE} = \angle{PCE} = \delta.$ $\tag*{}$
Now in $\triangle{PEQ}$, we have:
$$\frac{\sin{\delta}}{\rm PE} = \frac{\sin{2\theta}}{\rm PQ} \tag{1}$$
And in $\triangle{PEC}$, we have:
$$\frac{\sin{\delta}}{\rm PE} = \frac{\sin{\theta}}{\rm CP} \tag{2}$$
From $(1)$ and $(2)$:
$$\rm PQ = {\rm CP} \cdot \frac{\sin{2\theta}}{\sin{\theta}} = 2r\cos{\theta} \tag{3}$$
Now in $\triangle{CEQ}$, we have:
$$\begin{align} \cos{\theta} & = \frac{{\rm QE}^2 + {\rm CE}^2 - {\rm CQ}^2}{2\cdot{\rm QE}\cdot{\rm CE}} \\ & = \frac{{\rm QE}^2 + {(2r)}^2 - {r}^2}{2\cdot{\rm QE} \cdot{2r}} \\ & = \frac{{\rm QE}^2 + 3{r}^2}{4r \cdot {\rm QE}}\end{align}$$ $$\implies {\rm QE}^2 - (4r\cos{\theta}){\rm QE} + 3r^2 = 0 \tag{4}$$
Similarly in $\triangle{CEP}$, we have:
$$\begin{align} \cos{\theta} & = \frac{{\rm PE}^2 + {\rm CE}^2 - {\rm CP}^2}{2\cdot{\rm PE}\cdot{\rm CE}} \\ & = \frac{{\rm PE}^2 + {(2r)}^2 - {r}^2}{2\cdot{\rm PE} \cdot{2r}} \\ & = \frac{{\rm PE}^2 + 3{r}^2}{4r \cdot {\rm PE}}\end{align}$$ $$\implies {\rm PE}^2 -(4r\cos{\theta}){\rm PE} + 3r^2 = 0 \tag{5}$$
From $(4)$ and $(5)$ we observe that $\rm PE$ and $\rm QE$ are the two roots of the equation: $$x^2 - (4r\cos{\theta})x + 3r^2 = 0$$
Therefore, ${\rm PE} + {\rm QE} = 4r\cos{\theta} \tag{6}$
Using $(3)$ and $(6)$, we get:
$$\begin{align} p & =  \rm PQ + (\rm PE + \rm QE) \\ & = 2r\cos{\theta} + (4r\cos{\theta}) \\ & = 6r\cos{\theta} \end{align}$$
Therfore, $$\boxed{\rm PQ = \frac{p}{3} = \frac{1}{3}\cdot\text{Perimeter}}$$
Hence proved.
A: 
Refer to the figure.
Let $EP=x, EQ=y$ and $PQ=z$.
Also let the radius of circle $C$ be $r$.
It suffices to show that $x+y=2z$.
The $4$ angles marked $\alpha$ are equal.
Also $\angle GCQ=2 \times \angle GPQ$ and $\angle ECQ=\angle EPQ$ $$\implies \beta= \gamma$$
Thus $\Delta ECG \cong \Delta ECQ$ (ASA)
which in turn implies that $EG=EQ=y$
Hence $PG=x-y$ and $FG=\frac{x-y}{2}$
Therefore $EF=\frac{x-y}{2}+y=\frac{x+y}{2}$
Note that in $\Delta ECF$, $EF=EC\cos \alpha=2r\cos\alpha$
Thus  $\color{red}{\frac{x+y}{2}=2r\cos \alpha}$
On the other hand, when we consider $\Delta CPQ$,
we have $PQ=2CP\cos \alpha=2r\cos \alpha$
Therefore $\color{red}{z=2r\cos \alpha}$
The two colored statement implies that $x+y=2z$.
