x0 = -2;
x1 = -2.5;

xp = x1;
xpp = x0;
n = 2;
while true
	xNext = (3 + 5*xp - 2*xpp)/2;
	xpp = xp;
	xp = xNext;
	xnExact = (1/2)^n - 3;
	fprintf('x(%d) = %e \t exact: %e\n', n, xNext, xnExact);
	n = n+1;
	waitforbuttonpress;
end