Geometry problem with triangle Given a triangle $ABC$ with side lengths $a$, $b$, and $c$. There exists a unique point $P$ such that
$$d^2 = AB^2+AP^2+BP^2 = AC^2+AP^2+CP^2=BC^2+BP^2+CP^2.$$
Question: How to express $d^2$ in terms of $a$, $b$, and $c$, and the circumradius $R$ of the triangle $ABC$?

What I tried: $R$ can be obtained using Heron's formula: $R=\frac{abc}{4S}$, with $S=\sqrt{s(s-a)(s-b)(s-c)}$, $s=(a+b+c)/2$.
I tried to estimate $d^2$ for some specific values.

*

*For example, when $a=b=c$, then $d^2=5R^2=5a^2/3$.

*In the extreme cases of $a=b+c$, $b=a+c$, or $c=a+b$ (with $a>0$, $b>0$, $c>0$), we have $d^2=32R^2$.

*And if $ABC$ is a right triangle (e.g., if $a^2+b^2=c^2$), we have $d^2=8R^2=a^2+b^2+c^2$.

I have no idea how to come to a general expression for $d^2$ in terms of $a$, $b$, $c$, and $R^2$ and I would be curious to see solutions.
 A: Let us recall here the condition:
$$AB^2+AP^2+BP^2 = AC^2+AP^2+CP^2=BC^2+BP^2+CP^2 \tag{1}$$
I am going to present 2 methods of resolution of this issue.
First method: (1) can be splitted into three equations:
$$\begin{cases}
AB^2+BP^2&=&AC^2+CP^2\\
AC^2+AP^2&=&BC^2+BP^2\\
BC^2+BP^2&=&AB^2+AP^2
\end{cases} \ \iff \ \begin{cases}
c^2-b^2&=&\vec{CP}^2-\vec{BP}^2\\
b^2-a^2&=&\vec{BP}^2-\vec{AP}^2\\
a^2-c^2&=&\vec{AB}^2-\vec{BP}^2
\end{cases}\tag{2}$$
Remark: in fact, each equation in (2) is the equation of a line (as will be clear in the following). As the sum of the 3 constraints is $0$ (meaning that the 3 lines intersect in a common point), we can suppress for example the third equation.
(2) is equivalent to (please note the use of dot product):
$$\begin{cases}
c^2-b^2&=&(\vec{CP}-\vec{BP})\cdot(\vec{CP}+\vec{BP})\\
b^2-a^2&=&(\vec{BP}-\vec{AP})\cdot(\vec{BP}+\vec{AP})
\end{cases} \ \iff \ \begin{cases}
c^2-b^2&=&\vec{CB} \cdot (\vec{CA'}+\vec{A'P}+\vec{BA'}+\vec{A'P})\\
b^2-a^2&=&\vec{BA} \cdot (\vec{BC'}+\vec{C'P}+\vec{AC'}+\vec{C'P})
\end{cases}\tag{3}$$
where $B', C'$ are the midpoints of $CA, AB$ resp.
$$\begin{cases}
c^2-b^2&=&\vec{CB} \cdot 2\vec{A'P}\\
b^2-a^2&=&\vec{BA} \cdot 2\vec{C'P}
\end{cases} \ \iff \ \begin{cases}
\frac{c^2-b^2}{2a}&=&\underbrace{(\tfrac1a \vec{CB})}_{N_a} \cdot \vec{A'P}\\
\frac{b^2-a^2}{2c}&=&\underbrace{(\tfrac1c \vec{BA})}_{N_c} \cdot \vec{C'P}
\end{cases}\tag{4}$$
(4) represents two line equations (characterized by a constant dot product with respect to a fixed vector), the first line being orthogonal to side $BC$ (because its normal vector is $N_a=\tfrac1a \vec{CB}$ ; for a similar reason, the second equation represents a line orthogonal to side $AB$.
Remark: one could also have expressed for example the first relationship (4) under the analytical form : $k=u(x-x_{A'})+v(y-y_{A'})$.
Now let us proceed only with the first equation in (4) corresponding to a line that we will call $(L)$ (the process would be the same for the second line).
Using a result given in this question, we recognize in the LHS of this equation the (signed) distance from the foot of the altitude to the midpoint of the (same) side. Due to the fact that $N_a$ is a unit vector of line $(L)$, the foot $A''$ of line (i.e., the point where line $(L)$ intersects side $BC$) is symmetrical of the foot of the altitude with respect to midpoint $A'$. Reasoning in the same way on the second line, we see that the intersection point $P$ is the symmetrical point of the orthocenter with respect to the circumcenter.
This point is known under the name de Longchamps point alias $X(20)$ in the Encyclopedia of Triangle Centers.
It is situated on the Euler line of the triangle.

Second method: using a CAS (Computer Algebra Software)
(1) gives rise to this set of equations:
$$c^2+(x-p)^2+(y-q)^2+(x-r)^2+(y-s)^2=
b^2+(x-p)^2+(y-q)^2+(x-t)^2+(y-u)^2=
a^2+(x-r)^2+(y-s)^2+(x-t)^2+(y-u)^2\tag{5}$$
associated with constraints :
$$\begin{cases}a^2&=&(r-t)^2+(s-u)^2\\
b^2&=&(p-t)^2+(q-u)^2\\
c^2&=&(p-r)^2+(q-s)^2\end{cases}\tag{6}$$
In fact, conditions (1) being invariant to rotation, translation and scaling, we can assume, without loss of generality, that:
$$A=(-1,0), B=(1,0), C=(t,u) \tag{7}$$
where $t,u$ can be assumed positive, once again without loss of generality.
I have submitted constraints (5), (6), (7) to a C.A.S. Its output are the coordinates of the solution point $M$ :
$$M=(x_M,y_M)=\left(- t, \ \ u+\frac{2}{u}(t^2 - 1)\right)\tag{8}$$
The abscissa in particular is especially simple, and there is a reason for that...
Let $H(x_H,y_H)$ be the orthocenter and $O(x_O,y_0)$ the circumcenter (center of circumscribed circle) of triangle $ABC$.
From (8), relationship $x_M=-x_C$ can be written $x_M=-x_H$, due to the fact that line segment $AB$ is horizontal!), otherwise said, $x_M$ is the opposite of the abscissa of $H$ with respect to the abscissa of $x_O$.
As this can be done on any side, we can draw the conclusion that:
$$\vec{OM}=-\vec{OH},$$
finding back the results obtained with the first method.

Fig. 1: Geogebra construction: circumcenter $O$ is the midpoint of line segment $[MH]$. Here is the case $C=(t,u)=(0.5,2)$ giving $M=(-0.5, 1.25)$ (using formulas (8)).
Remark 1 : Of course, in (8), one must have $u \ne 0$ : if $u=0$, $A,B,C$ are aligned: flat triangles are excluded...
Remark 2 : In most cases, point $M$ is outside triangle $ABC$.
A: $\begin{array}{} AB=c & BC=a & AC=b \\ AP=f & BP=g & CP=h \end{array}$
$\begin{array}{} d^2=c^2+f^2+g^2 & (1)  \\ d^2=b^2+f^2 +h^2 & (2)  \\ d^2=a^2+g^2+h^2 & (3) \ \end{array}$
$\begin{array}{} A=(p,q) & B=(a,0) & C=(0,0) \end{array}$
where:
$\begin{array}{} p=\frac{a^2+b^2-c^2}{2a} & q=\frac{2S}{a} & S=\sqrt{s(s-a)(s-b)(s-c)} & s=\frac{a+b+c}{2}\end{array}$
$\begin{array}{} f^2=(x-p)^2+(y-q)^2 \\ g^2=(x-a)^2+y^2 \\ h^2=x^2+y^2 \\ \end{array}$
$\begin{array}{} (1)(3) & c^2+f^2-a^2-h^2=0 & ⇒ & f^2=a^2+h^2-c^2 \\ (2)(3) & b^2+f^2-a^2-g^2=0 & ⇒ & f^2=a^2+g^2-b^2 \\ & ⇒  a^2+h^2-c^2=a^2+g^2-b^2 & ⇒ & h^2-c^2-g^2+b^2=0  \\ \end{array}$
$\begin{array}{} x^2+y^2-c^2-[(x-a)^2+y^2]+b^2=0 \\ -c^2+2ax-a^2+b^2=0 \\ x_{P}=\frac{a^2-b^2+c^2}{2a} \end{array}$
$f^2=a^2+h^2-c^2$
$(x-p)^2+(y-q)^2=a^2+x^2+y^2-c^2$
$y=\frac{-1}{2q}(2px-p^2-q^2+a^2-c^2)$
replace $p$, $q$ and $S^2$
$y_{P}=\frac{1}{8·aS}(b^4-2b^2c^2+c^4-3a^4+2a^2c^2+2a^2b^2)$
P was identified as L (de Longchamps point).
The distance from the vertex of a triangle to the de Longchamps point is:
$\begin{array}{} AL^2=f^2=16R^2-2(b^2+c^2)-a^2 \\ BL^2=g^2=16R^2-2(c^2+a^2)-b^2 \\ CL^2=h^2=16R^2-2(a^2+b^2)-c^2 \end{array}$
$\begin{array}{}  d^2=c^2+f^2+g^2 \\ d^2=c^2+16R^2-2(b^2+c^2)-a^2+16R^2-2(c^2+a^2)-b^2 \\ d^2=32R^2-3(a^2+b^2+c^2) \end{array}$
$\begin{array}{}  d^2=c^2+f^2+g^2 \\ d^2=c^2+16R^2-2(b^2+c^2)-a^2+16R^2-2(c^2+a^2)-b^2 \\ d^2=32R^2-3(a^2+b^2+c^2) \end{array}$
