# How to show that the autocorrelation function of the given discrete function is this for autoregressive model(AR(2))?

This question is related to white noise representation of WSS sequences using AR(2) (autoregressive) model The function is given as: $$x(k)=\frac{1}{p_1-p_2}(p_1^{k+1}-p_2^{k+1})w[k]u[k]$$ where $$w[k]$$ is white noise sequence with variance $$\sigma_w^2$$, and $$p_1<1$$ and $$p_2<1$$.

I have to prove its autocorrelation function is given as: $$k_{xx}(k)=\frac{\sigma_w^2}{(p_1-p_2)(1-p_1p_2)}(\frac{p_1^{m+1}}{1-p_1^2}-\frac{p_2^{m+1}}{1-p_2^2})$$

My steps are as follows: I am taking autocorrelation function as:$$k_{xx}(k)=E[x[m]x[m-k]]$$ which leads to:$$(\sum_{m=0}^\infty \frac{1}{p_1-p_2}(p_1^{m+1}-p_2^{m+1})u[m]\frac{1}{p_1-p_2}(p_1^{m-k+1}-p_2^{m-k+1})u[m-k])\sigma_w^2$$ $$(\sum_{m=k}^\infty \frac{1}{(p_1-p_2)^2}(p_1^{2m-k+1}+p_2^{2m-k+1}-p_2^{m+1}p_1^{m-k+1}-p_1^{m+1}p_2^{m-k+1}))\sigma_w^2$$ Taking $$m-k=l$$ and segregating terms. Also, after using the property that $$\sum_{n=0}^{\infty}a^n=\frac{1}{1-a}$$ when a<1.

Resulting expression is: $$(p_1^{k+1}\frac{1}{1-p_1^2}-p_2^{k+1}p_1\frac{1}{1-p_1p_2}-p_1^{k+1}p_2\frac{1}{1-p_1p_2}+p_2^{k+1}\frac{1}{1-p_2^2})\frac{\sigma_w^2}{(p_1-p_2)^2}$$ which is not same as what needs to be proved.

Where am I wrong? why I do not get this?: $$k_{xx}(k)=\frac{\sigma_w^2}{(p_1-p_2)(1-p_1p_2)}(\frac{p_1^{m+1}}{1-p_1^2}-\frac{p_2^{m+1}}{1-p_2^2})$$