There is no such $f$.
From http://yaroslavvb.com/papers/rice-when.pdf , the question of existence is determined by the theorem:
Theorem 6. Let $\mathbb{R}$ be the real line. Let $g$ be a real quadratic polynomial, so that
$$g(x)=ax^2+ (b + 1)x+c,$$
for all real $x$, where $a\ne 0$, $b$, and $c$ are in $\mathbb{R}$. ... set $\Delta(g)= b^2-4ac$. If $\Delta(g)> 1$,
then g has no iterative roots of any order whatever. [That is, there is no $f$ such $f\circ f = g$.] If $\Delta(g) =1$, then $g$ can be embedded in a 2-sided
flow on $\mathbb{R}$, all of whose members are continuous functions. If $\Delta(g) <1$, then $g$ can be embedded in a
1-sided flow on $\mathbb{R}$, all of whose members are continuous functions; but $g$ cannot be embedded in any
2-sided flow on $\mathbb{R}$.
As $\Delta(g) = 0 - 4(1)(-2) = 8 > 1$ in your case, the question of existence is negative.
Looking closely at the article, the main point is that no function with only one 2-cycle can have a square root. In our case that means that there can be no partial solution $f:D\to D$ of the funcional equation $f(f(x))=x^2-2$ in $D\subset\Bbb{R}$ if $x_0=\frac{-1+\sqrt{5}}{2}\approx 0.61803$ or
$x_2=\frac{-1-\sqrt{5}}{2}\approx -1.61803$ are in $D$.
In fact, clearly $x_0^2-2=x_2$ and $x_2^2-2=x_0$ (this implies that $x_0\in D$ if and only if $x_2\in D$).
There can be no other pair $y_1\ne y_2$ with $y_1^2-2=y_2$ and $y_2^2-2=y_1$, since then
$$
\{-1,2,x_0,x_2,y_1,y_2\}
$$
would be roots of the polynomial $P(x)=x^4 - 4 x^2 - x + 2$, since
$y_1^2-2=y_2$ and $y_2^2-2=y_1$ implies
$$
(y_1^2-2)^2-2=y_1\quad\Rightarrow \quad y_1^4-4y_1^2+2=y_1
\quad\Rightarrow \quad P(y_1)=0
$$
and similarly $P(y_2)=0$.
Now, if $x_0\in D$ (or $x_2\in D$) and $f:D\to D$ satisfy $f(f(x))=x^2-2$, then $x_1:=f(x_0)$ and $x_3:=f(x_2)$ would be such a pair, a contradiction that proves $x_0\notin D$ (and $x_2\notin D$).
Call A' the intersection of the circle with AP
Call B' the intersection of the circle with BP
Call P' the intersection of A'B and AB'
Then PP' is perpendicular to AB
Now, the proof :
You have that :
- The triangle AA'B is a right triangle because it's a triangle inscribed in a circle with one of its side as a diameter.
- The triangle AB'B is a right triangle because it's a triangle inscribed in a circle with one of its side as a diameter.
This gives you that, for the triangle APP',
- PB' is the altitude from the vertex P
- P'A' is the altitude from the vertex P'
So B, the intersection of PB' and P'A', is the orthocentre.
It follow that AB is the altitude from the vertex A, hence AB and PP' are perpendicular
Best Answer
Solution: Taking it as known that the perpendicular bisectors of a triangle are concurrent, and that this implies the concurrence of the altitudes of a triangle, our construction and proof are simple.
Draw lines from the endpoints $E_1$ and $E_2$ of the circle through the point (call it $A$), meeting the circle in $B$ and $C$; now extend $E_1C$ and $E_2B$ until they meet in $D$. Now, by Thales' theorem, $E_1B$ and $E_2C$ are altitudes of $\triangle E_1DE_2$, meeting in the point $A$. Thus, the third altitude of this triangle, dropped from $D$, also passes through $A$; that is, $DA$ is the third altitude of the triangle. As such, it is perpendicular to the diameter of the circle.