To bring this into context, the following is a common problem in magnetism:
- Given an energy functional $E\left(\mathbf{m}\right)$ (here $\mathbf{m}$ is a unit vector of the magnetization), one can find the effective magnetic field by computing $$ {{\mathbf{H}}_{eff}} = - \frac{1}{{{\mu _0}{M_s}}}\frac{{\partial E\left( {\mathbf{m}} \right)}}{{\partial {\mathbf{m}}}} $$
In my case, I was given two energy functionals.
1. $E\left( {\mathbf{m}} \right) = {K_1}{\sin ^2}\theta $, where $\theta$ is the angle between the unit vectors $\mathbf{m}$ and $\mathbf{a}$, and $K_1$ is a real constant.
My approach: $$E\left( {\mathbf{m}} \right) = {K_1}{\sin ^2}\theta = {K_1}\left[ {1 - {{\cos }^2}\theta } \right] = {K_1}\left[ {1 - {{\left( {{\mathbf{a}} \cdot {\mathbf{m}}} \right)}^2}} \right]$$ where I have used the fact that ${\mathbf{a}} \cdot {\mathbf{m}} = \left| {\mathbf{a}} \right|\left| {\mathbf{m}} \right|\cos \theta = \cos \theta$. Now, using the rules of matrix calculus, we can write $${{\mathbf{H}}_{eff}} = - \frac{{{K_1}}}{{{\mu _0}{M_s}}}\frac{\partial }{{\partial {\mathbf{m}}}}\left[ {1 - {{\left( {{\mathbf{a}} \cdot {\mathbf{m}}} \right)}^2}} \right] = \frac{{{K_1}}}{{{\mu _0}{M_s}}}\frac{\partial }{{\partial {\mathbf{m}}}}{\left( {{\mathbf{a}} \cdot {\mathbf{m}}} \right)^2} = \frac{{2{K_1}}}{{{\mu _0}{M_s}}}\left( {{\mathbf{a}} \cdot {\mathbf{m}}} \right){\mathbf{a}}$$ which is the desired result.