<s>[INST] Deriving of formula for finding the length of median In the below image

$AD$ is the median of $\triangle ABC$
We know that $m_A = \frac 1 2 \sqrt{2b^2 + 2c^2 - a^2} $  
But can someone tell me how it's derived !! I am just unable to think of it !! 
But I assume it muste be linked with the Appolonius Theorem !!
 [/INST] Here's a self-contained argument:

We drop perpendiculars from $B$ and $C$ to $B^\prime$ and $C^\prime$ on $\overleftrightarrow{AM}$, where $M$ is the midpoint of $\overline{BC}$. We readily deduce that $\triangle MBB^\prime \cong \triangle MCC^\prime$, so that
$$\begin{align}
\overline{BB^\prime} \cong \overline{CC^\prime} \quad\text{, with common length we'll denote } h \\
\overline{MB^\prime} \cong \overline{MC^\prime} \quad\text{, with common length we'll denote } k
\end{align}$$
Invoking Pythagoras' Theorem on various right triangles, and writing $d$ for $|\overline{AM}|$ (and assuming, without loss of generality, that $b \geq c$, to alleviate a minor sign ambiguity), gives ...
$$\begin{align}
\triangle MBB^\prime: \quad \left(\frac{a}{2}\right)^2 &= h^2 + k^2 \quad\quad\quad\;\;\to\quad a^2 = 4 h^2 + 4 k^2 \\[4pt]
\triangle ACC^\prime: \quad\,\;\;b^2\;\;\, &= h^2 + \left(d + k\right)^2 \quad\to\quad b^2 = h^2 + k^2 + d^2 + 2 k d \\[8pt]
\triangle ABB^\prime: \quad\,\;\;c^2\;\;\, &= h^2 + \left(d - k\right)^2 \quad\to\quad c^2 = h^2 + k^2 + d^2 - 2 k d
\end{align}$$
The result immediately follows: 
$$-a^2 + 2b^2 + 2 c^2 = 4 d^2 \qquad\square$$
</s>