#OK to post Homework #Jeton Hida, September 13, 2021, Assignment 2 > #Number 1 (i) a:=proc(n) option remember: if n=0 then 0: elif n=1 then 1: elif n=2 then 8: elif n=3 then 27: else 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4): fi: end: > seq(a(i),i=1..8); 1, 8, 27, 64, 125, 216, 343, 512 > #ii #Guess the explicit formula a(n)=n^3 #iii Prove that a(n)=n^3, let's run program a(n)-n^3 if output is all 0's our guess is correct > seq(a(n)-n^3,n=1..8); 0, 0, 0, 0, 0, 0, 0, 0 > #Number 2 dsolve({D(y)(t)=y(t)^3/(t+1), y(0)=1}, y(t)) 1 y(t) = ---------------------- (1/2) (1 - 2 ln(t + 1)) > #Number 3 dsolve({D(D(y))(t)-3*D(y)(t)+2*y(t)=0, y(0)=2,D(y)(0)=3},y(t)) y(t) = exp(2 t) + exp(t) > #Number 4 A:=Matrix([[3, -4],[4, 3]]) > Loading LinearAlgebra > with(LinearAlgebra): > Eigenvectors(A) > Vector[column]([3 + 4*I, 3 - 4*I]), Matrix([[I, -I], [1, 1]]) #Eigenvalues are in left vector, and corresponding eigenvalues are in the matrix next to it