Unified solution of the Fokker-Planck equation with a bistable potential