Q:

Pencil of lines and degree $d$ curve in $\mathbb{CP}^2$

Question. Let $C$ be a generic smooth curve of degree $d$ in $\mathbb{CP}^2$, and let $P$ be an arbitrary point away from this curve. How many lines are there through point $P$ that are tangent, or have tangency of order $k$ (for any $k$ between 3 and $d$) with $C$? Probably this can be done for small $d$ using the equation for $C$, but I would like to find out if there is a formula for general $d$.                                                

A:

Let $\tilde\pi:\mathbb{PC}^2\setminus\{P\}\to\mathbb{PC}$ be the projection from $P$, which restricts to a surjective morphism $\pi:C\to\mathbb{PC}$ of degree $d$. You are asking for the number of points of ramification of this morphism with multiplicity, or more precisely the degree of the ramification divisor $R$. By Hurwitz' theorem, it can be computed as 
$$\deg(R) = 2g(C)-2 - d(2g(\mathbb{PC}) - 2)=2\binom{d-1}{2} + 2(d-1) = d(d-1).$$

A:

You have some polynomial $f(x,y,z)$. A line through the point $(1:0:0)$ can be paramaterized by a map from $\mathbb P^1: (u:v) \to (u:av:bv)$ for some constant $a$ and $b$. $f$ restricts to a degree $d$ polynomial in $u$ and $v$. Since it has no roots where $v=0$, set $v=1$. You now have a univariate polynomial such that the $k$th coefficient is a degree $k$ polynomial in $a$ and $b$. The discriminant of this polynomial determines whether it has a double root, which is the same as if the line is tangent. The discriminant is a degree $d(d-1)$ polynomial in $a$ and $b$.
Thus, the generic number of roots is $d(d-1)$. This is similarly the generic number of tangent lines. The generic number of inflection points or higher is zero, as this would require a multiple root of the discriminant.
To check that there is not some extra constraint on the discriminant polynomial that forces a multiple root, we can just find an example that does not have a multiple root. If $f(x,y,z)=x^d+xy^{d-1}+z^d$, then $f(u)=u^d+ua^{d-1}+b^d$, whose discriminant, which is $a^{d^2-d}+b^{d^2-d}$ up to some constant factors, has no multiple roots.

