The slope of a triangle's Euler line in terms of the slopes of its sides Let $p$, $q$, $r$, be the slopes of sides of a triangle, and $m$ the slope of Euler line of the triangle. Then we may say 
$$m= -\frac{3+pq+pr+qr}{p+q+r+3pqr}$$
provided that the denominator isn't zero. If it's zero the euler line of the triangle is parallel to $y$ axis.
I would like hints for proving this formula.
 A: You can use vectors to prove this. Let $ABC$ be the triangle, $p,q,r$ slopes of $BC,AC,AB$, respectively. Note that $\overrightarrow{BC},\overrightarrow{CA},\overrightarrow{AB}$ are respectively parallel to $(1,p),(1,q),(1,r)$. By taking into account the triangle rule $\overrightarrow{AB}+\overrightarrow{BC}+\overrightarrow{CA}=\overrightarrow{0}$, we may assume:
\begin{align}
\overrightarrow{BC}= (q-r,p(q-r)),\\
\overrightarrow{CA}= (r-p,q(r-p)),\\
\overrightarrow{AB}= (p-q,r(p-q)).\\
\end{align}
Let $T$ be the centroid. We know that $\overrightarrow{AT}= \frac{1}{3}(\overrightarrow{AB}+\overrightarrow{AC})= \frac{1}{3}(2p-q-r,pq+pr-2qr)$.
Let $H$ be the orthocenter. $\overrightarrow{AH}$ is parallel to $\overrightarrow{n_{BC}}:(-p(q-r),q-r)$ and $\overrightarrow{BH}$ is parallel to $\overrightarrow{n_{AC}}:(-q(r-p),r-p)$, so we can write:
\begin{align}
\overrightarrow{AH}=\alpha(-p(q-r),q-r),\\
\overrightarrow{BH}=\beta(-q(r-p),r-p).
\end{align}
Since $\overrightarrow{AB}= \overrightarrow{AH}-\overrightarrow{BH}$, we have:
\begin{align}
-\alpha\ p(q-r)+\beta\ q(r-p) = p-q,\\
\alpha(q-r)-\beta(r-p) =r(p-q).
\end{align}
Multiply the second equation by $q$ and add it to the first one to get: $\alpha(q-p)(q-r)=(qr+1)(p-q)$, wherefrom $\alpha=-\frac{qr+1}{q-r}$. So:
$$\overrightarrow{AH}= -\frac{qr+1}{q-r}(-p(q-r),q-r)= (pqr+p, -1-qr).$$
Now $\overrightarrow{HT}= \overrightarrow{AT}- \overrightarrow{AH}=$
$$=\frac{1}{3}(2p-q-r,pq+pr-2qr)-\frac{1}{3}(3pqr+3p, -3-3qr)=
\frac{1}{3}(-p-q-r-3pqr,3+pq+qr+rp).$$
The slope of the Euler line is thus equal to:
$$-\frac{3+pq+qr+rp}{p+q+r+3pqr}.$$
A: Let the slopes of the triangle's sides be $m_i:=\tan\theta_i$ (with $i=1,2,3$), and define $\sigma :=\theta_1+\theta_2+\theta_3$.
The Euler line passes through a triangle's circumcenter and centroid. If we inscribe the triangle in the origin-centered unit circle, the $y$-over-$x$ ratio of the centroid's coordinates give the line's slope. Specifically, a triangle with vertices 
$$P_i := (\;\sin(2\theta_i-\sigma), \cos(2\theta_i-\sigma)\;)$$ 
has centroid $\frac13(P_1+P_2+P_3)$, so that the slope of its Euler line is
$$\begin{align}
&\phantom{=\;-} \frac{\cos(\theta_1-\theta_2-\theta_3)+\cos(-\theta_1+\theta_2-\theta_3)+\cos(-\theta_1-\theta_2+\theta_3)}{\sin(\theta_1-\theta_2-\theta_3)+\sin(-\theta_1+\theta_2-\theta_3)+\sin(-\theta_1-\theta_2+\theta_3)}\\[6pt]
&= -\frac{3\ddot{\theta_1}\ddot{\theta_2}\ddot{\theta_3}+\ddot{\theta_1}\dot{\theta_2}\dot\theta_3+\dot\theta_1\ddot\theta_2\dot\theta_3+\dot\theta_1\dot\theta_2\ddot\theta_3}{3\dot\theta_1\dot\theta_2\dot\theta_3+\dot\theta_1\ddot\theta_2\ddot\theta_3+\ddot\theta_1\dot\theta_2\ddot\theta_3+\ddot\theta_1\ddot\theta_2\dot\theta_3} \quad\left(\;\dot\theta:=\sin\theta, \;\ddot\theta:=\cos\theta\;\right)\\[6pt]
&=-\frac{\ddot\theta_1\ddot\theta_2\ddot\theta_3\left(3+m_2m_3+m_3m_1+m_1m_2\right)}{\ddot\theta_1\ddot\theta_2\ddot\theta_3\left(3m_1m_2m_3+m_1+m_2+m_3\right)} \\[6pt]
&=-\frac{3+m_2m_3+m_3m_1+m_1m_2}{3m_1m_2m_3+m_1+m_2+m_3} 
\end{align}$$
Now, we need only note that the slope of $\overline{P_2P_3}$ is
$$\frac{\cos(-\theta_1+\theta_2-\theta_3)-\cos(-\theta_1-\theta_2+\theta_3)}{\sin(-\theta_1+\theta_2-\theta_3)-\sin(-\theta_1-\theta_2+\theta_3)} =\frac{2\sin(\theta_2-\theta_3)\sin\theta_1}{2\sin(\theta_2-\theta_3)\cos\theta_1} = m_1$$
Likewise, $\overline{P_3P_1}$ and $\overline{P_1P_2}$ have respective slopes $m_2$ and $m_3$. $\square$
