This is part of a much bigger question I am working on, but I dont understand how I would differentiate a finite sum of the form:
$$\frac{\partial}{\partial \phi} \sum_{t=2}^{T} (y_t - \phi y_{t-1})^2 $$
I have the answer if that would be helpful. Thanks
$$\frac{\partial}{\partial \phi} \sum_{t=2}^{T} (y_t - \phi y_{t-1})^2=\sum_{t=2}^{T}\frac{\partial}{\partial \phi}\Big( (y_t - \phi y_{t-1})^2\Big)=-2\sum_{t=2}^{T} y_{t-1}(y_t - \phi y_{t-1})$$