TITLE: Study of bifurcations and stability in Rayleigh-B\'enard convection AUTHORS D. Puigjaner (1), C. Sim\'o (2), F.Giralt (3) (1) dpuigja@etse.urv.es Dept. Enginyeria Inform\`atica i Matem\`atiques, ETSE, Universitat Rovira i Virgili, Ctra. de Salou s/n, 43006 Tarragona (Spain). (2) carles@maia.ub.es Dept. Matem\`atica Aplicada i An\`alisi, Fac. Matem\`atiques, Universitat de Barcelona, Gran Via, 585, 08007 Barcelona (Spain). (3) fgiralt@etseq.urv.es Dept. Enginyeria Qu\'{\i}mica, ETSEQ, Universitat Rovira i Virgili, Ctra. de Salou s/n, 43006 Tarragona (Spain). ABSTRACT A path-continuation Galerkin method is proposed to determine the bifurcations and stability of steady convective flows in cavities. It is based on a complete, divergent-free set of basis functions satisfying all boundary conditions. The method is applied to the Rayleigh--B\'enard flow in a cubical cavity. Three bifurcations from the conductive state are identified for Ra<8000. At the first bifurcation a stable x--roll and an unstable diagonal--roll are formed. The second bifurcation yields an initially unstable four--rolls structure which becomes stable later on, while the third bifurcation results in a highly unstable structure.