Symmetry analysis and solutions for a family of Cahn-Hilliard equations