I am trying to write the weak formulation of Cahn-hilliard equation as under.
$\frac{\partial \phi}{\partial t} = \nabla .\{\phi(1-\phi) [\phi(1-\phi)\nabla \mu - \nabla (A(\phi)q)]\}$
$\frac{\partial q}{\partial t} = - \frac{q}{T(\phi)} -A(\phi)\nabla . [[\phi(1-\phi)\nabla \mu - \nabla (A(\phi)q)]]$
For the first equation, if w is the test function then,
$(\phi_t,w)+(\phi^2(1-\phi)^2\nabla \mu, \nabla w)-(\phi(1-\phi)\nabla A(\phi)q,\nabla w)=([\phi(1-\phi)\nabla \mu - \nabla (A(\phi)q)],w)_{boundary}$
Kindly guide me, where I am committing mistake