35 Reputation

3 Badges

2 years, 15 days

MaplePrimes Activity

These are questions asked by May

Write a recursive procedure proc2 with option remember, to compute the function 

 recursively defined by 
                           "f[0] = 0"

                        "f[1] = -7*x^2"

       "f[n] = -3*f[n - 2]^2 + (n + 21)*cos(2*f[n - 1])"

  for n>1.
Evaluate the first derivative of 
 at  "x = 2*Pi"

 numerically by the two procedures, and compare running times.

Okay, so for this problem, here is what I have:

option remember;
if n=0 then 0
elif n=1 then -7*x^2;
elif n>1 then -3*f^2[n-2]+(n+21)*cos(2*f[n-1]);
end if;
end proc:


and I get this as my result: -3*f^2[16] + 39*cos(2*f[17])

which is true but what can I do to let the proc2 solve it all the way til they get n=0 or 1? 

and how can I plug in 2*pi in to x?

Please help! Thank you so much for your time!


This might sound silly, but 

how do you find a tangent line equation at an exact point of a curve?


I know this method but how can i put the exact point like (0,1) for an example?

Some of the examples would be very helpful! Thank you

I would show you what I have but I actually don't know where to start this problem..

If n people (numbered 1 to n) stand in a circle and someone starts going around the circle and eliminating every other person till only one person is left, the number J(n) of the person left at the end is given by 

    J(n) = 1                           if n = 1
    J(n) = 2*J(n/2) - 1          if n > 1 and n is even
    J(n) = 2*J((n-1)/2) + 1   if  n > 1 and n is odd

(i) Write a recursive procedure to compute J. [As a check the first 16 values (starting with 1) of J(n) are 1,1,3,1,3,5,7,1,3,5,7,9,11,13,15,1]. 
(ii)Compute the value of J(10000). 
(iii) Can you explain why this is so much faster than our recursive procedure to compute the n-th Fibonacci number?

Page 1 of 1