We apply the concepts of nonlinear guided-wave optics to a Bose-Einstein
condensate (BEC) trapped in an external potential. As an example, we consider a
parabolic double-well potential and derive coupled-mode equations for the
complex amplitudes of the BEC macroscopic collective modes. Our equations
describe different regimes of the condensate dynamics, including the nonlinear
Josephson effect for any separation between the wells. We demonstrate
macroscopic self-trapping for both repulsive and attractive interactions, and
confirm our results by numerical simulations.Comment: 4 pages, 5 figures; typos removed, figures amended; submitted to PR