  We propose a modified Gaussian ansatz to study binary condensates, trapped in
harmonic and optical lattice potentials, both in miscible and immiscible
domains. The ansatz is an apt one as it leads to the smooth transition from
miscible to immiscible domains without any {\em a priori} assumptions. In
optical lattice potentials, we analyze the squeezing of the density profiles
due to the increase in the depth of the optical lattice potential. For this we
develop a model with three potential wells, and define the relationship between
the lattice depth and profile of the condensate.
