I have an assignment due in my computing class. However, I'm stuck on these 6 questions. Any help would be greatly appreciated. Please show all work, step by step. Unfortunately though, I can't use Maple shortcuts like "sum" to sum the terms in a sequence, so try not to use those.
Thanks in advanced :)
1. Write a do loop to store the first 50 Fibonacci numbers in a 1-dimensional array:
A_Fib. (p.s. F(n)=F(n-1)+F(n-2), initially, F(0)=0, F(1)=1).
2. Write a linear transformation of A_Fib in Q1: B_Fib=2*A_Fib+5.
3. Write a procedure to implement this function:
p(n)= x^n – 2^x cos(x), if n<5
nx + arcsin(x), otherwise.
4. Plot two functions in Q3, when n=2 and n=5, both when x is in the interval [0, 5].
5. Write a procedure to implement:
Input: 1-dimensional Array: X
Output: X’s mean and variance
You should use two output params to store “mean” and “variance”.
6. Use the procedure in Q5, to calculate the mean and variance of B_Fib in Q2.