Extracting a Varying DC from a Signal
DC, by definition, is the non-varying part of the signal. To find the DC component you simply average the entire signal.


  How can I extract the varying DC wave from the signal?


This sounds more like you want to extract the low frequency part of the signal. The most basic filter for this is a moving average filter. However, I would recommend a smoother filter, such as a Gaussian filter. Start with $\sigma$ about 1/6 the period of the low frequency oscillations you are interested in and modify to suit.