\[= - \lim_{N\to\infty}\sum_{i=1}^N \rho(x_i)(x_{i+1}-x_i) \log(\rho(x_i)(x_{i+1}-x_i))\]
\[= - \lim_{N\to\infty} \int_\mathbf X \rho(x) \log\left(\frac{\rho(x)}{N m(x)}\right) \d x\]
\[ = - \int_\mathbf X \rho(x) \log\left(\frac{\rho(x)}{m(x)}\right) \d x + \lim_{N\to\infty}\log N\]
\[\lim_{N\to\infty} H_N[x] = - \int_\mathbf X \rho(x) \log\left(\frac{\rho(x)}{m(x)}\right) \d x + \lim_{N\to\infty}\log N\]
\[H_\infty[x] = - \int_\mathbf X \rho(x) \log\left(\frac{\rho(x)}{m(x)}\right) \d x + \lim_{N\to\infty}\log N\]
\[H_\infty[x] = - \int_\mathbf X \rho(x) \log\left(\frac{\rho(x)}{m(x)}\right) \d x + \lim_{N\to\infty}\log N\]
\[ = \int_{-\infty}^{\infty} f(x) (\log(f(x))-\log({g(x)})) \d x\]
\[ = \int_{-\infty}^{\infty} f(x) \log(f(x))-\int_{-\infty}^{\infty} f(x)\log({g(x)}) \d x\]
\[ = -h(f)-\int_{-\infty}^{\infty} f(x)\log({g(x)}) \d x\]
\[D_{KL}(f || g) = -h(f)-\int_{-\infty}^{\infty} f(x)\log({g(x)}) \d x\]
\[ = \int_{-\infty}^{\infty}f(x)\log\left(\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)\right)\d x\]
\[ = \int_{-\infty}^{\infty}f(x)\log\left(\frac{1}{\sqrt{2\pi\sigma^2}}\right) \\ +\int_{-\infty}^{\infty}f(x)\log\left(\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)\right)\d x\]
\[ = -\log\left(\sqrt{2\pi\sigma^2}\right) \int_{-\infty}^{\infty}f(x)\d x \\ - \frac{\log(e)}{2\sigma^2}\int_{-\infty}^{\infty}f(x){(x-\mu)^2}\d x\]
\[ = -\log\left(\sqrt{2\pi\sigma^2}\right) \cancelto{1}{\int_{-\infty}^{\infty}f(x)\d x} \\ - \frac{\log(e)}{2\sigma^2}\cancelto{\sigma^2}{\int_{-\infty}^{\infty}f(x){(x-\mu)^2}\d x}\]
\[ = -\log\left(\sqrt{2\pi\sigma^2}\right) - \log(e)\frac{\sigma^2}{2\sigma^2}\]
\[= -\frac{1}{2}\log(2\pi\sigma^2 e)\]
\[D_{KL}(f || g) = - h(f) + \frac{1}{2}\log(2\pi\sigma^2 e)\]
\[ = -\int_{-\infty}^{\infty}g(x)\log(g(x))\d x \]
\[ =-\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) \\ \log\left(\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)\right)\d x \]
\[ =\log(\sqrt{2\pi\sigma^2})\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) \d x\\ +\log(e)\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)\frac{(x-\mu)^2}{2\sigma^2}\d x \]
\[ =\log(\sqrt{2\pi\sigma^2})\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) \d x\\ +\frac{\log(e)}{2\sigma^2}\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)(x-\mu)^2\d x \]
\[ =\log(\sqrt{2\pi\sigma^2})\cancelto{1}{\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) \d x}\\ +\frac{\log(e)}{2\sigma^2}\cancelto{\sigma^2}{\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)(x-\mu)^2\d x}\]
\[ =\log(\sqrt{2\pi\sigma^2}) +\log(e)\frac{\sigma^2}{2\sigma^2} \]
\[ =\frac{1}{2}\log(2\pi\sigma^2 e) \]
\[D_{KL}(f || g) = - h(f) + h(g)\]
\[h(g)-h(f) \ge 0,\]
\[h(g) \ge h(f),\]