Systematic Solution of the Mean Field Equation for Liquid Crystals