> #OK to post #Timothy Nasralla, HW3, due 09/13/21 #Question 1: Solve the given > IVP with 2<= k <= 10. #k =2 > dsolve({D(D(y))(t)-y(t)=0, y(0) = 1, D(y)(0) = 0}, y(t)) 1 1 y(t) = - exp(-t) + - exp(t) 2 2 > evalf(exp(-1)/2 + exp(1)/2) 1.543080635 > #k =3 > dsolve({D(D(D(y)))(t)-y(t)=0, y(0) = 1, D(y)(0) = 0, D(D(y))(0) = 0}, y(t)) 1 2 / 1 \ /1 (1/2) \ y(t) = - exp(t) + - exp|- - t| cos|- 3 t| 3 3 \ 2 / \2 / > evalf(exp(1)/3 + (2*exp(-1/2)*cos(sqrt(3)*1/2))/3) 1.168058313 > #k = 4 > dsolve({D(D(D(D(y))))(t)-y(t)=0, y(0) = 1, D(y)(0) = 0, D(D(y))(0) = 0, > D(D(D(y)))(0) = 0}, y(t)) 1 1 1 y(t) = - exp(-t) + - exp(t) + - cos(t) 4 4 2 > evalf(exp(-1)/4 + exp(1)/4 + cos(1)/2) 1.041691470 > #k = 5 > dsolve({D(D(D(D(D(y)))))(t)-y(t)=0, y(0) = 1, D(y)(0) = 0, D(D(y))(0) = 0, > D(D(D(y)))(0) = 0, D(D(D(D(y))))(0) = 0}, y(t)) / 256 exp(t) 1 |/ (1/2) \ y(t) = ------------------------------- + ----------------- |\16 5 + 16/ / (1/2)\ / (1/2)\ / (1/2)\ \ \40 + 8 5 / \40 - 8 5 / 5 \40 + 8 5 / / (1/2) \\ (1/2) // 1 (1/2) 1\ \ |1 (1/2) / (1/2)\ || 5 exp||- - 5 - -| t| cos|- 2 \5 - 5 / t|| - \\ 4 4/ / \4 // / / 1 | (1/2) / (1/2)\ //1 (1/2) 1\ \ |1 (1/2) ----------------- |5 \16 - 16 5 / exp||- 5 - -| t| cos|- 2 / (1/2)\ \ \\4 4/ / \4 5 \40 - 8 5 / (1/2) \\ / (1/2)\ || \5 + 5 / t|| // > evalf(256*exp(1)/((40 + 8*sqrt(5))*(40 - 8*sqrt(5))) + (16*sqrt(5) + > 16)*sqrt(5)*exp((-sqrt(5)/4 - 1/4)*1)*cos(sqrt(2)*sqrt(5 - > sqrt(5))*1/4)/(5*(40 + 8*sqrt(5))) - sqrt(5)*(16 - 16*sqrt(5))*exp((sqrt(5)/4 > - 1/4)*1)*cos(sqrt(2)*sqrt(5 + sqrt(5))*1/4)/(5*(40 - 8*sqrt(5)))) 1.008333609 > #k = 6 > dsolve({D(D(D(D(D(D(y))))))(t)-y(t)=0, y(0) = 1, D(y)(0) = 0, D(D(y))(0) = 0, > D(D(D(y)))(0) = 0, D(D(D(D(y))))(0) = 0, D(D(D(D(D(y)))))(0) = 0}, y(t)) 1 1 1 /1 \ /1 (1/2) \ y(t) = - exp(-t) + - exp(t) + - exp|- t| cos|- 3 t| 6 6 3 \2 / \2 / 1 / 1 \ /1 (1/2) \ + - exp|- - t| cos|- 3 t| 3 \ 2 / \2 / > evalf(exp(-1)/6 + exp(1)/6 + exp(1/2)*cos(sqrt(3)*1/2)/3 + > exp(-1/2)*cos(sqrt(3)*1/2)/3) 1.001388891 > #k = 7 > #dsolve({D(D(D(D(D(D(D(y)))))))(t)-y(t)=0, y(0) = 1, D(y)(0) = 0, D(D(y))(0) = > 0, D(D(D(y)))(0) = 0, D(D(D(D(y))))(0) = 0, D(D(D(D(D(y)))))(0) = 0, > D(D(D(D(D(D(y))))))(0) = 0}, y(t)) > # for any values k>= 7, the program started evaluating without stop. > Nonetheless, the visible trend is that the answer at t = 1 for this IVP has > been continously approaching 1 the more specific you get. > #Question 2 asks to prove whether or not a solution is viable for a given > recurrence without any initial points. > rsolve(a(n)-a(n-1)^2=0, a(n)) / n\ \2 / a(0) > #If we allow a(0) =2, then the given solution works. Multiplying 3 by this > solution would also work the same as when showing the whole system > a(n)-a(n-1)^2=0 with the new solution, you can factor out the 3 as it is > independent of changes to a(n) > #Question 3 #solve the given recurrence based on initial values > rsolve({a(n)-3*a(n-1)+2*a(n-2)=0, a(0) =2, a(1)=3}, a(n)) n 2 + 1 > #Question 4 #solve the given recurrence based on initial values. (Many > students had issues with this one, and based on the answer I don't think the > question was written correctly? > rsolve({a(n)-2*a(n-1)-2*a(n-2)+2*a(n-3)=0, a(0) = 3, a(1) =2, a(2) =6}, a(n)) ----- / n\ \ | / 2 \ /1 \ | ) | \-4 _R - 4 _R + 3/ |--| | / | \_R/ | ----- |- -------------------------| / 3 2 \| / 2 \ | _R = RootOf\2 _Z - 2 _Z - 2 _Z + 1/\ \6 _R - 4 _R - 2/ _R / > #what lol > #Question 5 > #solve the given recurrence based on initial values > rsolve({a(n)-a(n-4), a(0)=1, a(1) =0, a(2) =0, a(3) =0}, a(n)) 1 1 n 1 n 1 n - + - (-1) + - (-I) + - I 4 4 4 4