3 - Solving Two-Point Boundary Value Problems Using Generating Functions: Theory and Applications to Astrodynamics