Common chord of two circles 
Find length of the common chord of two circles of radii 15 cm and 20 cm, distance between the centers being 25cm.

I applied the formula $\frac{2r_1r_2}{d}$, d being distane between the centers. Ans 24cm. I also verified it with pythagous theorem by taking distance between the chord and one center as x.
There is another question.

Find length of the common chord of two circles each of radius r and one through the center of the other.

Here if I use the above written formula, I get 2r. But if I solve it with pythagorus, I get $\sqrt3$r. I wonder what's wrong.
Is the formula not a general one? What are the scenarios where we can use and where we can't use it? 
Is there a general formula for such questions?
 A: 
Let us denote the radius of circle with center $A$ as $r_{1}$ and circle with center $C$ as $r_{2}$, and $AC=d$ as the distance between the centers.
Now note by SAS criteria (prove $\triangle ADC$ and $\triangle ABC$ are congruent by SSS and ...) that $\triangle ABE$ and $\triangle ADE$ are congruent. Thus $\angle AEB = \angle AED$, but since $\angle AEB + \angle AED = 180^{\circ}$, we have  $\angle AEB = \angle AED = 90^{\circ}$. Similarly, $\angle BEC = \angle DEC= 90^{\circ}$.
Thus, we can see that $BE$ is the height of $\triangle ABC$, and $DE$ is the height of $\triangle ADC$, with base $AC$. So,
$$BD=BE+DE=\frac{2(ABC)}{AC} + \frac{2(ADC)}{AC}=\frac{4}{d}(ABC)$$
Where $(ABC)$ and $(ADC)$ represents the area of the respective triangles, which we can calculate in terms of $r_{1},r_{2},d$ using the Herons formula. This is the general formula which gives the length of the common chord, $BD$. I leave the proof of the above formula above as a exercise for you.
However, your formula was for a special case, when $\angle ABC = \angle ADC= 90^{\circ}$. This simplifies the area of the triangles and gives:
$$BC=\frac{4}{d}(ABC)=\frac{2r_{1}r_{2}}{d}$$
Since, in your first question, the pair $(r_{1},r_{2},d)$ was $(15,20,25)$, which is a Pythagorean triple, so the condition $\angle ABC = \angle ADC= 90^{\circ}$ held, and so did your formula. Now lets come to the second question, with a new diagram:

I leave it as a exercise to you to prove that $r_{1}=r_{2}=AB=AC=BC$. Hence, $ABC$ is an equilateral triangle with $\angle ABC = 60^{\circ} \neq 90^{\circ}$. Hence your formula does not hold, and we must return to the general formula:
$$AD=\frac{4}{d}(ABC)=\frac{4}{d}\frac{\sqrt{3}(AC)^2}{4}=\frac{\sqrt{3}(r_{1})^2}{r_{1}}=\sqrt{3}r_{1}$$
What I essentially did in the second last step, was to use the Pythagoras theorem, like the way you must have did, to find the altitude in terms of the side, $r_{1}$, and use it to find the area of the triangle, or we can directly find $AD$ from the height.
A: I'm not sure where you got this $\frac{2r_1r_2}{d}$ formula from, and I don't trust it. So I'll stick to this altitude formula:
\begin{align*}
x = 2h &= \frac{4\sqrt{\frac{r_1+r_2+d}{2}\cdot\frac{r_1+r_2-d}{2}\cdot\frac{r_1-r_2+d}{2}\cdot\frac{-r_1+r_2+d}{2}}}d
\\&=
\frac{\sqrt{(r_1+r_2+d)(r_1+r_2-d)(r_1-r_2+d)(-r_1+r_2+d)}}{d}
\end{align*}
This is obviously different from your formula. It also doesn't simplify easily.
In the case $r_1=r_2=r$ you get
$$x = \sqrt{4r^2-d^2}$$
and for $r_1=r_2=d=r$ you get
$$x = \sqrt3r$$
so the Pythagorean solution you found yourself is the correct one.
A: I analysed your case. I found it. Your formula 2r1r2/d is applicable for cases only when the quadrilateral formed by the radii, with the common chord as one of its diagonals, is a cyclic one.
A: For triangle $ABC  $
$s=15+20+25/2=30$
area of ABC=$\sqrt{s.(s-a).(s-b).(s-c)}$
            =$\sqrt{ 30.15.10.5}$ on solving
            =$150$
Now, $1/2*25*h=150$
$ h=150*2/25=12$
we need $2h=12*2=24$
A: In general, the length of common chord $(L)$ of any two circles with radii $r_1$ & $r_2$ separated at a distance $d$ between their centers, is given by the following Standard Formula of common chord
$$\bbox[5px, border:2px solid red]{L=\dfrac{\sqrt{\left(d^2-(r_1-r_2)^2\right)\left((r_1+r_2)^2-d^2\right)}}{d}}$$
Where,  $|r_1-r_2|\le d\le (r_1+r_2)$
In the given problem, $r_1=15cm$, $r_2=20cm$
and $d=25cm$. Now, substituting the corresponding values in the above stadard formula, One must get the required length of common chord as follows
$$L=\dfrac{\sqrt{\left(25^2-(15-20)^2\right)\left((15+20)^2-25^2\right)}}{ 25}$$
$$=\dfrac{\sqrt{\left(600\right)\left(600\right)}}{25}$$$$=24\mathrm{cm}$$
