A Variational Approach to Nuclear Reactions