The query: How to find limits of a converging recursive sequence from some (you may take as many as needed) of the consecutive initial iterates?
Example: I have a recursive relation of the form $\vec{x}(n+3)=a_2 \vec{x}(n+2)+ a_1 \vec{x}(n+1)+ a_0 \vec{x}(n) +\vec{c}$, where $\vec{x}(k),\vec{c}\in \mathbb{R}^2$ and $a_2,a_1, a_0 \in \mathbb{R}$ are chosen such that the relation converges to a limit point, $\frac{\vec{c}}{1-(a_2+a_1+a_0)}$. If one knows the constants $a_2,a_1, a_0$ and $\vec{c}$, one could compute the limit point.
However, I am left with few (say 10) initial iterates of $\vec{x}(k)$. I need to find the limit point. Here is the approach I tried.
Step 1 : Estimate $a_2, a_1$ and $ a_0$ from the iterate values solving the following equation.
for k =1, 2 (or any two values)
$\vec{x}(k+5)-\vec{x}(k+4)$ = $a_2(\vec{x}(k+4)-\vec{x}(k+3))+a_1(\vec{x}(k+3)-\vec{x}(k+2))+a_0(\vec{x}(k+2)-\vec{x}(k+1))$
this is expected to give me four equations for three unknowns (I could generate as many equations as I need from the iterates varying $k$)
Here is the Problem: The system of equations is unsolvable (Matlab solver says the system is inconsistent.)
Step 2: Estimate $\vec{c}$ from the recursive relations.
Step 3: Estimate $x_{limit}$ using aforementioned problem.
Please find attached the sample Matlab code (if you wish to try out).
I observed that the condition number of the matrix formed for solving the linear equations mentioned above is large (which makes the system inconsistent, I guess). Why is it happening?
Any effort made in helping me solve this problem (or even identifying why this is happening) is highly appreciated.
Thanks in advance
%% Sample code
%% Calculating iterates using a sample recursive relation
a_2 = 0.1;
a_1 = 0.1;
a_0 = 0.3;
c=[0.2,1]';
x_limit = c/(1-(a_2+a_1+a_0));%-----(1)
% x_0 = 10*rand(size(c));
x_0 = zeros(size(c));
x_1 = a_0*x_0 +c;
x_2 = a_1*x_1+a_0*x_0 +c;
totla_iterates=200;
X_mat=zeros(length(c),totla_iterates);
X_mat(:,1) = x_0;
X_mat(:,2)=x_1;
X_mat(:,3)=x_2;
for i=4:totla_iterates
X_mat(:,i)=a_2* X_mat(:,i-1)+a_1* X_mat(:,i-2)+a_0* X_mat(:,i-3)+c;%----(2)
end
%% Note that the recursive relation converges to the limit predicted by (1)
% Now use the first 10 iterates of (2) to predict the limit
%% Step 1: Estimate a_0,a_1
X_difmat=X_mat(:,2:end)-X_mat(:,1:end-1);
syms a2 a1 a0
i=1; % you may try varying the value of i or use more equations to find the soln.
% eqn1 = X_difmat(1,i)*a2+X_difmat(1,i+1)*a1 +X_difmat(1,i+2)* a0 == X_difmat(1,i+3);
% eqn2 = X_difmat(2,i)*a2+X_difmat(2,i+1)*a1 +X_difmat(2,i+2)* a0 == X_difmat(2,i+3);
% eqn3 = X_difmat(1,i+1)*a2+X_difmat(1,i+2)*a1 +X_difmat(1,i+3)* a0 == X_difmat(1,i+4);
% [A,B] = equationsToMatrix([eqn1,eqn2,eqn3], [a2 a1 a0]);
eqn1 = X_difmat(:,i)*a2+X_difmat(:,i+1)*a1 +X_difmat(:,i+2)* a0 == X_difmat(:,i+3);
eqn2 = X_difmat(:,i+1)*a2+X_difmat(:,i+2)*a1 +X_difmat(:,i+3)* a0 == X_difmat(:,i+4);
[A,B] = equationsToMatrix([eqn1,eqn2], [a2 a1 a0]);
X=double(linsolve(A,B)); % note that I am unable to calculate a_1 and a_0 here
disp(num2str(X)) % Ideally this should be X= a_2 a_1 and a_0 , which I am not getting.
```