I've used Mathematica's NDSolve function to calculate the orbit of the Moon around the Earth.
I used the following initial positions (perigee):
$\vec{r}_{Earth}=\begin{pmatrix}-\frac{m_{Moon}}{m_{Earth}}362.6\cdot10^{6}\\ 0\\ 0 \end{pmatrix}$
$\vec{r}_{Moon}=\begin{pmatrix}362.6\cdot10^{6}\\ 0\\ 0 \end{pmatrix}$
Where the origin is the barycentre
I then calculated the velocity vectors to be:
$\vec{v}_{Moon}=\begin{pmatrix}0\\ \sqrt{G\left(m_{Earth}+m_{Moon}\right)\left(\frac{2}{|r_{Moon}|}-\frac{1}{a}\right)}\\ 0 \end{pmatrix}$
$\vec{v}_{Earth}=\begin{pmatrix}0\\ -\frac{m_{Moon}}{m_{Earth}}\sqrt{G\left(m_{earth}+m_{Moon}\right)\left(\frac{2}{|r_{moon}|}-\frac{1}{a}\right)}\\ 0 \end{pmatrix}$
Here I used the preservation of momentum to find the Earth's wobble's velocity (I'm not 100% sure about this, but it seems to work).
Where
$a=384.399\cdot10^{6}$
the semi-major axis.
I then used Mathematica to plot the orbit of the Earth and the Moon around the barycentre.
Mathematica file here. The notebook is a generic two-body code hence the sometimes circuitous code.
Here's my problem (image):
http://i16.photobucket.com/albums/b21/ApocalypseVolcano/Aplots.png
The apogee is nowhere near the distance from the barycentre as it should be.
I get that other bodies in the solar system influence the orbit of the Earth and the Moon, but is that what's solely responsible?
Also, if I were to have the Earth orbit the Sun, can I use the combined mass of the Earth and the Moon and merely have this system's barycentre orbit the Sun?
The notebook works well for earlier tries with a circular orbit.