KL divergence of two independent variables 
I'm missing something obviously this is the way to start this:
$\sum_{x\in X}^{}p(x)log(p(x)) - \sum_{x\in X}^{}p(x)log(q(x))$
how to continue from here?
It looks intuitive that if the variables are independent then the sum of all the partial variables ($p_{1},...,p_{i}$) expression will be equal to the KL divergence.
Is my intuition ok? How can it be shown in a mathematical way?  
 A: Partition $x$ as $x = [x_1,y]$, we get
$$\text{KL}(p \parallel q) = \sum_{x\in\mathcal{X}} p(x) \log\left(\frac{p(x)}{q(x)}\right) = \sum_{x_1\in\mathcal{X}_1}\sum_{y\in\mathcal{Y}} p_1(x_1)p_{2:n}(y) \log\left(\frac{p_1(x_1)p_{2:n}(y)}{q_1(x_1)q_{2:n}(y)}\right) $$
Using $\log ab = \log a + \log b$
$$\text{KL}(p \parallel q) = \sum_{x_1\in\mathcal{X}_1}\sum_{y\in\mathcal{Y}} p_1(x_1)p_{2:n}(y) \log\left(\frac{p_1(x_1)}{q_1(x_1)}\right) +\sum_{x_1\in\mathcal{X}_1}\sum_{y\in\mathcal{Y}} p_1(x_1)p_{2:n}(y) \log\left(\frac{p_{2:n}(y)}{q_{2:n}(y)}\right) $$
Note that
$$\text{KL}(p \parallel q) = 
\underbrace{\sum_{y\in\mathcal{Y}}
p_{2:n}(y)}_{=1}
\underbrace{\sum_{x_1\in\mathcal{X}_1}
 p_1(x_1) \log\left(\frac{p_1(x_1)}{q_1(x_1)}\right) }_{\text{KL}(p_1,q_1)}+\underbrace{\sum_{x_1\in\mathcal{X}_1}p_1(x_1)}_{=1}\underbrace{\sum_{y\in\mathcal{Y}} p_{2:n}(y) \log\left(\frac{p_{2:n}(y)}{q_{2:n}(y)}\right) }_{\text{KL}(p_{2:n},q_{2:n})}$$
that is
$$\text{KL}(p \parallel q) =  \text{KL}(p_1,q_1) + \text{KL}(p_{2:n},q_{2:n})$$
Again partition $y = [x_2,z]$ and repeat..
