Use diagonalisation to find the solution to the recurrence a[n+1] +3a[n] = 4a[n-1] +12a[n-2] if a[0]=14, a[1]=2, a[2]=6 You can substitute the initial values in your final answer using the command "subs" What goes wrong when we try to diagonalise this matrix? B:=matrix(4,4,[1,6,-4,-8,1,0,0,0,0,1,0,0,0,0,1,0]); Let us now look at vectors, we can define them in a shorthand way: > w1:=vector([1,2,3,-1]); > w2:=vector([-1,2,2,-1]); We can use the matadd commands to add vectors, or just use > evalm(w1+w2); Note that if we don't use evalm it displays them symbolically. Verify that 1/2 times 5w1-4w2 is equal to 5/2 w1 - 2 w2 as expected. We can take the dot product of vectors: > dotprod(w1,w2); Project w2 onto w1 to find an f2 which is orthogonal to w1 > f2:=evalm(w2-dotprod(w2,w1)/dotprod(w1,w1)*w1); Check they are indeed orthogonal. Note that we can use sqrt(dotprod(w1,w1)) for the length of w1. Which of w1, w2 and f2 is the longest vector? (you can use the command evalf to get the decimal value of any number in maple) Using the Gram-Schmidt method, find e2 and e3 from v3, v2 and v1. > v1:=vector([3,1,-2,2]); > v2:=vector([9, -7, -1, 7]); > v3:=vector([6, 8, -7, -11]); Set up the homogeneous matrix equation to get the general formula for a vector which is orthogonal to e1, e2 and e3. Starting with > v4:=vector([0,0,1,0]); verify that the e4 produced by Gram-Schmidt is the same. Do the same with > v4:=vector([1,0,0,0]); and then try a random v4. Try once more with > v4:=vector([-2, -4, 3, 35]); What goes wrong here? Verify that this matrix is symmetric by taking the transpose > G := matrix([[-1, 0, -3], [0, -1, 1], [-3, 1, -3]]); Find its eigenvectors and check their dot products with each other.