How do give the recursive form for a certain function?

1. Oct 23, 2009

thename1000

I only have the explanation for linear homogeneous ones. I don't know how to do these:

Give a recursive form (including bases) for the following functions:
a. f(n) = 2 + (-1)^n
b. f(n) = n(n+1)
c. f(n) = 2n - 2
d. f(n) = n^2 – n
e. f(n) = 3^n + n⋅3^n

If someone could explain one or two it would help alot.

Thanks

2. Oct 24, 2009

honestrosewater

Maybe someone could help if you gave more information. What are the domains and codomains supposed to be? What counts as a recursive form (what examples do you have)?

Without more info, my best guess is something like this. For (a), assuming n ranges over N, when n is odd, f(n) = 1; when n is even, f(n) = 3. So you could take n = 1 as your base:
f(1) = 1​
and then use the fact that oddness and evenness alternate in N:
if f(n-1) = 1, then f(n) = 3; otherwise, f(n) = 1​
But there are several ways that you could express that, and your teacher or book might want something else.

(b) can be expressed as the product of 2 and the sum of 1 to n:
f(1) = 2(1) = 2
f(2) = 2(1 + 2) = 6
f(3) = 2(1 + 2 + 3) = 12
...​
So this definition involves another recursive function.

3. Oct 24, 2009

HallsofIvy

Staff Emeritus
Step one, compute a few of the values to get a handle on exactly what it is.
for (a), f(1)= 2- 1= 1, f(2)= 2+ 1= 3, f(3)= 2-1= 1, etc. In other words, f(n)= 1 if n is odd, 3, if n is even.

Step two, try to find a relation between f(n) and f(n+1).
f(n+1)- f(n)= 2+ (-1)^(n+1)- 2- (-1)^n= (-1)(-1)^n- (-1)^n= (-2)(-1)^n.

Step three, check that this recursive formula gives the same thing you got in step one to reassure yourself.

f(n+1)= f(n)+ (-2)(-1)^n. That, together with f(1)= 1, is a recursive formula for this sequence.
Note that, according to this, f(2)= f(1)+ (-2)(-1)^1= 1+ 2= 3, f(3)= f(2)+ (-2)(-1)^2= 3- 2= 1, etc.

For b, f(n)= n(n+1), f(1)= 1(2)= 2, f(2)= 2(3)= 6, f(3)= 3(4)= 12, etc. f(n+1)- f(n)= (n+1)(n+2)- n(n+1). Factoring out (n+1), f(n+1)- f(n)= (n+1)(n+2-n)= 2(n+1). f(n+1)= f(n)+ 2(n+1), and f(1)= 2.

By that formula f(2)= f(1)+ 2(2)= 2+ 4= 6, f(3)= f(2)+ 2(3)= 6+ 6= 12, etc.

For (2), since there is no addition or subtraction (addition does not work well together with multiplication!), you could also consider the relation between f(n+1) and f(n) by dividing: f(n+1)/f(n)= (n+1)(n+2)/n(n+1)= (n+2)/n. f(n+1)= [(n+2)/n]f(n) with f(1)= 2, is another recurvsive formula for the same sequence. f(2)= [(1+2)/1]f(1)= 3(2)= 6, f(3)= [(2+2)/2]f(2)= 2(6)= 12, etc.

Last edited: Oct 24, 2009