Channel capacity with additive Gaussian noise with changing variance As we all know the capacity for a AWGN channel with constant noise variance is just given by $$\frac{1}{2}\log(1+SNR)$$

What if the variance of the noise changes with the type (assuming the variance is known for any time index)? Consider the following discrete channel:
$$
y[n] = x[n] + w[n], \quad n=1,\dots,N
$$
where $w[n]$ is the noise during the $n$-th symbol distributed as $\mathcal{N}(0,\sigma^2_n)$, with known $\{\sigma_n^2\}_{n=1}^N$.


What is the capacity defined in such case? 
It should be related to some dynamic rate control, right? 
Could anyone give me some reference on related topic?
I think you are looking for the information rate,

$$ I(x_{1},x_{2},\cdots,x_{n}; y_{1}, y_{2}, \cdots, y_{n}) = \frac{1}{n} \sum_{i=1}^{n} I( x_{i};y_{i} ) $$

when input achieves the capacity of the channel $ x \sim N(0,P) $. Then,

$$ C = \frac{1}{2n} \sum_{i=1}^{n} \log \left( 1 + \text{SNR}_{i} \right) $$

I think every time we use the channel we have a new random variable $ y $ since we have a memoryless channel and $ w $ changes. Then, we have a sequence of related random variables $ \left\lbrace x_{i} \right\rbrace $ and $ \left\lbrace y_{i} \right\rbrace $. With the information rate we compute the mutual information between this two sequences.

A good reference about this Elements of Information Theory.

I hope this could help you.