Finding the complement of an elliptic curve inside a Jacobian
This note gives a simple algorithm for the following effectivity problem: given a genus $2$ curve $X$ together with a nonconstant map $\pi:X\to E$ to an elliptic curve, determine an elliptic curve $E'$ and a map $\pi':X\to E'$ independent of $\pi$. Equivalently, we compute the complementary elliptic factor in the decomposition of $\operatorname{Jac}(X)$ up to isogeny. While the problem has been studied extensively, and more general ones have been solved by deep and powerful techniques, we are not aware of a reference for the simple explicit procedure described here.