We all know that a generic complex plane curve of degree \(d\) has \(3d(d-2)\) inflections. Since Klein it is also known what the (strict) upper bound on the number of ** real** inflections in

**plane curves of degree \(d\) is: \(d(d-2)\), one third of the number of complex inflections. But what about the**

*real**average*real situation?

\(\def\Nat{\mathbb{N}} \def\Real{\mathbb{R}}

\def\Int{\mathbb{N}} \def\Rat{\mathbb{Q}}\def\Comp{\mathbb{C}}\def\ex{\mathbb{E}}

\def\im{\mathtt{img}}\def\iid{{\em{iid}}}\def\tM{\tilde{M}}\def\bn{\mathbf{n}}\def\bz{\mathbf{z}}\def\bw{\mathbf{w}}

\def\bk{\mathtt{k}}\def\bn{\mathbf{n}}\def\bz{\mathbf{z}}\def\bw{\mathbf{w}}\def\br{\mathbf{r}}\def\bsi{\mathbf{\sigma}}

\def\Proj{\mathbb{P}}\def\pv{\Proj{V}}\def\val{{\vec{\alpha}}}\def\bz{\mathbf{z}}\def\pinv{\pi^{-1}}\def\kom{\rho_K(p)}\def\pt{\tilde{p}}\def\pb{\bar{p}}\def\so{\mathtt{SO}}\def\kk{\mathbf{k}}\def\flags{\mathbf{F}}\def\var{\mathbb{V}}\)

Of course, one would need to specify a distribution on these real plane curves. Common sense and tradition point towards the ** Kostlan ensemble** of homogeneous polynomials in \(V\cong\Real^{n+1}\) (in our case, of course, \(n=2\), but the definition and construction hold for all \(n\)), which is more or less characterized by two properties:

- the coefficients \(c_{\kk}, \kk=(k_0,\ldots,k_n)\) are independent normal random variables, and
- the ensemble is invariant with respect to the natural action of \(\so(3)\) on the space \(W\cong\Real^N\) of homogeneous polynomials of degree \(d\) in \(\Real^{n+1}\) (here \(N={d+n \choose n}\)).

We will denote the resulting density on \(W\) as \(\kom\).

These two properties imply (after some harmless normalization) the variances \[\var c_{\kk}={d \choose \kk}=\frac{d!}{k_0!\cdots k_n!}. \]

The most natural characterization of an ** inflection** is the following: the (projective) plane curve \(C_p\) (defined by the polynomial \(p\)) has an inflection at a point \(q\) of \(\Proj(V)\) in the direction \(l\) (here \(l\) is a line in \(\Proj(V)\) containing \(q: q\in l\)) if the the restriction of \(p\) to \(l\) has a zero of order \(3\) at \(q\). We will be referring to this condition as \(p\) having an inflection at flag \(\phi=(q,l)\).

In other words, denote by \(\flags=\{(q,l)\}\) the \(3\)-dimensional variety of \((1,2)\) flags in \(V\) (which we identify with the incident pairs \(q\in l\)), and by \(W=\Real^N, N=(d+2)(d+1)/2\) the space of coefficients of homogeneous polynomials in \(3\) variables of degree \(d\). Take \(Z\subset W\times \flags\) to be

\[ Z:=\{(p;q,l): C_p \mbox{ has an inflection at } q \mbox{ in the direction }l\},

\]

the codimension \(3\) variety of pairs (polynomial \(p\), flag \(\phi\)) such that \(p\) has an inflection at \(\phi\). This variety, clearly, is invariant under the diagonal action of \(\so(3)\).

Denote by \(\pi_W,\pi_\flags\) the natural projections from \(Z\) to \(W, \flags\) respectively. Then (for almost all \(p\)) the number of inflection on \(C_p\) is given by \[ n(p):=|\pinv_W\cap Z|, \] and the average number of inflections is therefore given by \[ \langle n\rangle=\int_W n(p) \kom. \]

On an open dense subset of \(Z\), \(\pi_W\) is a local diffeomorphism, so that one can define \(|\pi^*_W\kom|\), a nonegative density on \(Z\) and express the average number of inflections as

\[

\langle n\rangle=\int_Z \pi_p^*\kom.

\]

Now, change (as usual) the order of summation (i.e. apply the Rice-Kac formula) and notice that for any given flag \(\phi\), \(\pinv_\flags(\phi)\) is a *linear* (easy to integrate over!) subspace of codimension \(3\) in \(W\).

For a fixed \(\phi\) we can split the coordinates \(p=(\pt,\pb)\) on \(W\) so that \(\{\pt=0\}\) is the equation for \(\pinv_\flags(\phi)\), and \(\pb\) are coordinates on it.

Then one can rewrite the integral above as \[ \int_\flags\left(\int_{\pinv_\flags(\phi)}\frac{\kom}{d\pt}\left\vert\frac{D\pt}{D\phi}\right\vert\right)d\phi, \] where \(\frac{\kom}{d\pt}\) is the \((N-3)\) form obtained by dividing the \(N\)-form \(\kom\) by the \(3\)-form \(d\pt\); and \(\left\vert\frac{D\pt}{D\phi}\right\vert\) is the Jacobian of the local coordinate change \((\pt,\pb)\mapsto(\phi,\pb)\). Still, just the Rice-Kac formula.

Now, by \(\so\)-invariance, the integral above is but \[ \mbox{volume}(\flags)\times \int_{\pinv_\flags(\phi)}\frac{\kom}{d\pt}\left\vert\frac{D\pt}{D\phi}\right\vert, \] and to find the integral we can choose any \(\phi\) we like. We like the one corresponding to \((x,y)=(0,0), l=\{y=0\}\) in the chart \(x=q_1/q_0, y=q_2/q_0\).

In this frame, let us denote by \(p_{k,l}\) the coefficient \(c_{d-k-l,k,l}\). Then the coordinates \(\pt\) are given by \(\pt=(p_{0,0},p_{1,0}, p_{2,0})\) (the jet of order 2 at \(0\) of the restriction of \(p\) to the \(x\)-axis).

What about \(\phi\)? The standard generators of the Lie algebra of \(\so(3)\) are acting on functions on \(\Proj(V)\) by infinitesimal generators of

- shifts along \(x\) axis,
- shifts along \(y\) axis, and
- rotations around the origin.

We will denote the corresponding generators as \(e_1, e_2, e_3\). In this normalization, the space of flags has volume \(2\pi\times\pi=2\pi^2\).

Let us compute the actions of these generators on the coefficients \(c_{\kk}\) of \(p\): this action should be conjugate to the actions on the monomials. So one can see, readily, that \[ e_1x^ky^l=kx^{k-1}y^l; e_2x^ky^l=lx^{k}y^{l-1}; e_3x^ky^l=kx^{k-1}y^{l+1}-lx^{k+1}y^{l-1}, \] whence \[ e_1p_{kl}=-(k+1)p_{k+1,l}; e_2p_{kl}=-(l+1)p_{k,l+1}; e_3p_{kl}=-(k+1)p_{k+1,l-1}+(l+1)p_{k-1,l+1}. \]

Now we are ready to evaluate the Jacobian:

\[

\frac{D\pt)}{D\phi}=\frac{D(p_{0,0},p_{1,0},p_{2,0})}{D(e_1,e_2,e_3)}=\left(

\begin{array}{ccc}

-p_{1,0} & -2p_{2,0}&-3p_{3,0}\\

-p_{0,1} & -p_{1,1}&-p_{2,1}\\

0 & p_{0,1}&p_{1,1}\\

\end{array}

\right).

\]

Taking into account the fact that we are integrating over \(\pinv_\phi\) where \(p_{0,0}=p_{1,0}=p_{2,0}=0\), we arrive at \[ \left\vert\frac{D\pt}{D\phi}\right\vert=3|p_{0,1}|^2|p_{3,0}|. \]

So, we need to integrate

\[

\prod_{k+l\leq d}(2\pi \sigma_{k,l}^2)^{-1/2}\int 3|p_{0,1}|^2|p_{3,0}| e^{-\frac12 \sum_{k+l\leq d}\frac{p_{k,l}^2}{\sigma_{k,l}^2}} d\pb,

\]

where \(\pb=(p_{k,l}), k+l\leq d; k\geq 3 \mbox{ for } l=0\).

Of course the integral splits into the product of one-dimensional ones, and all terms with exception of \((k,l)\) equal to \((0,0), (1,0),(2,0),(0,1)\) or \((3,0)\) integrate to one.

The contributions from \((0,0), (1,0),(2,0)\) are

\[

(2\pi)^{-3/2} (\sigma_{0,0}\sigma_{1,0}\sigma_{2,0})^{-1/2}=(2\pi)^{-3/2} \left(d\frac{d(d-1)}{2}\right)^{-1/2}=\frac{1}{2\pi^{3/2}d\sqrt{d-1}}.

\]

The term corresponding to \(p_{0,1}\) is \[ \frac{1}{\sqrt{2\pi d}}\int p_{0,1}^2 e^{-\frac{p_{0,1}^2}{2 d}}dp_{0,1}=d; \] and the term involving \(p_{3,0}\) is \[ \frac{\sqrt{6}}{\sqrt{2\pi d(d-1)(d-2)}}\int |p_{3,0}| e^{-\frac{6p_{3,0}^2}{2 d(d-1)(d-2)}}dp_{3,0}=\frac{\sqrt{d(d-1)(d-2)}}{\sqrt{3\pi}}. \]

Assembling all together, we obtain \[ \langle n\rangle=2\pi^2 \times 3\frac{1}{2\pi^{3/2}d\sqrt{d-1}}d\frac{\sqrt{d(d-1)(d-2)}}{\sqrt{3\pi}}=\sqrt{3d(d-2)}, \] conforming perfectly with the *square root* heuristic (that the expected number of real solutions for an \(\so\)-invariant ensemble of \(0\)-dimensional varieties is equal or asymptotic to the square root of the corresponding \(\mathtt{SU}\) invariant complex ensemble.

A famous example of this phenomenon is the result of Shub-Smale that the expected number of solution of a system of \(n\) random homogeneous equations in \(\Proj V\) of degrees \(d_1,\ldots,d_n\), drawn from the corresponding Kostlan ensembles is equal to

\[\sqrt{d_1\cdots d_n}.\]

Of course, such a perfect matching does not happen often: say the expected number of lines on the surfaces of degree \((2n-3)\) in the \(n\)-dimensional projective space, for the Kostlan ensemble, is just asymptotically growing as the square root of its complex counterpart. It should be of interest to find when the square root heuristic is precise. The next natural candidate is the number of *godrons* (name thanks to Kergosien and Thom), the number of points at which the projective dual has a swallowtail point. It is known that the number of such points in a generic surface of degree \(d\) over complex numbers is \(2d(d-1)(11d-24)\) (see, e.g. here). What is it over the reals?