Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Our Q&A platform offers a seamless experience for finding reliable answers from experts in various disciplines. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.

If a sequence is defined recursively by f(0)=2 and f(n+1)=-2f (n)+3 for n> or equal to 0,what is f(2)?

Sagot :

A recursive function lets you find the new value from the previous value in a systematic way. In this case you know f(0) = 2 which lets you calculate f(1) because f (0+1) = - 2 * f(0) + 3 = - 2 * 2 + 3 = - 4 + 3 = - 1. And now that you know f(1) you calculate f(2) because f(1+1) = - 2 * f(1) + 3 = -2*(-1) + 3 = 2 + 3 = 5. Then, the answer is f(2) = 5