Removing Unit Roots If I have the following AR(p) process \begin{align} y_t=a_1 y_{t-1} + a_2 y_{t-2} + ... + a_p y_{t-p}+u_t, \end{align}where $ u_t $ is white noise, and I suppose the AR polynomial has 2 unit roots, how can I mathematically show that the process can be made stationary by second-order differencing? (Further, I assume finite moments for the process.)
Edit: I guess this question was not precisely formulated above. Looking at the AR polynomial
\begin{align}
1-a_1 z - a_2 z^2 - ... - a_p z^p = (1-\lambda_1 z) \times ... \times(1-\lambda_p z), 
\end{align} where $\lambda_1, . . . , \lambda_p$ are the reciprocals of the roots of the polynomial, how can I see that multiplying my process by $(1-L)^2$ removes both of my unit roots?
 A: Your problem here is that you are multiplying by $(1-L)^2$ instead of defining a new observable value that absorbs this term.  Without loss of generality, consider the case where you have two unit roots and $p-2$ non-unit roots.  Using the factorised form of the AR model, you have:
$$\Bigg( (1-L)^2 \prod_{i=1}^{p-2} \Big( 1-\frac{L}{r_i} \Big) \Bigg) Y_t = \varepsilon_t.$$
Applying second-order differencing gives you the observable series $Z_t = (1-L)^2 Y_t$ so you can now write your model as a standard AR($p$) model in terms of this new variable as:
$$\Bigg(\prod_{i=1}^{p-2} \Big( 1-\frac{L}{r_i} \Big)  \Bigg) Z_t = \varepsilon_t.$$
If the remaining roots $r_1,...,r_{p-2}$ are outside the unit circle (i.e., $|r_i|>1$ for $i=1,...p-2$) then you have a standard AR($p-2$) model, which converges to a stationary distribution (and is stationary if you set the starting distribution equal to this stationary distribution).  Of course, if any of these roots is inside the unit circle you get an explosive process, but in that case the problem is not the unit roots, but the explosive roots.
A: In terms of mathematical proof, I don't know (I am not well versed in those).
Empirically, the way to deal with prospective unit roots within your autoregressive model is as follows...
The way you set up your autoregressive variable, it is not unlikely that every single variable within your model have a unit root and are non-stationary (saying essentially the same thing).  That is because your variables are not differenced at all.  They are all "level" variables.  And, if they are embedded within time series, longitudinal data, they will by definition trend somewhat or a lot, and have unit roots.
The first thing to check is if the residuals of such a model are stationary.  And, if they are... then your model could be considered adequately specified and resolving the unit root issue due to Cointegration.  In other words, you would have a successful Cointegration model suggesting that even though both sides of the equation of your regression have unit roots, there is a stable relationship between your dependent variable and your independent variables.
Now, even if the above is indeed a successful Cointegration model one may argue this model is still somewhat spurious.  And, that you would need to make an effort to remove the unit roots.  You would do that through first differencing (not yet second differencing).  And, that is instead of taking Ys as variables you would take the change in Ys as variables (Y - Yt-1).  This would fully detrend your variables.  And, you could test them for unit roots.  Most likely, the unit roots are gone.  Sometimes, unit roots still remain (but to a far lesser degree).  That is because the majority of unit root tests are very sensitive if not overly sensitive.  However, you could demonstrate that the remaining unit roots are benign and don't need to be resolved further based on the following set of arguments: 1) your variables are fully detrended (most often it does not make sense to go on to second differencing); 2) again test the residuals, and if they are stationary you again have a successful cointegration model; 3) check for the autocorrelation of residuals, including the Durbin Watson score, those are also good diagnostics of the severity of unit roots (serious unit roots have very autocorrelated residuals with DB score much under 1.4 or so).
I suspect your model as modified would demonstrate that either your model has no unit root or really benign one.  This is because autoregressive models have very well behaved residuals.  With so many autoregressors it is almost impossible for your residuals to be autocorrelated.
