> #OK to post Homework > #Jeton Hida, September 20, 2021, Assignment 4 > #Number 1 #y''(t)+y(t)=0 #y1(t)=cos(t), y2(t)=sin(t) > diff(cos(t),$(t,2)); -cos(t) > diff(sin(t),$(t,2)); -sin(t) > #-cos(t)+cos(t)=0 #-sin(t)+sin(t)=0 > diff(cos(t)+sin(t),$(t,2)); -cos(t) - sin(t) > #(-cos(t)-sin(t))+(cos(t)+sin(t))=0 #Conditions are met, both are solutions to the second order differential equation, and their sum is also a solution. > #Number 2 #(y'(t))^2-4*y(t)=0 #y1(t)=t^2 diff(t^2,t) 2 t > evalf((2*t)^2-4*(t^2)); 0. > #t^2 is a solution to the differential equation #Now we'll show why y2(t)=2*y1(t)=2t^2 is NOT a solution, a constant multiple of a solution is not also a solution because this is a nonlinear differential equation. If it was linear, this value would also be a solution > diff(2*t^2,t); 4 t > evalf((4*t)^2-4*(2*t^2)); 2 8. t > #Does not equal 0, so 2*t^2 is indeed NOT a solution. > #Number 3 #a(n)=5*a(n-1)-6*a(n-2) #a1(n)=2^n, a2(n)=3^n > evalf(2^2=5*2^(1)-6*2^(0)) 4. = 4. > evalf(3^2=5*3^(1)-6*3^(0)) 9. = 9. > evalf(2^2+3^2=5*(2^1+3^1)-6*(2^0+3^0)) 13. = 13. > #Proven that 2^n+3^n is also a solution to the recurrence equation a(n)=5*a(n-1)-6*a(n-2) > #Number 4 > #a(n)=a(n-1)^2, n>=0, a1(n)=2^(2^n), a2(n)=3^(2^n) > seq(2^(2^n)=(2^(2^(n-1)))^2, n=0..5) 2 = 2, 4 = 4, 16 = 16, 256 = 256, 65536 = 65536, 4294967296 = 4294967296 > seq(3^(2^n)=(3^(2^(n-1)))^2, n=0..5) 3 = 3, 9 = 9, 81 = 81, 6561 = 6561, 43046721 = 43046721, 1853020188851841 = 1853020188851841 > seq((3^(2^n)+2^(2^n))=(3^(2^(n-1))+2^(2^(n-1)))^2, n=0..5) 2 / (1/2) (1/2)\ 5 = \3 + 2 / , 13 = 25, 97 = 169, 6817 = 9409, 43112257 = 46471489, 1853024483819137 = 1858666703634049 > #Again, this is a nonlinear recurrence so we cannot add the two solutions > together and have a new solution. As proven above. > #Number 5 > #part ii rsolve({a(n)-7*a(n-1)+12*a(n-2)=6*n-11, a(0)=3, a(1)=9},a(n)) n n 3 + 4 + n + 1 > #part iv rsolve({a(n)-4*a(n-2)=-3*n+8, a(0)=2, a(1)=1},a(n)) n n 2 + (-2) + n >