Let $ABCD$ be a [tetrahedron](https://artofproblemsolving.com/wiki/index.php/Tetrahedron) with $AB=41$, $AC=7$, $AD=18$, $BC=36$, $BD=27$, and $CD=13$, as shown in the figure. Let $d$ be the distance between the [midpoints](https://artofproblemsolving.com/wiki/index.php/Midpoint) of [edges](https://artofproblemsolving.com/wiki/index.php/Edge) $AB$ and $CD$. Find $d^{2}$.
Call the midpoint of $\overline{AB}$ $M$ and the midpoint of $\overline{CD}$ $N$. $d$ is the [median](https://artofproblemsolving.com/wiki/index.php/Median) of triangle $\triangle CDM$. The formula for the length of a median is $m=\sqrt{\frac{2a^2+2b^2-c^2}{4}}$, where $a$, $b$, and $c$ are the side lengths of triangle, and $c$ is the side that is bisected by median $m$. The formula is a direct result of the [Law of Cosines](https://artofproblemsolving.com/wiki/index.php/Law_of_Cosines) applied twice with the angles formed by the median ([Stewart's Theorem](https://artofproblemsolving.com/wiki/index.php/Stewart%27s_Theorem)). We can also get this formula from the parallelogram law, that the sum of the squares of the diagonals is equal to the squares of the sides of a parallelogram ([https://en.wikipedia.org/wiki/Parallelogram_law](https://artofproblemsolving.comhttps://en.wikipedia.org/wiki/Parallelogram_law)).
We first find $CM$, which is the median of $\triangle CAB$.
\[CM=\sqrt{\frac{98+2592-1681}{4}}=\frac{\sqrt{1009}}{2}\]
Now we must find $DM$, which is the median of $\triangle DAB$.
\[DM=\frac{\sqrt{425}}{2}\]
Now that we know the sides of $\triangle CDM$, we proceed to find the length of $d$.
\[d=\frac{\sqrt{548}}{2} \Longrightarrow d^2=\frac{548}{4}=\boxed{137}\]