126k views
4 votes
Suppose a function f is defined recursively as f(n+1)=f(n)+3 f(n-1), f(0)=-1, f(1)=2. Use this definition to calculate f(2)

1 Answer

3 votes

Final answer:

To calculate f(2) using the recursive definition, substitute the values of f(1) and f(0) in the given formula.

Step-by-step explanation:

To calculate f(2) using the recursive definition, we need to apply the given formula for f(n+1) in terms of f(n) and f(n-1). Let's start by substituting the values of f(1) and f(0) to find f(2).

f(2) = f(1) + 3f(0)

f(2) = 2 + 3(-1)

f(2) = 2 - 3

f(2) = -1

User R Moyer
by
7.2k points