Study of Deuteron Stripping Reaction by Coupled Channel Theory. I Variational Formulation and Discussion on Basic Equations