How do give the recursive form for a certain function?

  • Context: Undergrad 
  • Thread starter Thread starter thename1000
  • Start date Start date
  • Tags Tags
    Form Function
Click For Summary
SUMMARY

This discussion focuses on deriving recursive forms for specific mathematical functions, including f(n) = 2 + (-1)^n, f(n) = n(n+1), f(n) = 2n - 2, f(n) = n^2 – n, and f(n) = 3^n + n⋅3^n. The participants provide detailed steps for functions (a) and (b), establishing base cases and recursive relationships. For f(n) = 2 + (-1)^n, the recursive formula is f(n+1) = f(n) + (-2)(-1)^n with f(1) = 1. For f(n) = n(n+1), the recursive relationship is f(n+1) = f(n) + 2(n+1) with f(1) = 2.

PREREQUISITES
  • Understanding of recursive functions
  • Familiarity with mathematical induction
  • Basic knowledge of sequences and series
  • Ability to manipulate algebraic expressions
NEXT STEPS
  • Study recursive relations in depth with examples from discrete mathematics
  • Explore mathematical induction techniques for proving recursive formulas
  • Learn about linear homogeneous recurrence relations
  • Investigate the application of recursive functions in programming languages
USEFUL FOR

Mathematicians, computer scientists, educators, and students interested in recursion and function analysis will benefit from this discussion.

thename1000
Messages
16
Reaction score
0
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 a lot.

Thanks
 
Physics news on Phys.org
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.
 
thename1000 said:
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 a lot.

Thanks
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 by a moderator:

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 29 ·
Replies
29
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K