Poles of functions defined on hyperelliptic curves Consider the equation $y^2=P(x)$, where $P$ is a polynomial over a closed field $\mathbb{k}$ without multiple roots. Let $Y$ be the corresponding affine curve, $X$ - its nonsingular projective model. Such an $X$ is called a hyperelliptic curve. 
I would like to prove that there is a point such that the sequence $l(p),l(2p),l(3p),\ldots l([2g-2]p)$ is $1,1,3,3,5,5,\ldots 2g-1$ ($g$ stands for the genus of $X$, $l(D)=\mathrm{dim}\{f\in \mathbb{k}(X): \mathrm{div}(f)+D\ge 0\}$ for divisor $D$ on $X$). It is easy to see that all we need is a function $f\in \mathbb{k}(X)$ such that $p$ is its only pole, and the order of $p$ is two. Its powers will have a pole at $p$ of higher orders and we will get the sequence.
Could you please help me to prove that there is a point $p\in X$ and a rational function $f\in \mathbb{k}(X)$ with a double point at $p$ only? Is it true that it works only for hyperelliptic curves?
 A: A curve $C$ is hyperelliptic if it possesses a $2:1$ cover $f:C\to \mathbb P^1$. This cover can be viewed as a rational function $f\in k(C)$, and being $2:1$ implies (by Riemann-Hurwitz) that there are $2g+2$ ramification points, i.e. there are $2g+2$ points $p_1,\dots,p_{2g+2}\in C$ such that $f^{-1}(f(p_i))$ consists of a single point. I guess $2g+1$ of them correspond to the roots of $P(x)$, while the last one is the point at infinity. This is the $p\in C$ you are after (the one that gets mapped to $\infty\in\mathbb P^1$).

Your question seems to be related with Weierstrass points. For a general point $P\in C$, the sequence of dimensions of the filtration
$$H^0(K_C)\supseteq H^0(K_C-P)\supseteq H^0(K_C-2P)\supseteq\dots\supseteq H^0(K_C-(g-1)P)\supseteq H^0(K_C-gP)$$ is just the (everywhere decreasing) sequence $$g,g-1,g-2,\dots,1,0.$$
By Riemann-Roch and Serre duality we get that $$h^0(K_C-iP)=g-i-1+h^0(iP),$$ so that the above sequence is "equivalent" to the one you wrote in your question. For general $P\in C$, we have $h^0(K_C-iP)=g-i$ for all $i$, i.e. $h^0(iP)=1$ for all $i$, but for a bunch of special points (called Weierstrass points) $Q\in C$, we can find $i\leq g$ such that $h^0(iQ)>1$. These special points are exactly those for which the sequence $l(Q),l(2Q),l(3Q)\dots$ is not $1,1,1,\dots$ (equivalently, for which the sequence of $h^0(K_C-iP)$ is not $g,g-1,\dots,1,0$). 
Finally, $C$ hyperelliptic has only one possible gap sequence (with respect to the above filtration): $1,3,5,\dots$ The dimension can only drop in the first, third, fifth... $\supseteq$. This is another characterization of hyperelliptic curves, and says that the sequence of the $l(-)$'s is $1,2,2,3,3,\dots$.
