  The supply function equilibrium (SFE) is a model for competition in markets
where each firm offers a schedule of prices and quantities to face demand
uncertainty, and has been successfully applied to wholesale electricity
markets. However, characterizing the SFE is difficult, both analytically and
numerically. In this paper, we first present a specialized algorithm for
capacity constrained asymmetric duopoly markets with affine costs. We show that
solving the first order conditions (a system of differential equations) using
spline approximations is equivalent to solving a least squares problem, which
makes the algorithm highly efficient. We also propose using splines as a way to
improve a recently introduced general algorithm, so that the equilibrium can be
found more easily and faster with less user intervention. We show asymptotic
convergence of the approximations to the true equilibria for both algorithms,
and illustrate their performance with numerical examples.
