Ok to post 1. n0(t) = 0.1(n0(t-1)) + 1.2(0.97)(n0(t-2)) + 0.1(0.9)(n0(t-3)) REC=[0.1, 1.2*0.95, 0.1*0.9] GrowthCe := proc(REC) local x, i; evalf([solve(1 - add(REC[i]/x^i, i = 1 .. nops(REC)))])[1]; end proc 2. SUR := [0.95,0.97,0.9]: FER:=[0.1,1.2,0.9,0.1]: LeslieMat:=proc(SUR,FER) local i,A: if not (type(SUR,list) and type(FER,list) and nops(SUR)+1=nops(FER)) then print(`bad input`): RETURN(FAIL): fi: A:=nops(SUR): matrix([ FER, seq([0$(i-1),SUR[i],0$(A+1-i)],i=1..A)]) End 3. A. P = matrix([[0.5, 0.5/3, 0.5/3, 0.5/3],[0.2, 0.4, 0.2, 0.2],[0.7/3, 0.7/3, 0.3, 0.7/3],[0.8/3, 0.8/3, 0.8/3, 0.2]]) B. MatrixPower(P,1000) Error, (in LinearAlgebra:-MatrixPower) invalid input: LinearAlgebra:-MatrixPower expects its 1st argument, A, to be of type Matrix(square) but received P